Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
library(mapgl)
mapboxgl(
style = mapbox_style("streets"),
center = c(-87.61694, 41.86625),
zoom = 15.99,
pitch = 40,
bearing = 20,
antialias = TRUE
) |>
library(mapgl)
maplibre(
style = maptiler_style("bright"),
center = c(-118.705, 34.027),
zoom = 10
) |>
add_symbol_layer(
id = "trailheads",
source = list(
library(mapgl)
mapboxgl(
style = mapbox_style("satellite"),
center = c(-122.514426, 37.562984),
zoom = 17,
bearing = -96,
minZoom = 14
) |>
add_video_source(
library(tigris)
# remotes::install_github("walkerke/mapgl")
library(mapgl)
options(tigris_use_cache = TRUE)
tarrant = tracts("TX", "Tarrant", cb = TRUE)
mapboxgl(style = mapbox_style("light")) |>
add_fill_extrusion_layer(
id = "tracts",
library(tidycensus)
library(tigris)
library(tidyverse)
library(sf)
library(ggiraph)
library(patchwork)
options(tigris_use_cache = TRUE)
set.seed(123456)
# Get a list of counties within the Austin CBSA using tigris
library(tidycensus)
library(tidyverse)
library(showtext)
font_add_google("Montserrat")
showtext_auto()
us_occ_pums <- get_pums(
variables = c("OCCP", "WAGP"),
state = "all",
survey = "acs1",
library(tidyverse)
library(tidycensus)
library(showtext)
font_add_google("Montserrat")
showtext_auto()
continental <- read_csv("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/county/mapping/110-tavg-202402-1.csv", skip = 4) |>
mutate(avg_temp = as.numeric(Value),
GEOID = map_chr(ID, ~{
last3 <- str_sub(.x, start = -3)
# Requires tidycensus dev version
# remotes::install_github("walkerke/tidycensus")
library(tidyverse)
library(tidycensus)
library(showtext)
font_add_google("Montserrat")
showtext_auto()
pres_results <- read_csv("https://raw.githubusercontent.com/tonmcg/US_County_Level_Election_Results_08-20/master/2020_US_County_Level_Presidential_Results.csv")
library(tidycensus)
library(tidyverse)
library(ggridges)
library(showtext)
font_add_google("Montserrat")
showtext_auto()
all_tract_incomes <- get_acs(
geography = "tract",
library(tidycensus)
library(tidyverse)
library(ggridges)
library(showtext)
font_add_google("Montserrat")
showtext_auto()
all_tract_incomes <- get_acs(
geography = "tract",