R Workshop Day 1 (pdf)

Warmup

RStudio basics

Analyzing data

Practice

  1. Which counties have the smallest/largest population?

  2. Draw a histogram of the different counties populations. How would we describe the distribution? Restrict the dataset to smaller and smaller ranges to get a better view.

  3. What are the mean and median populations for counties? Which one is larger, how does that make sense?

  4. The following command draws histograms of the percent of foreign_born on each county for each of three states. What can we learn about the states from this graph?

  5. Change the above code to instead show the percent of residents that have graduated from high school for the counties in Indiana, Kentucky and Ohio, and compare the states.

  6. Do the same, looking at the percent of residents with incomes below the poverty line.

  7. Produce a dotplot or barchart with one dot/bar for each state, where the value is the number (tally) of counties in that state. What stands out?

  8. What are some popular county names?

  9. Create a new dataset lincolnCounties that contains only those counties named Lincoln County.

  10. Draw histograms and calculate statistics for the percent of females in the different counties, and discuss any interesting patterns.

  11. Identify counties with extremely small or extremely large percentages of female population. Repeat for some specific state.