Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

bcgov/bcdata

Repository files navigation

LicenseCRAN_Status_BadgeCRAN Downloadscran checksimgDOIDOICodecov test coverageR-CMD-check

An R package 📦 for searching & retrieving data from theB.C. DataCatalogue.

  • 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 dataavailable through aWeb FeatureService

Note: Thebcdata package supports downloadingmost file types,including zip archives. It will do its best to identify and read datafrom zip files, however if there are multiple data files in the zip, ordata files thatbcdata doesn’t know how to import, it will fail. Ifyou encounter a file type in the B.C. Data Catalogue not currentlysupported bybcdata please file anissue.

Reference

bcdata package 📦 home page and referenceguide

Installation

You can installbcdata directly fromCRAN:

install.packages("bcdata")

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

install.packages("remotes")remotes::install_github("bcgov/bcdata")library(bcdata)

Vignettes

Methods forbcdc_promise

Thebcdc_query_geodata() returns an object of the classbcdc_promise. We have written an ever growing list methods for thisclass. You can use these methods directly on a object returned bybcdc_query_geodata(). Here are all the methods for thebcdc_promiseclass:

  • 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 wantto access records that are not publicly available (e.g., in DRAFT,waiting to be published). This can be done by authenticating with thecatalogue with an API key.

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

You can log in to the catalogue to obtain your API key, then store it asan environment variable in your.Renvironfile. The environmentvariable must be calledBCDC_KEY, set like this:

BCDC_KEY=your-api-key

This way, the relevant bcdata functions will read that key and use it toauthorize your calls to the catalogue, allowing you to access additionalrecords that you are authorized to see if you were logged into thecatalogue 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 anissue.

How to Contribute

If you would like to contribute to the package, please see ourCONTRIBUTINGguidelines.

Please note that this project is released with aContributor Code ofConduct.By participating in this project you agree to abide by its terms.

Citation

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  <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 maynot use this file except in compliance with the License. You may obtaina copy of the License at

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

Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.


This project was created using thebcgovr package.


[8]ページ先頭

©2009-2025 Movatter.jp