
Dispatched Calls by Division (ASR-CS-TBL-001)
Source:R/datasets_tps_arcgis_hub_wrappers.R
morie_datasets_tps_dispatched_calls_by_division.RdToronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 9cfcd6fe0d374f65afda69c4b9bdc60a.
Usage
morie_datasets_tps_dispatched_calls_by_division(
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 the dispatched calls by division, including some specific units such as PRIME, Parking and "Other". This data includes the command level at the time of reporting.
Tags: ASR; TPS; Annual Statistical Report; Toronto Police; Dispatched Calls
Examples
# \donttest{
df <- try(morie_datasets_tps_dispatched_calls_by_division(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> INDEX_ YEAR CATEGORY UNIT COMMAND COUNT_ ObjectId
#> 1 103 2016 Dispatched Calls 32 Division Area 38546 1
#> 2 104 2016 Dispatched Calls 33 Division Area 32056 2
#> 3 105 2016 Dispatched Calls 41 Division Area 41227 3
#> 4 106 2016 Dispatched Calls 42 Division Area 35954 4
#> 5 107 2016 Dispatched Calls 43 Division Area 37689 5
# }