Toronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 9a5c8a4fdfa54e7f97236a769b196f16.
Usage
morie_datasets_tps_2010_firs(
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.
Examples
# \donttest{
df <- try(morie_datasets_tps_2010_firs(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> CONTACTID TPS_PATROL_ZONE NATURE_OF_CONTACT CONTACT_DATE
#> 1 530607 541 Radio Call 2010.01.01
#> 2 530607 541 Radio Call 2010.01.01
#> 3 530607 541 Radio Call 2010.01.01
#> 4 530608 231 Bail Compliance Check-No Violation 2010.01.01
#> 5 530610 231 Bail Compliance Check-No Contact 2010.01.01
#> CONTACT_TIME CONTACT_YEAR AGE SEX BIRTH_PLACE SKIN_COLOUR
#> 1 17:09:00 2010 61 Male NA White
#> 2 17:09:00 2010 14 Male NA White
#> 3 17:09:00 2010 19 Female NA White
#> 4 15:50:00 2010 21 Female NA Black
#> 5 16:00:00 2010 17 Male NA Black
#> YEAR_MONTH_OF_BIRTH UNIQUE_PERSON_ID HOME_CITY HOME_PATROL_ZONE FID
#> 1 1948 MAY 613611 TORONTO 541 1
#> 2 1995 MAR 613612 TORONTO 541 2
#> 3 1990 FEB 613613 TORONTO 541 3
#> 4 1988 JAN 434966 TORONTO 231 4
#> 5 1992 FEB 101664 TORONTO 231 5
# }
