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(tidyterra) | |
library(tidyverse) | |
library(terra) | |
library(tigris) | |
library(sf) | |
library(mapboxapi) | |
# Get data from https://www.mrlc.gov/data/nlcd-2019-land-cover-conus | |
# Warning - it's big! | |
nlcd <- rast("~/data/nlcd_2019_land_cover_l48_20210604/nlcd_2019_land_cover_l48_20210604.img") |
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(mapboxapi) | |
library(tidyverse) | |
library(sf) | |
library(patchwork) | |
city_halls <- c( | |
"New York" = "City Hall Park, New York, NY 10007", | |
"Los Angeles" = "200 N Spring St, Los Angeles, CA 90012", | |
"Chicago" = "121 N La Salle St, Chicago, IL 60602", | |
"Houston" = "901 Bagby St, Houston, TX 77002", |
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(tidyverse) | |
library(sf) | |
library(mapboxapi) | |
library(tigris) | |
library(fasterize) | |
library(leaflet) | |
# Get county boundaries; you can analyze for any county | |
target_GEOID <- "48309" |
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(tigris) | |
library(tidyverse) | |
library(showtext) | |
options(tigris_use_cache = TRUE) | |
font_add_google("Roboto", "Roboto") | |
showtext_auto() | |
ukrainian <- get_acs( |
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(tigris) | |
library(tidyverse) | |
library(showtext) | |
library(sf) | |
library(ggfx) | |
options(tigris_use_cache = TRUE) | |
font_add_google("Roboto", "Roboto") | |
showtext_auto() |
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(tigris) | |
library(tidycensus) | |
library(tidyverse) | |
library(gganimate) | |
library(scales) | |
options(tigris_use_cache = TRUE) | |
us_county_pop <- get_decennial( | |
geography = "county", | |
variables = "P1_001N", |
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(tigris) | |
library(mapboxapi) | |
library(gganimate) | |
library(tidyverse) | |
library(sf) | |
library(showtext) | |
options(tigris_use_cache = TRUE) | |
animation::ani.options(ani.width = 700, ani.height = 550) |
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(tigris) | |
library(tidyverse) | |
library(showtext) | |
library(sf) | |
options(tigris_use_cache = TRUE) | |
font_add_google("Roboto", "Roboto") | |
showtext_auto() | |
state_borders <- states(cb = TRUE, resolution = "20m") %>% |
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
cities <- structure( | |
list( | |
name = c( | |
"Mesa", | |
"Phoenix", | |
"Tucson", | |
"Fresno", | |
"Los Angeles", | |
"Sacramento", | |
"San Diego", |
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) | |
sysfonts::font_add_google("Roboto") | |
var <- "DP03_0025" | |
commute19 <- get_acs( | |
geography = "place", | |
variables = var, | |
survey = "acs1", |