Exam 02 grades will be released today
Order and time slots of project presentations will be sent out today via a Sakai announcement
No formal lab on Friday. Treat it as drop-in office hours for help on the project
Today’s data set comes from the US Elections Project. We will focus specifically on early voting data for North Carolina through November 1, 2020.
The variables are
name
: county nameregstrd
: number of registered votersvoted
: number of individuals who have votedmailed
: number of mail ballots returned and acceptedrejectd
: number of mail ballots rejectedml_rqst
: number of mail ballots requestedWe first read in the file nc_votes_nov1.shp
with the st_read
function, saving as nc_votes
.
nc_votes <- st_read("data/nc_votes_nov1.shp", quiet = TRUE)
Examine the data frame nc_votes_nov1
. How does it differ from the data frames we have seen before? What type of geometry is associated with each simple feature?
Let’s use nc_votes
to create a map of North Carolina.
ggplot(nc_votes) +
geom_sf()
Starting with the code above, update the visualization so that the counties have a fill color corresponding to the percentage of requested mail-in ballots that have been returned and accepted. Include informative labels, colors and any other aesthetics.
Create a map of North Carolina where the counties have a fill color corresponding to the percentage of votes that were cast by mail. Include informative labels, colors and any other aesthetics.
Create an effective spatial data visualization using these data exploring a topic of your choosing.
Read more about factors to consider when creating election maps: https://www.nytimes.com/interactive/2020/10/30/opinion/election-results-maps.html