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.
VancouverOpenData package reference
To install the latest release version of VancouvR
from CRAN use
The development version of VancouvR
is available from GitHub via
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.
Get a list of datasets relating to properties
Get the first 10 records of the property tax report for 2019 tax year.
Get metadata for the street trees dataset.
Count the number of cherry trees by neighbourhood.
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/},
}