Toronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 6288c8314c594bc9a384df2cf17f8474.
Usage
morie_datasets_tps_facilities(
format = "json",
where = "1=1",
max_features = NULL,
layer_idx = 0L,
offline = TRUE,
dest = NULL
)Arguments
- format
One of
"json"(default),"geojson","csv","shapefile","fgdb".- where
SoQL-style
WHEREfilter passed to FeatureServer?where=(default"1=1").- max_features
Optional cap on returned rows. Passed as
resultRecordCountto FeatureServer; ignored for binary formats.- layer_idx
Integer index of the FeatureServer layer to pull (default
0L, the first layer).- offline
Logical; if
TRUE, the hub_id is resolved via the included catalog (no network needed for the resolution step). DefaultTRUE– you can run this against the 71 catalog entries without network. Live data fetches always hit the network regardless of this argument; "offline" here only affects the hub_id -> FeatureServer URL lookup.- dest
Optional path for binary downloads (
format %in% c("shapefile", "fgdb")); defaults totempfile().
Value
A data.frame / GeoJSON list / file path; see
morie_datasets_tps_arcgis_hub_by_id() for per-format semantics.
Details
Police stations and other TPS facilities.
Tags: Police Facilities; TPS Facilities; Facilities
Examples
# \donttest{
df <- try(morie_datasets_tps_facilities(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> OBJECTID_1 FACILITY ORGANIZATION ADDRESS
#> 1 1 11 Division Toronto Police Services 2054 Davenport Road
#> 2 2 12 Division Toronto Police Services 200 Trethewey Drive
#> 3 3 13 Division Toronto Police Services 1435 Eglinton Avenue West
#> 4 4 14 Division Toronto Police Services 350 Dovercourt Road
#> 5 5 22 Division Toronto Police Services 3699 Bloor Street West
#> POSTAL_CODE LATITUDE LONGITUDE
#> 1 M6N 1C8 43.67107 -79.46083
#> 2 M6M 5E6 43.69458 -79.48688
#> 3 M6C 3Z4 43.69833 -79.43668
#> 4 M6J 3E3 43.65130 -79.42598
#> 5 M9A 1A2 43.64311 -79.52918
# }
