Meeting 05 - Combining Data Sources

Please submit Lab-04 via GitHub Desktop!

Students in SOC 5650 should also upload their annotated bibliography to their assignments repository!

Meeting Goals

This course meeting has an emphasis on the following goals:

  1. Differentiate between different Census data sources.
  2. Select the correct packages and functions for downloading Census geometric and tabular data.
  3. Construct an sf object by combining two data sources.

Meeting Resources

Before Class


Please complete the tasks listed on the syllabus, and see Blackboard for the entry ticket link.

During Class


  1. Exercise 1 - More on Map Layouts
  2. Exercise 2 - Combining Data Sources
  3. Break
  4. Lab-05 and one-on-one meetings

Exercise 1 - More on Map Layouts

To illustrate some of the elements from the cartography reading assigned for today, please look at this map of Missouri Highways (choose 2019, front and break) created by the State of Missouri. Once you have reviewed the map, discuss the following prompts with your group:

  1. Review from Meeting 3: Which layers are in figure, and which layers are in ground?
  2. Review from Meeting 4: Which map layout elements are present here? (see Brewer, p. 4)
  3. Evaluate the layout of the front map - how is empty space used? how is proximity between elements used?
  4. Evaluate the layout of the back map - how is empty space used? how is proximity between elements used?

Exercise 2 - Combining Data Sources

We’ll introduce two packages, tigris and tidycensus, to access Census data from within R. This provides a significant time savings and makes your work more reproducible. We’ll also go over some review of the data wrangling workflow, touching on specific verbs that are useful for prepping data for joins.

The data and example notebook are available in this course meeting’s repository, named module-2-combine-sources. You can find them in examples/module-examples.Rmd. You can also follow along with the completed code here. Note that there are some issues with how my code is rendering right now with RStudio, and these are incomplete.

After Class

The Lab-05 instructions are available in module-2-combine-sources or can viewed online here. You’ll need to create a new .Rproj for it in your assignments repository and then combine data on Medicaid and foodstamp (SNAP) recipients by Missouri County. You won’t need to create a map this week, just focus on wrangling the data.

Meeting Reminders

Please don’t forget about what is due for next week, which is listed on the syllabus. In addition to Lab-05:

Meeting Extras

If you are interested in historical census data (1990 or before), check out the NHGIS project. They have census data that goes all the way back to 1790!