Skip to contents

Phase 3DDD2. Loads VPD's open crime incident records. Three source modes:

Usage

morie_datasets_vpd_crime(
  offline = TRUE,
  zip_path = NULL,
  csv_path = NULL,
  max_features = NULL,
  accept_terms = FALSE
)

Arguments

offline

If TRUE (default) and zip_path/csv_path are NULL, reads the bundled 550-row sample.

zip_path

Optional path to a user-downloaded crimedata_csv_AllNeighbourhoods_AllYears.zip. Mutually exclusive with csv_path.

csv_path

Optional path to a pre-extracted CSV. Mutually exclusive with zip_path.

max_features

Optional row cap.

accept_terms

If reading from a user-supplied zip/csv, pass TRUE to silently acknowledge VPD's terms (else a warning surfaces them once per session).

Value

A data.frame with 10 columns.

Details

offline = TRUE (default)

Reads a bundled stratified 550-row sample (50 rows per TYPE x 11 categories) covering years 2003-2026 and all 25 VPD-defined neighbourhoods. Intended for tests + intro examples – NOT for analysis.

zip_path = "..."

Reads from a local copy of VPD's crimedata_csv_AllNeighbourhoods_AllYears.zip that the caller has downloaded themselves from https://geodash.vpd.ca/opendata/ (after accepting VPD's terms + conditions there).

csv_path = "..."

Reads from a pre-extracted CSV (skip the zip if the caller already has the CSV on disk).

The bundled sample is open-licensed under VPD's GeoDASH terms; the full feed requires manual T&C acceptance per VPD policy and there is no automation-friendly API. See morie_datasets_vpd_legal_disclaimer() for the full text.

Columns (10): TYPE, YEAR, MONTH, DAY, HOUR, MINUTE, HUNDRED_BLOCK, NEIGHBOURHOOD, X, Y. Coordinates are UTM Zone 10 N (NAD83 / EPSG:26910). For Offence-Against-a-Person incidents the location is deliberately randomized + offset per VPD's privacy policy.

Categories present in the sample:

  • Break and Enter Commercial

  • Break and Enter Residential/Other

  • Homicide

  • Mischief

  • Offence Against a Person (aggregated)

  • Other Theft

  • Theft from Vehicle

  • Theft of Bicycle

  • Theft of Vehicle

  • Vehicle Collision or Pedestrian Struck (with Fatality)

  • Vehicle Collision or Pedestrian Struck (with Injury)

Data quality + interpretation caveats (per VPD GeoDASH disclaimer)

  • Source: extracted from the PRIME-BC Police Records Management System (RMS); filtered + aggregated to comply with the BC Freedom of Information & Protection of Privacy Act (BC FIPPA).

  • Offence Against a Person is INTENTIONALLY aggregated to reduce re-identification risk. It bundles robbery, assault (incl. sexual assault, domestic assault), and other violent incidents EXCEPT Assaults Against Police. Sub-categories are deliberately NOT exposed; do not attempt to disaggregate this column.

  • Other Theft aggregates shoplifting, theft of personal property (over / under $5000), mail theft, and utilities theft.

  • Reporting method: 'All Offence' + 'Founded' (incidents the investigating officer determined did occur). This is NOT comparable to Statistics Canada's published numbers, which use 'UCR Survey' Most-Serious-Offence (MSO) scoring. Do not mix VPD GeoDASH totals with StatCan totals in the same denominator.

  • Location precision is deliberately reduced: person-crimes have their X/Y randomized to several blocks and offset to an intersection; no time/street-name is provided. Property-crimes are provided at the hundred-block level only. Never interpret a row's X/Y as the actual scene of the incident.

  • Crime classification + file status may change retroactively as investigations evolve. The dataset is a snapshot, not an archive of fact.

  • Update schedule: VPD refreshes the feed every Sunday morning. Cache locally for reproducible analysis.

  • Not a calls-for-service log: only incidents that passed the founded-categorization filter appear. Totals do not reflect total calls or complaints made to the VPD.

  • Liability disclaimer: VPD / Vancouver Police Board / City of Vancouver assume no liability for any decision made from this data. morie surfaces it as-is.

References

VPD GeoDASH Open Data, https://geodash.vpd.ca/opendata/.

Examples

df <- morie_datasets_vpd_crime(offline = TRUE)
nrow(df)              # 550
#> [1] 550
table(df$TYPE)
#> 
#>                             Break and Enter Commercial 
#>                                                     50 
#>                      Break and Enter Residential/Other 
#>                                                     50 
#>                                               Homicide 
#>                                                     50 
#>                                               Mischief 
#>                                                     50 
#>                               Offence Against a Person 
#>                                                     50 
#>                                            Other Theft 
#>                                                     50 
#>                                     Theft from Vehicle 
#>                                                     50 
#>                                       Theft of Bicycle 
#>                                                     50 
#>                                       Theft of Vehicle 
#>                                                     50 
#> Vehicle Collision or Pedestrian Struck (with Fatality) 
#>                                                     50 
#>   Vehicle Collision or Pedestrian Struck (with Injury) 
#>                                                     50 
table(df$NEIGHBOURHOOD)
#> 
#>                                       Arbutus Ridge Central Business District 
#>                         1                         8                       122 
#>                  Fairview        Grandview-Woodland          Hastings-Sunrise 
#>                        27                        36                        23 
#>  Kensington-Cedar Cottage                Kerrisdale                 Killarney 
#>                        27                         8                        18 
#>                 Kitsilano                   Marpole            Mount Pleasant 
#>                        26                        18                        35 
#>                  Oakridge       Renfrew-Collingwood                Riley Park 
#>                         8                        25                        16 
#>               Shaughnessy              South Cambie              Stanley Park 
#>                         6                         3                         1 
#>                Strathcona                    Sunset       Victoria-Fraserview 
#>                        44                        26                        16 
#>                  West End           West Point Grey 
#>                        44                        12