iris
datasetlibrary(dplyr)
library(ggplot2)
## data profiling
## ggplot2 method 1
## ggplot2 method 2 (filter first)
library(ggplot2)
library(tidycensus)
library(sf)
library(dplyr)
## activate US census API key (if necessary)
census_api_key(____)
## get income data from the census
us.data <- get_acs(geography = "county",
variables = "B19013_001",
geometry = TRUE)
## get state fips as its own variable
us.data$state <- substr(us.data$GEOID, 1, 2)
## filter by state (get two states)
## create a histogram of each with ggplot2
## create a density plot of both on the same grid, then modify colors,
## transparency, etc.