Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
library(mapgl)
pmtiles <- "https://r2-public.protomaps.com/protomaps-sample-datasets/cb_2018_us_zcta510_500k.pmtiles"
maplibre(center = c(-97, 35), zoom= 3) |>
set_projection("globe") |>
add_vector_source("pmtiles_source",
url = paste0("pmtiles://", pmtiles)
) |>
add_fill_layer(
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-24/refs/heads/master/2024_US_County_Level_Presidential_Results.csv") %>%
county_mig <- get_estimates(
library(tidycensus)
library(tidyverse)
library(RColorBrewer)
natchg <- get_estimates(
geography = "state",
variables = "RNATURALCHG",
vintage = 2024
)
library(tidycensus)
library(tidyverse)
library(geofacet)
library(scales)
state_birth_rates <- get_estimates(
geography = "state",
variables = "RBIRTH",
vintage = 2024,
time_series = TRUE
library(tidycensus)
library(tidyverse)
library(scales)
state_pop <- get_estimates(
geography = "state",
variables = "POPESTIMATE",
vintage = 2024,
time_series = TRUE
)
library(tidycensus)
library(ggplot2)
library(dplyr)
state_mig <- get_estimates(
geography = "state",
variables = c("RDOMESTICMIG", "RINTERNATIONALMIG"),
vintage = 2024,
output = "wide"
)
library(mapgl)
mapboxgl(
zoom = 2,
center = c(-28, 47),
style = mapbox_style("dark")
) |>
add_layer(
id = "wind-layer",
type = "raster-particle",
library(mapgl)
library(tidycensus)
library(tigris)
options(tigris_use_cache = TRUE)
manhattan_income <- get_acs(
geography = "tract",
variables = "B19013_001",
state = "NY",
county = "New York",
# You'll need the dev version of mapgl
# remotes::install_github("walkerke/mapgl")
library(shiny)
library(bslib)
library(mapgl)
library(tigris)
library(sf)
library(dplyr)
library(sortable)