
TPS PSDP – Shooting and Firearm Discharges
Source:R/datasets_tps_psdp.R
morie_datasets_tps_shooting_firearm_discharges.RdTPS PSDP – Shooting and Firearm Discharges
Usage
morie_datasets_tps_shooting_firearm_discharges(
year = NULL,
max_features = NULL,
offline = TRUE,
layer_url = NULL
)Arguments
- year
Optional reporting year filter (applies an
OCC_YEAR = <year>WHERE clause whenoffline = FALSE).- max_features
Optional cap on returned rows (
offline = FALSEonly).- offline
If
TRUE(default), read the included synthetic fixture frominst/extdata/tps_mha_apprehensions_sample.csv(5 rows in the canonical TPS PSDP 22-column schema). IfFALSE, hit the TPS PSDP ArcGIS FeatureServer.- layer_url
Optional ArcGIS layer URL override.
Examples
df <- morie_datasets_tps_shooting_firearm_discharges(offline = TRUE)
head(df[, c("EVENT_TYPE", "DEATH", "INJURIES", "OCC_TIME_RANGE")])
#> EVENT_TYPE DEATH INJURIES OCC_TIME_RANGE
#> 1 Shooting No Yes Evening
#> 2 Shooting Yes Yes Late Night
#> 3 Firearm Discharge No No Evening
#> 4 Shooting No Yes Late Night
#> 5 Shooting Yes Yes Evening