
Calls for Service Attended (ASR-CS-TBL-003)
Source:R/datasets_tps_arcgis_hub_wrappers.R
morie_datasets_tps_calls_for_service_attended.RdToronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 46c7581a136445c78831acb657a4fb0d.
Usage
morie_datasets_tps_calls_for_service_attended(
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
This dataset provides a count of calls for service attended aggregated by division and neighbourhood.
Tags: ASR; TPS; Annual Statistical Report; Toronto Police; Calls for Service
Examples
# \donttest{
df <- try(morie_datasets_tps_calls_for_service_attended(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> INDEX_ EVENT_YEAR DIVISION_ORIGINAL DIVISION_FINAL HOOD_158
#> 1 301 2015 D51 D52 168
#> 2 302 2015 D51 D51 167
#> 3 303 2015 D51 D55 043
#> 4 304 2015 D51 D55 059
#> 5 305 2015 D51 D51 168
#> NEIGHBOURHOOD_158 EVENT_COUNT ObjectId
#> 1 Downtown Yonge East 17 1
#> 2 Church-Wellesley 5603 2
#> 3 Victoria Village 1 3
#> 4 Danforth East York 1 4
#> 5 Downtown Yonge East 8432 5
# }