Skip to content

Instantly share code, notes, and snippets.

@acstrahl
acstrahl / step_by_step_loop.ipynb
Last active March 28, 2025 10:37
Dataquest Project Lab Walkthrough: Word Raider
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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",
@han-tun
han-tun / .block
Created May 28, 2024 21:48 — forked from ColinEberhardt/.block
Health and Wealth of Nations - Bubble Chart
license: mit
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
@marcosci
marcosci / street_orientation.R
Created May 10, 2023 12:36
street_orientation
# load libraries
library(tidyverse)
library(osmdata)
library(sf)
library(ggtext)
library(exactextractr)
library(fasterize)
library(ggtext)
library(tidygeocoder)
library(glue)
library(tidycensus)
library(tidyverse)
options(tigris_use_cache = TRUE)
state_names <- c(state.name, "District of Columbia")
names(state_names) <- state_names
tictoc::tic()
age_maps <- map(state_names, ~{
@AlbertRapp
AlbertRapp / nycflights_calender.qmd
Created July 9, 2022 11:15
NYC flights calendar plot
library(tidyverse)
color_palette <- thematic::okabe_ito(8)
flights <- nycflights13::flights
counts <- flights %>%
mutate(
date = lubridate::make_date(year = year, month = month, day = day)
) %>%
count(date) %>%
mutate(