Skip to contents

Import geographic layer as a sf object.

Usage

ha_layer(layer_key, progress = TRUE)

Arguments

layer_key

Unique ID for a geographic layer.

progress

Display a progress bar?

Value

sf geographic layer.

Examples

# \donttest{
ha_set("chicagohealthatlas.org")

ha_layer("zip", progress = FALSE)
#> Simple feature collection with 58 features and 6 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -87.86859 ymin: 41.6445 xmax: -87.5237 ymax: 42.0231
#> Geodetic CRS:  WGS 84
#> First 10 features:
#>    geoid layer_key                name population state
#> 1  60601       zip 60601 (Chicago, IL)      15814    IL
#> 2  60602       zip 60602 (Chicago, IL)       1261    IL
#> 3  60603       zip 60603 (Chicago, IL)       1288    IL
#> 4  60604       zip 60604 (Chicago, IL)        897    IL
#> 5  60605       zip 60605 (Chicago, IL)      34071    IL
#> 6  60606       zip 60606 (Chicago, IL)       3797    IL
#> 7  60607       zip 60607 (Chicago, IL)      31816    IL
#> 8  60608       zip 60608 (Chicago, IL)      75770    IL
#> 9  60609       zip 60609 (Chicago, IL)      65770    IL
#> 10 60610       zip 60610 (Chicago, IL)      43794    IL
#>                        notes                       geometry
#> 1  Central business district MULTIPOLYGON (((-87.62801 4...
#> 2  Central business district MULTIPOLYGON (((-87.63392 4...
#> 3  Central business district MULTIPOLYGON (((-87.6338 41...
#> 4  Central business district MULTIPOLYGON (((-87.63375 4...
#> 5                            MULTIPOLYGON (((-87.63314 4...
#> 6  Central business district MULTIPOLYGON (((-87.63397 4...
#> 7                            MULTIPOLYGON (((-87.66953 4...
#> 8                            MULTIPOLYGON (((-87.69589 4...
#> 9                            MULTIPOLYGON (((-87.68575 4...
#> 10                           MULTIPOLYGON (((-87.64829 4...
# }