View source: R/utils-shapefiles.R
sr_census_tracts_in_district | R Documentation |
Find the census tracts in the district and return a list containing the following elements: (1) vector of tract IDs that are in the district, (2) shapefile of tracts in the district.
sr_census_tracts_in_district(district_shapefile, state_abb)
district_shapefile |
The shapefile of the district. Can use |
state_abb |
The two letter state abbbreviation of the state in which the district is located. |
## Not run:
state_abb <- 'AR'
district_shapefile <- tigris::school_districts(state = state_abb, cb = FALSE) |>
dplyr::filter(GEOID == "0503060")
sr_census_tracts_in_district(district_shapefile, state_abb)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.