All Projects → bcgov → bcdata

bcgov / bcdata

Licence: Apache-2.0 license
An R package for searching & retrieving data from the B.C. Data Catalogue

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to bcdata

tidyhydat
An R package to import Water Survey of Canada hydrometric data and make it tidy
Stars: ✭ 67 (-1.47%)
Mutual labels:  r-package, citz
bcmaps
An R package of map layers for British Columbia
Stars: ✭ 53 (-22.06%)
Mutual labels:  env, r-package
ckanext-bcgov
BC Data Catalogue source code, main ckan extension
Stars: ✭ 22 (-67.65%)
Mutual labels:  bcdc, citz
wqbc
An R package for water quality thresholds and index calculation for British Columbia
Stars: ✭ 16 (-76.47%)
Mutual labels:  env, r-package
MultiButton
A compact and easy to use event-driven button driver module. | 一个小巧易用的事件驱动按钮驱动模块.
Stars: ✭ 78 (+14.71%)
Mutual labels:  env
modeltime.resample
Resampling Tools for Time Series Forecasting with Modeltime
Stars: ✭ 12 (-82.35%)
Mutual labels:  r-package
irace
Iterated Racing for Automatic Algorithm Configuration
Stars: ✭ 26 (-61.76%)
Mutual labels:  r-package
netrankr
An R package for network centrality
Stars: ✭ 39 (-42.65%)
Mutual labels:  r-package
TDAstats
R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.
Stars: ✭ 26 (-61.76%)
Mutual labels:  r-package
BAS
BAS R package https://merliseclyde.github.io/BAS/
Stars: ✭ 36 (-47.06%)
Mutual labels:  r-package
jsonvalidate
✔️⁉️ Validate JSON
Stars: ✭ 43 (-36.76%)
Mutual labels:  r-package
gm
R Package for Music Score and Audio Generation
Stars: ✭ 116 (+70.59%)
Mutual labels:  r-package
easyclimate
Easy access to high-resolution daily climate data for Europe
Stars: ✭ 26 (-61.76%)
Mutual labels:  r-package
weathercan
R package for downloading weather data from Environment and Climate Change Canada
Stars: ✭ 83 (+22.06%)
Mutual labels:  r-package
opencage
🌐 R package for the OpenCage API -- both forward and reverse geocoding 🌐
Stars: ✭ 82 (+20.59%)
Mutual labels:  r-package
RNeXML
Implementing semantically rich NeXML I/O in R
Stars: ✭ 12 (-82.35%)
Mutual labels:  r-package
rreddit
𝐫⟋ Get Reddit data
Stars: ✭ 49 (-27.94%)
Mutual labels:  r-package
MAnorm2
MAnorm2 for Normalizing and Comparing ChIP-seq Samples
Stars: ✭ 15 (-77.94%)
Mutual labels:  r-package
dotenv validator
This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
Stars: ✭ 33 (-51.47%)
Mutual labels:  env
nflfastR
A Set of Functions to Efficiently Scrape NFL Play by Play Data
Stars: ✭ 268 (+294.12%)
Mutual labels:  r-package

bcdata

License R build status Codecov test coverage CRAN_Status_Badge CRAN Downloads cran checks img DOI DOI

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.

Reference

bcdata package 📦 home page and reference guide

Installation

You can install bcdata directly from CRAN:

install.packages("bcdata")

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

install.packages("remotes")

remotes::install_github("bcgov/bcdata")
library(bcdata)

Vignettes

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:

BCDC_KEY=your-api-key

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.

Citation

To cite bcdata in publications please use:

  Teucher et al., (2021). bcdata: An R package for searching and
  retrieving data from the B.C. Data Catalogue. Journal of Open Source
  Software, 6(61), 2927, https://doi.org/10.21105/joss.02927

A BibTeX entry for LaTeX users is

  @Article{,
    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},
  }

License

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

https://www.apache.org/licenses/LICENSE-2.0

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].