This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidycensus) | |
library(tidyverse) | |
library(RColorBrewer) | |
natchg <- get_estimates( | |
geography = "state", | |
variables = "RNATURALCHG", | |
vintage = 2024 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidycensus) | |
library(tidyverse) | |
library(geofacet) | |
library(scales) | |
state_birth_rates <- get_estimates( | |
geography = "state", | |
variables = "RBIRTH", | |
vintage = 2024, | |
time_series = TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidycensus) | |
library(tidyverse) | |
library(scales) | |
state_pop <- get_estimates( | |
geography = "state", | |
variables = "POPESTIMATE", | |
vintage = 2024, | |
time_series = TRUE | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidycensus) | |
library(ggplot2) | |
library(dplyr) | |
state_mig <- get_estimates( | |
geography = "state", | |
variables = c("RDOMESTICMIG", "RINTERNATIONALMIG"), | |
vintage = 2024, | |
output = "wide" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(mapgl) | |
mapboxgl( | |
zoom = 2, | |
center = c(-28, 47), | |
style = mapbox_style("dark") | |
) |> | |
add_layer( | |
id = "wind-layer", | |
type = "raster-particle", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(bslib) | |
library(mapgl) | |
library(sf) | |
ui <- page_fluid( | |
theme = bs_theme(version = 5, bootswatch = "flatly"), | |
h2("mapgl Drawing Demo"), | |
NewerOlder