MyNixOS website logo
Description

Access the 'City of Vancouver' Open Data API.

Wrapper around the 'City of Vancouver' Open Data API <https://opendata.vancouver.ca/api/v2/console> to simplify and standardize access to 'City of Vancouver' open data. Functionality to list the data catalogue and access data and geographic records.

VancouvR

CRAN_Status_Badge CRAN_Downloads_Badge R-CMD-check

VancouvR logo

VancouvR is an R wrapper around the City of Vancouver Open Data API. It allows transparent and reproducible access to the Vancouver Open Data Portal to facilitate data analysis and sharing of code.

The package caches downloaded data for the duration of the current session, so re-running code blocks will not result in repeated downloads. This speeds up the code, cuts down on unnecessary network traffic and reduces strain on the City of Vancouver Open Data infrastructure.

Reference

VancouverOpenData package reference

Installing the package

To install the latest release version of VancouvR from CRAN use

install.packages("VancouvR")

The development version of VancouvR is available from GitHub via

remotes::install_github("mountainmath/VancouvR")

API key

Smaller datasets can be accessed without an API key, but for larger datasets an API key is required. API keys are available after registering at the City of Vancouver Open Data Portal.

Setting the API key in the .Rprofile file via

options(VancouverOpenDataApiKey=<your api key>)

will ensure that it is automatically loaded and not exposed when you share your code.

Examples

Get a list of datasets relating to properties

library(VancouvR)

search_cov_datasets("properties")

Get the first 10 records of the property tax report for 2019 tax year.

get_cov_data(dataset_id = "property-tax-report",where="tax_assessment_year='2021'",rows=10)

Get metadata for the street trees dataset.

get_cov_metadata("street-trees")

Count the number of cherry trees by neighbourhood.

aggregate_cov_data("street-trees",where = "common_name LIKE 'CHERRY'", group_by = "neighbourhood_name")

Cite VancouvR

If you wish to cite VancouvR:

von Bergmann, J. VancouvR: ccess the 'City of Vancouver' Open Data API. v0.1.8.

A BibTeX entry for LaTeX users is

  @Manual{VancouvR,
    author = {Jens {von Bergmann}},
    title = {VancouvR: Access the 'City of Vancouver' Open Data API,
    year = {2024},
    note = {R package version 0.1.8},
    url = {https://mountainmath.github.io/VancouvR/},
  }
Metadata

Version

0.1.8

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows