Get Counties boundaries via API, to map them
Source:R/shapes_from_fips.R
shapes_counties_from_countyfips.Rd
Get Counties boundaries via API, to map them
Usage
shapes_counties_from_countyfips(
countyfips = "10001",
outFields = c("NAME", "FIPS", "STATE_ABBR", "STATE_NAME", "POP_SQMI"),
myservice =
c("https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Boundaries_2022/FeatureServer/2/query",
"https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Counties_and_States_with_PR/FeatureServer/0/query",
"https://services.arcgis.com/cJ9YHowT8TU7DUyn/ArcGIS/rest/services/EJScreen_2_22_US_Percentiles_Tracts/FeatureServer/query")[1]
)
Value
spatial object via sf::st_read()
Details
Used sf::read_sf()
, which is an alias for sf::st_read()
but with some modified default arguments.
read_sf is quiet by default/ does not print info about data source, and
read_sf returns an sf-tibble rather than an sf-data.frame
Also note the tidycensus and tigris R packages.