-
-
Save xvrdm/d834009319be0827c0dda79024f2b43f to your computer and use it in GitHub Desktop.
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(mapdeck) | |
library(tidyverse) | |
token <- "your mapbox token" | |
hv <- get_acs(geography = "tract", | |
variables = "B25077_001", | |
state = "CA", | |
geometry = TRUE) %>% | |
drop_na(estimate) %>% | |
mutate(elev = estimate/ 100) | |
mapdeck(token = token) %>% | |
add_polygon(data = hv, | |
fill_colour = "estimate", | |
tooltip = "estimate", | |
stroke_width = 0, | |
layer = "ca_housing", | |
elevation = "elev") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment