Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
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)
library(tidycensus)
library(tigris)
library(tidyverse)
options(tigris_use_cache = TRUE)
# Grab the data
us_income <- get_acs(
geography = "puma",
variables = "B19013_001",
year = 2023,
# remotes::install_github("walkerke/mapgl")
library(mapgl)
library(sf)
library(dplyr)
# Set seed for reproducibility
set.seed(42)
# Define the bounding box for Dallas (approximately)
dallas_bbox <- st_bbox(c(
library(shiny)
library(bslib)
library(mapgl)
library(sf)
ui <- page_fluid(
theme = bs_theme(version = 5, bootswatch = "flatly"),
h2("mapgl Drawing Demo"),