Skip to content

Instantly share code, notes, and snippets.

@walkerke
Created December 31, 2022 15:33
Show Gist options
  • Save walkerke/8e6652ac01add8a885496bbdc97d2ab1 to your computer and use it in GitHub Desktop.
Save walkerke/8e6652ac01add8a885496bbdc97d2ab1 to your computer and use it in GitHub Desktop.
library(tigris)
library(mapview)
options(tigris_use_cache = TRUE)
ct2021 <- counties("CT", year = 2021)
ct2022 <- counties("CT", year = 2022)
m1 <- mapview(ct2021, layer.name = "CT counties<br/>(2021 TIGER)", col.regions = "red")
m2 <- mapview(ct2022, layer.name = "CT counties<br/>(2022 TIGER)", col.regions = "blue")
m1 | m2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment