Skip to content

Instantly share code, notes, and snippets.

View cbgoodman's full-sized avatar

Chris Goodman cbgoodman

View GitHub Profile
library(tidyverse)
library(sf)
library(tigris)
library(ggiraph)
library(glue)
# Get map data from the Census
state_shapes <- states(cb = TRUE) %>%
# Make this column a number
library(tidyverse)
library(sf)
library(tigris)
library(plotly)
state_shapes <- states() %>%
# Make this column a number
mutate(GEOID = as.numeric(GEOID)) %>%
# Only keep state IDs less than 60 to get rid of Guam, etc
filter(GEOID < 60) %>%