Lab 2
Working with demographic data (part 1)
Overview
Instructions
Complete the data preparation below using R. Then, complete the rest of the lab
using a word processing program and GISystem of your choice. Store all data and
files in your folder on the Q:\ drive. When you are finished, upload your work
to the dropbox on Canvas.
Objectives
- Differentiate between scales of measurement
- Differentiate between classification methods
- Retrieve data from the U.S. Census and join it to spatial data
- Create maps
Data preparation
Fill in this missing statements (wherever you see _____). You will:
- Retrieve Wisconsin counties data
- Read a Wisconsin ancestry .csv file as a data frame
- Find which group (between Irish, Polish, and Norwegian) has the greatest ancestry in each county (i.e., excluding German and American)
- Join the spatial data and non-spatial data together
- Save the shapefile for mapping in ArcGIS Pro (or another GIS of your choice)
library(readr)
library(sf)
library(tigris)
library(haffutils)
## get spatial data from us census tiger files
wi_geo <- _____
## get ancestry data
wi_anc <- _____("https://gitlab.com/mhaffner/data/-/raw/master/wisconsin-ancestry.csv")
## get the greatest values in every row for selected variables
wi_anc$greatest <- _____
## join the data on the GEOID column
wi_data <- _____
## save data as a shapefile (be sure to change this to your folder on the Q:\
_____(wi_data, "Q:/StudentCoursework/Haffnerm/GEOG.370.001.2245/_____/data/wi_data.shp", delete_layer = TRUE)
Questions
Make a map of Wisconsin ancestry data based upon which group has the greatest representation in each county, but only include Irish, Norwegian, and Polish (3 pts.).
What is the scale of measurement of the variable you are mapping (1 point)?
Discuss the spatial patterns present on the map. Be sure to use words like “north” and “south” rather than “up/top” or “down/bottom”. Be sure to talk about general patterns along with any apparent outliers (3+ sentences) (2 pts.).
Make a map of ancestry data based on the variable “percent German” (i.e. percent of the total population in each county) using a classification method of your choice (3 pts).
What is the scale of measurement of this variable (1 point)?
Discuss the spatial patterns present (3+ sentences), and justify your classification method (2+ sentences) (4 pts.).