Created
November 6, 2020 19:21
-
-
Save arvi1000/34d57f77bf7f56feb58eecf616ec251c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidycensus) | |
library(tidyverse) | |
census_api_key(Sys.getenv('CENSUS_API_KEY')) | |
vars <- load_variables(2017, "acs5", cache = TRUE) | |
il <- get_acs(geography = "county", | |
variables = "B00001_001", | |
state = "IL", geometry = TRUE) | |
ggplot(il) + | |
geom_sf(aes(fill=estimate/1000), size=0.4, color='black') + | |
scale_fill_viridis_c() + | |
labs(title='Illinois Population By County', | |
subtitle = '2017 American Community Survey Estimate', | |
fill = 'Residents, 1000s') + | |
coord_sf(crs =sf::st_crs(26972), datum=NA) + | |
theme_void() |
Author
arvi1000
commented
Nov 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment