
Generic Ontario CKAN dataset loader (by registry key)
Source:R/datasets_ontario_tps.R
morie_datasets_ontario_ckan_by_key.RdGeneric Ontario CKAN dataset loader (by registry key)
Arguments
- dataset_key
One of the keys in
morie_datasets_ontario_ckan_layers()(e.g."arsau_uof_main_records_2024").- offline
If
TRUE(default), read the included synthetic fixture. IfFALSE, hit the live Ontario CKAN datastore-dump endpoint.- resource_id
Optional CKAN resource_id override.
Examples
df <- morie_datasets_ontario_ckan_by_key("arsau_uof_main_records_2024",
offline = TRUE)
head(df)
#> IncidentYear BatchFileName PoliceServiceType
#> 1 2024 SYNTHETIC-FIXTURE-001 Municipal Police Service
#> 2 2024 SYNTHETIC-FIXTURE-002 Municipal Police Service
#> 3 2024 SYNTHETIC-FIXTURE-003 Provincial Police Service
#> 4 2024 SYNTHETIC-FIXTURE-004 Municipal Police Service
#> 5 2024 SYNTHETIC-FIXTURE-005 Provincial Police Service
#> PoliceService OPP_PoliceService_Region IncidentNumber
#> 1 Sample Regional Police Service SR-SYNTH-001
#> 2 Sample Regional Police Service SR-SYNTH-002
#> 3 OPP Central OPP-SYNTH-003
#> 4 Sample Regional Police Service SR-SYNTH-004
#> 5 OPP Eastern OPP-SYNTH-005
#> Date ApproximateTimeForceApplied LocationType_ResidentialBuilding
#> 1 2024-01-05 10:30:00 NA
#> 2 2024-03-12 14:15:00 1
#> 3 2024-06-20 22:45:00 NA
#> 4 2024-09-08 03:00:00 NA
#> 5 2024-11-30 18:20:00 NA
#> LocationType_NonResidentialBuilding LocationType_MotorVehicle
#> 1 NA NA
#> 2 NA NA
#> 3 NA 1
#> 4 NA NA
#> 5 1 NA
#> LocationType_OpenSpace LocationType_PublicTransportation ReportType TypeTeam
#> 1 1 NA Team Patrol
#> 2 NA NA Team Patrol
#> 3 NA NA Team Tactical
#> 4 1 NA Animal Patrol
#> 5 NA NA Team Patrol
#> NumberTeam Attire AssignmentType IncidentType
#> 1 2 Uniform General Patrol Weapon
#> 2 3 Uniform General Patrol Person
#> 3 4 Tactical Gear Tactical/Containment/Hostage Rescue Weapon
#> 4 1 Uniform General Patrol Animal
#> 5 2 Uniform General Patrol Person
#> InteractionType NumberIndiv NumberOtherOfficers
#> 1 Interaction with Individual(s) 1 2
#> 2 Interaction with Individual(s) 2 3
#> 3 Interaction with Individual(s) 1 4
#> 4 No-Individual Animal Only NA 1
#> 5 Interaction with Individual(s) 3 2
#> OfficerInvolvedInjuries_PhysicalInjuries
#> 1
#> 2
#> 3 Yes
#> 4
#> 5