Skip to contents

Toronto PS ArcGIS Hub dataset wrapper. Thin dispatch to morie_datasets_tps_arcgis_hub_by_id() with the canonical hub item_id 0e7f95cb45704c8e8c9a05973422211c.

Usage

morie_datasets_tps_use_of_force_location_of_occurrences(
  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 WHERE filter passed to FeatureServer ?where= (default "1=1").

max_features

Optional cap on returned rows. Passed as resultRecordCount to 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). Default TRUE – 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 to tempfile().

Value

A data.frame / GeoJSON list / file path; see morie_datasets_tps_arcgis_hub_by_id() for per-format semantics.

Details

This table provides location information, aggregated to the division level.

Tags: RBDC; race; race based data

Examples

# \donttest{
df <- try(morie_datasets_tps_use_of_force_location_of_occurrences(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#>                  Type_of_Incident Location__Division_
#> 1 Reported Use of Force Incidents                  33
#> 2    Enforcement Action Incidents                  22
#> 3 Reported Use of Force Incidents                  41
#> 4 Reported Use of Force Incidents                  42
#> 5 Reported Use of Force Incidents                  43
#>   Perceived_Race_of_People_Involv Incident_Count ObjectId
#> 1                          Latino              0        1
#> 2            East/Southeast Asian            193        2
#> 3                          Latino              1        3
#> 4                          Latino              0        4
#> 5                          Latino              1        5
# }