Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
# remotes::install_github("walkerke/tigris")
library(tigris)
options(tigris_use_cache = TRUE)
dfw_box <- c(-98.324890,31.877558,-95.344849,33.493307)
dfw_ua_10 <- urban_areas(filter_by = dfw_box)
dfw_ua_20 <- urban_areas(year = 2020, criteria = "2020",
filter_by = dfw_box)
library(tigris)
library(mapview)
options(tigris_use_cache = TRUE)
ct2021 <- counties("CT", year = 2021)
ct2022 <- counties("CT", year = 2022)
m1 <- mapview(ct2021, layer.name = "CT counties<br/>(2021 TIGER)", col.regions = "red")
m2 <- mapview(ct2022, layer.name = "CT counties<br/>(2022 TIGER)", col.regions = "blue")
library(tidycensus)
library(tidyverse)
akron_2010 <- get_decennial(
geography = "place",
year = 2010,
variables = "P001001",
state = "OH"
) %>%
filter(NAME == "Akron city, Ohio") %>%
library(tigris)
library(tidyverse)
library(showtext)
library(sf)
library(ggfx)
options(tigris_use_cache = TRUE)
font_add_google("Roboto", "Roboto")
showtext_auto()
library(tidycensus)
library(tigris)
library(tidyverse)
library(showtext)
options(tigris_use_cache = TRUE)
font_add_google("Lato", "Lato")
dat <- get_acs(
geography = "county",
library(tigris)
library(tidyverse)
library(sf)
smallwood <- places("NY", cb = TRUE) %>%
filter(str_detect(NAME, "Smallwood"))
smallwood_roads <- roads("NY", "Sullivan") %>%
st_intersection(smallwood) %>%
filter(st_is(., "LINESTRING"))
library(tidycensus)
library(tidyverse)
library(tigris)
library(sf)
library(mapboxapi)
library(showtext)
options(tigris_use_cache = TRUE)
font_add_google("Lato", "Lato")
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",
library(tigris)
library(tidyverse)
library(showtext)
library(sf)
library(ggfx)
options(tigris_use_cache = TRUE)
font_add_google("Roboto", "Roboto")
showtext_auto()
library(tigris)
library(tidyverse)
library(showtext)
library(sf)
library(ggfx)
options(tigris_use_cache = TRUE)
font_add_google("Roboto", "Roboto")
showtext_auto()