Skip to contents

Wraps the City of Chicago "Boundaries - Community Areas (current)" open dataset (Socrata resource id cauq-8yn6; portal landing https://data.cityofchicago.org/Facilities-Geographic-Boundaries/Boundaries-Community-Areas-current-/cauq-8yn6). The 77 canonical Chicago community areas (Rogers Park, West Ridge, Uptown, Lincoln Square, ..., Edgewater). Resolves the community_area foreign key carried by every morie_datasets_chicago_crime() row.

Usage

morie_datasets_chicago_community_areas(
  offline = TRUE,
  geometry = FALSE,
  max_features = NULL,
  resource_id = NULL,
  paginate = FALSE,
  page_size = 1000L,
  max_pages = 200L,
  app_token = NULL
)

Arguments

offline

If TRUE (default), read the bundled fixture.

geometry

If TRUE and offline = FALSE, include the the_geom MultiPolygon.

max_features

Optional row cap.

resource_id

Optional view id override (default "sp34-6z76").

paginate

Logical; 3OO/3QQ opt-in pagination via LIMIT n OFFSET m.

page_size

Per-page row count when paginating.

max_pages

Safety net.

app_token

Optional Socrata app token (sent as X-App-Token).

Value

A data.frame with 5 attribute cols (offline) or 6 including the_geom (live, geometry = TRUE).

Details

SODA3-only (same filtered/derived-view caveat as Wards).

Offline mode reads a bundled 77-row attribute-only fixture (inst/extdata/chicago_community_areas.csv: 5 cols – area_numbe, community, area_num_1, shape_area, shape_len). The community column carries the official canonical name in ALL CAPS.

References

City of Chicago Data Portal, "Boundaries - Community Areas (current)" (cauq-8yn6).

Examples

df <- morie_datasets_chicago_community_areas(offline = TRUE)
head(df[, c("area_numbe", "community")])
#>   area_numbe      community
#> 1          1    ROGERS PARK
#> 2          2     WEST RIDGE
#> 3          3         UPTOWN
#> 4          4 LINCOLN SQUARE
#> 5          5   NORTH CENTER
#> 6          6      LAKE VIEW