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:
- Differentiate between different Census data sources.
- Select the correct packages and functions for downloading Census geometric and tabular data.
- Construct an
sf
object by combining two data sources.
Meeting Resources
- An overview of the meeting can be on the syllabus
- Prep videos and entry ticket are on Blackboard
- Meeting materials are available on GitHub in the
module-2-combine-sources
repository - You can follow along with the complete code for Exercise 2 here
- Lab-05 instructions are available here
- Some helpful links for today include:
Before Class
Tasks
Please complete the tasks listed on the syllabus, and see Blackboard for the entry ticket link.
During Class
Agenda
- Exercise 1 - More on Map Layouts
- Exercise 2 - Combining Data Sources
- Break
- 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:
- Review from Meeting 3: Which layers are in figure, and which layers are in ground?
- Review from Meeting 4: Which map layout elements are present here? (see Brewer, p. 4)
- Evaluate the layout of the front map - how is empty space used? how is proximity between elements used?
- 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:
- the second final project waypoint is due next week for all students
- the third final project waypoint is due in two weeks for all students
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!