# NOT RUN {
# Read by:
#
# filepath <- "data/cb_2018_us_county_20m/cb_2018_us_county_20m.shp"
# usa_counties <- st_read(filepath) %>%
# dplyr::select(
# geo_id = GEOID,
# state_fp = STATEFP,
# county_fp = COUNTYFP,
# county = NAME
# )
# states <- sf::st_drop_geometry(usa_states[, c("geo_id", "state")])
# usa_counties <- usa_counties %>%
# dplyr::left_join(states, by = c("state_fp" = "geo_id"))
# }
Run the code above in your browser using DataLab