MyNixOS website logo

Search and Retrieve Data from the BC Data Catalogue.

Search, query, and download tabular and 'geospatial' data from the British Columbia Data Catalogue (<>). Search catalogue data records based on keywords, data licence, sector, data format, and B.C. government organization. View metadata directly in R, download many data formats, and query 'geospatial' data available via the B.C. government Web Feature Service ('WFS') using 'dplyr' syntax.


License CRAN_Status_Badge CRANDownloads cranchecks img DOI DOI Codecov testcoverage R-CMD-check

An R package 📦 for searching & retrieving data from the B.C. Data Catalogue.

  • bcdc_browse() - Open the catalogue in your default browser
  • bcdc_search() - Search records in the catalogue
  • bcdc_search_facets() - List catalogue facet search options
  • bcdc_get_record() - Print a catalogue record
  • bcdc_tidy_resources() - Get a data frame of resources for a record
  • bcdc_get_data() - Get catalogue data
  • bcdc_query_geodata() - Get & query catalogue geospatial data available through a Web Feature Service

Note: The bcdata package supports downloading most file types, including zip archives. It will do its best to identify and read data from zip files, however if there are multiple data files in the zip, or data files that bcdata doesn’t know how to import, it will fail. If you encounter a file type in the B.C. Data Catalogue not currently supported by bcdata please file an issue.


bcdata package 📦 home page and reference guide


You can install bcdata directly from CRAN:


To install the development version from GitHub, use the remotes package:




Methods for bcdc_promise

The bcdc_query_geodata() returns an object of the class bcdc_promise. We have written an ever growing list methods for this class. You can use these methods directly on a object returned by bcdc_query_geodata(). Here are all the methods for the bcdc_promise class:

  • as_tibble
  • collect
  • filter
  • head
  • mutate
  • names
  • print
  • select
  • show_query
  • tail

BCDC Authentication

If you are an authorized editor of the B.C. Data Catalogue you may want to access records that are not publicly available (e.g., in DRAFT, waiting to be published). This can be done by authenticating with the catalogue with an API key.

Important Note:Your API key is like a password and you must take care to keep it private. Do not share it, and be careful to not include it in any scripts or accidentally commit it to GitHub.

You can log in to the catalogue to obtain your API key, then store it as an environment variable in your .Renviron file. The environment variable must be called BCDC_KEY, set like this:


This way, the relevant bcdata functions will read that key and use it to authorize your calls to the catalogue, allowing you to access additional records that you are authorized to see if you were logged into the catalogue web interface. Functions that benefit from this are:

  • bcdc_search()
  • bcdc_list()
  • bcdc_get_record()
  • bcdc_get_data()

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

How to Contribute

If you would like to contribute to the package, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


To cite package 'bcdata' in publications use:

  Teucher AC, Albers SJ, Hazlitt SL (2021). "bcdata: An R package for
  searching and retrieving data from the B.C. Data Catalogue." _Journal
  of Open Source Software_, *6*(61), 2927. doi:10.21105/joss.02927

A BibTeX entry for LaTeX users is

    doi = {10.21105/joss.02927},
    year = {2021},
    publisher = {The Open Journal},
    volume = {6},
    number = {61},
    pages = {2927},
    author = {Andrew C. Teucher and Sam J. Albers and Stephanie L. Hazlitt},
    title = {bcdata: An R package for searching and retrieving data from the B.C. Data Catalogue},
    journal = {Journal of Open Source Software},


Copyright 2018 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This project was created using the bcgovr package.






Platforms (75)

    FreeBSD 13
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-freebsd13
  • 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-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows