Simple Plotting

Use the mScatter() function to generate a graphic, as follows:

data( NHANES )
Small <- sample_n( NHANES, size=1000 ) # for faster plotting
DCF::mScatter( Small )

Set up the mapping from variables to graphical attributes like this:

Attributes set using DCF::mScatter()

Attributes set using DCF::mScatter()

Once you have made the plot, describe briefly the meaning, in everyday human terms, of the pattern displayed in the scatterplot. (You can find the definitions of the variables using help( NHANES ).)

Include an R chunk in your write-up that generates the graph.

Make this Plot

Using the data in Small, make this plot with DCF::mScatter():

plot of chunk unnamed-chunk-5

Write down the mapping between variables and graphical attributes.

Counting Votes

Using the Minneapolis2013 data table, answer these questions:

  1. How many cases are there?
  2. Who were the top 5 candidates in the Second vote selections.
  3. How many ballots are marked “undervote” in
    • First choice selections?
    • Second choice selections?
    • Third choice selections?
  4. What are the top 3 combinations of First and Second vote selections? (That is, of all the possible ways a voter might have marked his or her first and second choices, which received the highest number of votes?)
  5. Which Precinct had the highest number of ballots cast?

Zip Codes

Using the ZipGeography data

Find the total land area and population in each state.

Using the ZipDemography data

Explain what would keep you, at this point, from calculating the fraction of people in each state who have a Bachelorsdegreeorhigher. Say how you would go about constructing such a plot — but don’t actually do it! Too much work.