{"id":14066626,"url":"https://github.com/bcgov/bcdata","last_synced_at":"2025-04-04T08:08:46.616Z","repository":{"id":41947554,"uuid":"162173874","full_name":"bcgov/bcdata","owner":"bcgov","description":"An R package for searching \u0026 retrieving data from the B.C. Data Catalogue","archived":false,"fork":false,"pushed_at":"2025-03-26T17:48:55.000Z","size":22311,"stargazers_count":83,"open_issues_count":30,"forks_count":13,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-27T18:05:12.728Z","etag":null,"topics":["bcdc","citz","data-science","env","r","r-package","rstats"],"latest_commit_sha":null,"homepage":"https://bcgov.github.io/bcdata","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcgov.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-17T18:33:41.000Z","updated_at":"2025-03-26T17:40:23.000Z","dependencies_parsed_at":"2024-08-13T07:11:18.603Z","dependency_job_id":"1fbfc24c-3a75-48aa-b467-d67652fec4c8","html_url":"https://github.com/bcgov/bcdata","commit_stats":{"total_commits":1092,"total_committers":25,"mean_commits":43.68,"dds":"0.48351648351648346","last_synced_commit":"937140b831f55de7e65f8a54dcab4a597c8a1961"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Fbcdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Fbcdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Fbcdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcgov%2Fbcdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcgov","download_url":"https://codeload.github.com/bcgov/bcdata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247138224,"owners_count":20890010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcdc","citz","data-science","env","r","r-package","rstats"],"created_at":"2024-08-13T07:05:11.512Z","updated_at":"2025-04-04T08:08:46.591Z","avatar_url":"https://github.com/bcgov.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput:\n  github_document:\nhtml_preview: true\n---\n\n\u003c!--\nCopyright 2018 Province of British Columbia\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, \nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n--\u003e\n\n\n\n```{r setup, echo = FALSE, warning = FALSE, message = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/\"\n)\nlibrary(bcdata)\n```\n\n\n# bcdata \u003ca href='https://bcgov.github.io/bcdata/'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"139\" /\u003e\u003c/a\u003e\n\n\n\n\u003c!-- badges: start --\u003e\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/license/apache-2-0)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/bcdata)](https://cran.r-project.org/package=bcdata) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/bcdata?color=brightgreen)](https://CRAN.R-project.org/package=bcdata) [![cran checks](https://cranchecks.info/badges/worst/bcdata)](https://CRAN.R-project.org/web/checks/check_results_bcdata.html)\n[![img](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02927/status.svg)](https://doi.org/10.21105/joss.02927)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4737824.svg)](https://doi.org/10.5281/zenodo.4737824)\n[![Codecov test coverage](https://codecov.io/gh/bcgov/bcdata/branch/main/graph/badge.svg)](https://app.codecov.io/gh/bcgov/bcdata?branch=main)\n[![R-CMD-check](https://github.com/bcgov/bcdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bcgov/bcdata/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nAn R package 📦 for searching \u0026 retrieving data from the [B.C. Data Catalogue]( https://catalogue.data.gov.bc.ca).\n\n- `bcdc_browse()` - Open the catalogue in your default browser\n- `bcdc_search()` - Search records in the catalogue\n- `bcdc_search_facets()` - List catalogue facet search options\n- `bcdc_get_record()` - Print a catalogue record\n- `bcdc_tidy_resources()` - Get a data frame of resources for a record\n- `bcdc_get_data()` - Get catalogue data\n- `bcdc_query_geodata()` - Get \u0026 query catalogue geospatial data available through a [Web Feature Service](https://en.wikipedia.org/wiki/Web_Feature_Service)\n\n**Note:** The `bcdata` package supports downloading _most_ file types, including zip archives. It will do its best to identify and read data from\nzip 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. \nIf you encounter a file type in the B.C. Data Catalogue not currently supported by `bcdata` please file an [issue](https://github.com/bcgov/bcdata/issues/). \n\n### Reference\n[bcdata package 📦 home page and reference guide](https://bcgov.github.io/bcdata/)\n\n### Installation\nYou can install `bcdata` directly from [CRAN](https://cran.r-project.org/package=bcdata): \n\n```{r eval=FALSE}\ninstall.packages(\"bcdata\")\n```\n\nTo install the development version from GitHub, use the [remotes](https://cran.r-project.org/package=remotes) package:\n\n```{r eval=FALSE}\ninstall.packages(\"remotes\")\n\nremotes::install_github(\"bcgov/bcdata\")\nlibrary(bcdata)\n```\n\n\n### Vignettes\n\n- [Get Started with bcdata](https://bcgov.github.io/bcdata/articles/bcdata.html)\n- [Querying Spatial Data with bcdata](https://bcgov.github.io/bcdata/articles/efficiently-query-spatial-data-in-the-bc-data-catalogue.html)\n- [Exploring Silviculture Data with bcdata](https://bcgov.github.io/bcdata/articles/explore-silviculture-data-using-bcdata.html)\n\n### Methods for `bcdc_promise`\n\nThe `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:\n\n```{r echo=FALSE, results='asis'}\nbcdc_methods \u003c- methods(class = \"bcdc_promise\")\nbcdc_methods \u003c- sort(attributes(bcdc_methods)$info[,c(\"generic\"), ])\n\ncat(paste0(\"- `\", bcdc_methods, \"`\", collapse = \"\\n\"))\n```\n\n\n### BCDC Authentication\n\nIf you are an authorized editor of the B.C. Data Catalogue you may want to\naccess records that are not publicly available (e.g., in DRAFT, waiting to be\npublished). This can be done by authenticating with the catalogue with an API\nkey.\n\n_**Important Note:**_ *Your API key is like a password and you must take care to\nkeep it private. Do not share it, and be careful to not include it in any\nscripts or accidentally commit it to GitHub.*\n\nYou can log in to the catalogue to obtain your API key, then store it as an\nenvironment variable in your [`.Renviron` file](https://rstats.wtf/r-startup.html#renviron). \nThe environment variable must be called `BCDC_KEY`, set like this:\n\n```\nBCDC_KEY=your-api-key\n```\n\nThis way, the relevant bcdata functions will read that key and use it to\nauthorize your calls to the catalogue, allowing you to access additional records\nthat you are authorized to see if you were logged into the catalogue web\ninterface. Functions that benefit from this are:\n\n- `bcdc_search()`\n- `bcdc_list()`\n- `bcdc_get_record()`\n- `bcdc_get_data()`\n\n### Getting Help or Reporting an Issue\n\nTo report bugs/issues/feature requests, please file an [issue](https://github.com/bcgov/bcdata/issues/).\n\n### How to Contribute\n\nIf you would like to contribute to the package, please see our \n[CONTRIBUTING](https://github.com/bcgov/bcdata/blob/master/CONTRIBUTING.md) guidelines.\n\nPlease note that this project is released with a [Contributor Code of Conduct](https://github.com/bcgov/bcdata/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n### Citation\n```{r, echo=FALSE, comment=\"\"}\ncitation(\"bcdata\")\n```\n\n\n### License\n\nCopyright 2018 Province of British Columbia\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations under the License.\n\n---\n*This project was created using the [bcgovr](https://github.com/bcgov/bcgovr) package.* \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgov%2Fbcdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcgov%2Fbcdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcgov%2Fbcdata/lists"}