Scenario
A company wants to know which states buy their product the most. A colored map is a clear way of showing this information. Here, we use the data to create a map, differentiated with the percentage of voters that voted for Obama.
Aim
To create a map of the US that is colored according to the percentage of voters that voted for Obama.
Steps for Completion
- Merge the data sets.
- Use the ggplot options to create the map.
- For aesthetics, run the required code:
USStates$Statelower <- as.character(tolower(USStates$State))glimpse(USStates)## Observations: 50## Variables: 23## $ State <fct> Alabama, Alaska, Arizona,Arkansas, Californi...## $ HouseholdIncome <dbl> 43.253, 70.760, 49.774, ...