Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
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"),
library(mapgl)
library(tidycensus)
options(tigris_use_cache = TRUE)
tarrant_income <- get_acs(
geography = "tract",
variables = "B19013_001",
state = "TX",
county = "Tarrant",
geometry = TRUE
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(