Wraps the NYC OpenData "Borough Boundaries" feed (5 NYC
boroughs: Manhattan, Bronx, Brooklyn, Queens, Staten Island).
Used as the resolver for the arrest_boro (1-letter codes) /
boro_nm (full names) / patrol_borough_name foreign keys on
NYPD CJ datasets (3NN).
Usage
morie_datasets_nyc_boroughs(
offline = TRUE,
geometry = FALSE,
max_features = NULL,
resource_id = NULL,
mode = c("soda2", "soda3"),
paginate = FALSE,
page_size = 1000L,
max_pages = 200L,
app_token = NULL
)Arguments
- offline
If
TRUE(default), read the included fixture.- geometry
If
TRUEandoffline = FALSE, include thethe_geomMultiPolygon.- max_features
Optional row cap.
- resource_id
Optional view id override (default
"sp34-6z76").- mode
One of
"soda2"(default JSON resource endpoint) or"soda3"(SoQLqueryendpoint). 3AAA dual-mode dispatch.- 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).
Details
Attribute schema: borocode (string, "1"-"5"), boroname
(capitalised name), shape_area, shape_leng. Live mode also
returns the_geom MultiPolygon when geometry = TRUE.
Examples
df <- morie_datasets_nyc_boroughs(offline = TRUE)
df[, c("borocode", "boroname")]
#> borocode boroname
#> 1 1 Manhattan
#> 2 2 Bronx
#> 3 3 Brooklyn
#> 4 4 Queens
#> 5 5 Staten Island
