Skip to contents

VPD's GeoDASH Open Data portal (https://geodash.vpd.ca/opendata/) has no automation API: every download requires a manual click- through of VPD's terms-of-use plus a popup-based file save per (year, neighbourhood) selection. Calling morie_vpd_download_instructions() prints the exact steps the user needs to follow to get a full-fidelity crime CSV that morie_datasets_vpd_crime can consume.

Usage

morie_vpd_download_instructions(to = NULL)

Arguments

to

Optional file path. If supplied, the instructions are ALSO written to that file (so the user can read them outside R). Default NULL = print to console only.

Value

Invisibly the instruction text (character vector, one line per element).

See also

morie_datasets_vpd_crime() for the loader that accepts the downloaded file.

Examples

morie_vpd_download_instructions()
#> ============================================================
#>   morie -- VPD GeoDASH crime data: how to get the full feed 
#> ============================================================
#> 
#> VPD's open-data portal at https://geodash.vpd.ca/opendata/ has
#> no automation API; you must download the file manually once.
#> Bundled 550-row sample is loaded for you by default.
#> 
#> ----- 1. Browser setup -----
#>   * Open https://geodash.vpd.ca/opendata/ in your browser.
#>   * Allow pop-ups for that page (the download triggers a popup).
#>   * Read + accept the disclaimer:
#>       'I have read and understood the disclaimer above.'
#> 
#> ----- 2. Pick the data scope -----
#>   * Year:          click '--All Years--' at the top of the list
#>                    (covers 2003 - present).
#>   * Neighbourhood: click '--All Neighbourhoods--' at the top
#>                    (all 24 incl. Musqueam + Stanley Park).
#>   * Click 'Download'.
#> 
#> ----- 3. The file you get -----
#>   * Filename: crimedata_csv_AllNeighbourhoods_AllYears.zip
#>   * Contains a single CSV:
#>       crimedata_csv_AllNeighbourhoods_AllYears.csv
#>   * Schema: 10 columns
#>       TYPE, YEAR, MONTH, DAY, HOUR, MINUTE,
#>       HUNDRED_BLOCK, NEIGHBOURHOOD, X, Y
#>     (X / Y are UTM Zone 10 N, NAD83 / EPSG:26910.)
#> 
#> ----- 4. Load it into morie -----
#> 
#>   # Option A: pass the zip path directly
#>   df <- morie_datasets_vpd_crime(
#>     zip_path     = '~/Downloads/crimedata_csv_AllNeighbourhoods_AllYears.zip',
#>     accept_terms = TRUE
#>   )
#> 
#>   # Option B: unzip yourself, then pass the CSV path
#>   df <- morie_datasets_vpd_crime(
#>     csv_path     = '~/Downloads/crimedata_csv_AllNeighbourhoods_AllYears.csv',
#>     accept_terms = TRUE
#>   )
#> 
#>   nrow(df)  # ~870,000 rows for All Years across All Neighbourhoods
#> 
#> ----- 5. Important interpretation caveats -----
#> 
#>   * 'Offence Against a Person' is INTENTIONALLY aggregated to
#>     protect PII. Do NOT try to disaggregate.
#>   * VPD locations are DELIBERATELY randomized (person crimes)
#>     or hundred-block (property crimes). Do NOT geocode rows.
#>   * VPD uses 'All Offence + Founded' reporting -- NOT comparable
#>     to Statistics Canada's UCR-MSO numbers.
#>   * VPD updates the feed every Sunday morning. Re-download to
#>     refresh; morie does not auto-pull.
#> 
#> See ?morie_datasets_vpd_crime for the full data-quality section.