Metropolitan-Council / councilR

A curated collection of commonly used templates, color palettes, functions, and more!
Other
6 stars 1 forks source link

Function to get the 7-county metro as an sf #19

Closed eroten closed 2 years ago

eroten commented 2 years ago

A function that would return an sf object of the 7-county metro.

library(sf)
library(dplyr)
library(tigris)

metro_counties <- tigris::counties(state = "MN") %>%
  filter(NAME %in% c(
    "Hennepin",
    "Dakota",
    "Carver",
    "Ramsey",
    "Anoka",
    "Scott",
    "Washington"
  )) %>%
  select(NAME) %>%
  sf::st_transform(4326)