
TPS PSDP – Theft From Motor Vehicle
Source:R/datasets_tps_psdp.R
morie_datasets_tps_theft_from_motor_vehicle.RdTPS PSDP – Theft From Motor Vehicle
Usage
morie_datasets_tps_theft_from_motor_vehicle(
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
# \donttest{
df <- try(morie_datasets_tps_theft_from_motor_vehicle(max_features = 5L))
if (!inherits(df, "try-error")) head(df)
#> OBJECTID EVENT_UNIQUE_ID REPORT_DATE OCC_DATE
#> 1 1 GO-PSDP-SYNTH-TFMV-001 2024/01/02 00:00:00 2024/01/01 22:00:00
#> 2 2 GO-PSDP-SYNTH-TFMV-002 2024/04/15 08:00:00 2024/04/15 02:00:00
#> 3 3 GO-PSDP-SYNTH-TFMV-003 2024/08/22 12:00:00 2024/08/22 06:00:00
#> 4 4 GO-PSDP-SYNTH-TFMV-004 2025/01/05 14:00:00 2025/01/05 03:00:00
#> 5 5 GO-PSDP-SYNTH-TFMV-005 2025/04/30 09:00:00 2025/04/29 23:00:00
#> REPORT_YEAR REPORT_MONTH REPORT_DAY REPORT_DOY REPORT_DOW REPORT_HOUR
#> 1 2024 1 2 2 Tuesday 3
#> 2 2024 4 15 106 Monday 8
#> 3 2024 8 22 235 Thursday 12
#> 4 2025 1 5 5 Sunday 14
#> 5 2025 4 30 120 Wednesday 9
#> OCC_YEAR OCC_MONTH OCC_DAY OCC_DOY OCC_DOW OCC_HOUR DIVISION LOCATION_TYPE
#> 1 2024 1 1 1 Monday 22 D14 Parking Lots
#> 2 2024 4 15 106 Monday 2 D52 Streets
#> 3 2024 8 22 235 Thursday 6 D31 Apartment
#> 4 2025 1 5 5 Sunday 3 D55 House
#> 5 2025 4 29 119 Tuesday 23 D14 Apartment
#> PREMISES_TYPE UCR_CODE UCR_EXT OFFENCE CSI_CATEGORY HOOD_158
#> 1 Outside 2120 200 Theft From Motor Vehicle Theft Under 82
#> 2 Outside 2120 200 Theft From Motor Vehicle Theft Under 168
#> 3 Apartment 2120 200 Theft From Motor Vehicle Theft Under 73
#> 4 House 2120 200 Theft From Motor Vehicle Theft Under 1
#> 5 Apartment 2120 200 Theft From Motor Vehicle Theft Under 163
#> NEIGHBOURHOOD_158 HOOD_140 NEIGHBOURHOOD_140 LONG_WGS84
#> 1 Niagara 82 Niagara (82) -79.4029
#> 2 Downtown Yonge East 75 Church-Yonge Corridor (75) -79.3793
#> 3 Moss Park 73 Moss Park (73) -79.3705
#> 4 West Humber-Clairville 1 West Humber-Clairville (1) -79.5800
#> 5 Fort York-Liberty Village 82 Niagara (82) -79.3832
#> LAT_WGS84 x y
#> 1 43.6478 -79.4029 43.6478
#> 2 43.6532 -79.3793 43.6532
#> 3 43.6555 -79.3705 43.6555
#> 4 43.7400 -79.5800 43.7400
#> 5 43.6426 -79.3832 43.6426
# }