Created
December 14, 2021 15:14
-
-
Save ctesta01/73d0ee23e27d360288e1bb001ae13bd3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(plotly) | |
| library(sf) | |
| library(dplyr) | |
| nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) | |
| N <- 10 | |
| # make random data | |
| df <- lapply(1:N, function(x) nc) %>% bind_rows %>% | |
| bind_cols(frame = rep(c(1:N), each = nrow(nc)), | |
| value = rnorm(n = nrow(nc)*N)) | |
| plot_ly(df, | |
| split = ~FIPS, | |
| frame = ~frame, | |
| color = ~value, | |
| showlegend = F, | |
| alpha = 1 | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment