
Arrests and Strip Searches (RBDC-ARR-TBL-001)
Source:R/datasets_tps_arcgis_hub_wrappers.R
morie_datasets_tps_arrests_and_strip_searches.RdToronto PS ArcGIS Hub dataset wrapper. Thin dispatch to
morie_datasets_tps_arcgis_hub_by_id() with the canonical
hub item_id 899f1b3b047c47659a9843e9c5858269.
Usage
morie_datasets_tps_arrests_and_strip_searches(
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 includes information related to all arrests and strip searches.
Tags: RBDC; race; race based data
Examples
# \donttest{
df <- try(morie_datasets_tps_arrests_and_strip_searches(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> Arrest_Year Arrest_Month EventID ArrestID PersonID Perceived_Race Sex
#> 1 2020 July-Sept 1005907 6017884 326622 White M
#> 2 2020 July-Sept 1014562 6056669 326622 White M
#> 3 2020 Oct-Dec 1029922 6057065 326622 Unknown or Legacy M
#> 4 2021 Jan-Mar 1052190 6029059 327535 Black M
#> 5 2021 Jan-Mar 1015512 6040372 327535 South Asian M
#> Age_group__at_arrest_ Youth_at_arrest__under_18_years ArrestLocDiv
#> 1 Aged 35 to 44 years Not a youth 54
#> 2 Aged 35 to 44 years Not a youth 54
#> 3 Aged 35 to 44 years Not a youth 54
#> 4 Aged 25 to 34 years Not a youth XX
#> 5 Aged 25 to 34 years Not a youth XX
#> StripSearch Booked Occurrence_Category
#> 1 0 1 Assault & Other crimes against persons
#> 2 0 1 Assault & Other crimes against persons
#> 3 0 1 Assault & Other crimes against persons
#> 4 0 0 Harassment/Threatening
#> 5 0 1 FTA/FTC/Compliance Check/Parollee
#> Actions_at_arrest___Concealed_i Actions_at_arrest___Combative__
#> 1 0 0
#> 2 0 0
#> 3 0 0
#> 4 0 0
#> 5 0 0
#> Actions_at_arrest___Resisted__d Actions_at_arrest___Mental_inst
#> 1 0 0
#> 2 0 0
#> 3 0 0
#> 4 0 0
#> 5 0 0
#> Actions_at_arrest___Assaulted_o Actions_at_arrest___Cooperative
#> 1 0 1
#> 2 0 0
#> 3 0 0
#> 4 0 0
#> 5 0 0
#> SearchReason_CauseInjury SearchReason_AssistEscape
#> 1 NA NA
#> 2 NA NA
#> 3 NA NA
#> 4 NA NA
#> 5 NA NA
#> SearchReason_PossessWeapons SearchReason_PossessEvidence ItemsFound ObjectId
#> 1 NA NA NA 1
#> 2 NA NA NA 2
#> 3 NA NA NA 3
#> 4 NA NA NA 4
#> 5 NA NA NA 5
# }