Download U.S. Urban Areas
download_urban_areas.Rd
Downloads a U.S. Census designated urban areas intersecting the spatial extent of the template SpatRaster.
Usage
download_urban_areas(
template,
page_size = NULL,
output = tempfile(fileext = ".gpkg")
)
Examples
# example code
# \donttest{
## This example requires an internet connection to run
dem <- system.file("extdata", "thompsoncreek.tif", package = "SELECTRdata")
dem <- terra::rast(dem)
ua <- download_urban_areas(template = dem)
ua
#> class : SpatVector
#> geometry : polygons
#> dimensions : 1, 9 (geometries, attributes)
#> extent : -42298.37, -19741.85, 826766.2, 850727.8 (xmin, xmax, ymin, ymax)
#> source : file201c6c49f75c.gpkg
#> coord. ref. : +proj=aea +lat_0=23 +lon_0=-96 +lat_1=29.5 +lat_2=45.5 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
#> names : OBJECTID UA_CODE NAME POPULATION POP_DENSITY HOUSING
#> type : <num> <chr> <chr> <num> <num> <num>
#> values : 494 18748 College Statio~ 2.061e+05 2525 8.65e+04
#> AREA_SQMI Shape__Area Shape__Length
#> <num> <num> <num>
#> 81.7 0.01991 1.737
# }