diff --git a/.Rbuildignore b/.Rbuildignore index 690d73f..283a542 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,5 @@ ^README\.html$ ^_pkgdown\.yaml$ ^CITATION\.cff$ +^make\.R$ +^data-raw$ diff --git a/.gitignore b/.gitignore index 1c06cbf..7159b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ inst/doc *.prj *.shp *.shx +data-raw data-raw/latam data-raw/wfo data-raw/wcvp diff --git a/CITATION.cff b/CITATION.cff deleted file mode 100644 index 71174ea..0000000 --- a/CITATION.cff +++ /dev/null @@ -1,27 +0,0 @@ -# ----------------------------------------------------------- -# CITATION file created with {cffr} R package, v0.5.0 -# See also: https://docs.ropensci.org/cffr/ -# ----------------------------------------------------------- - -cff-version: 1.2.0 -message: 'To cite package "plantRdata" in publications use:' -type: software -license: GPL-2.0-or-later -title: 'plantRdata: The Title of the Project' -version: 0.0.0.9000 -abstract: A paragraph providing a full description of the project (on several lines...) -authors: -- family-names: Lima - given-names: Renato - email: raflima@usp.br - orcid: https://orcid.org/0000-0002-1048-0138 -preferred-citation: - type: manual - title: 'plantRdata: An R package to ...' - authors: - - name: Lima Renato - year: '2024' - notes: R package version 0.0.0.9000 - url: https://github.com/LimaRAF/plantRdata -repository-code: https://github.com/LimaRAF/plantRdata -url: https://github.com/LimaRAF/plantRdata diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 719d61e..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,126 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), -version 2.1, available at -. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion). - -For answers to common questions about this code of conduct, see the FAQ at -. Translations are available at -. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0cbaeb2..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,271 +0,0 @@ -# Contributing to plantRdata - -First off, thanks for taking the time to contribute to `plantRdata`! - -All types of contributions are encouraged and valued. See the -[Table of contents](#table-of-contents) for different ways to help and details -about how this project handles them. Please make sure to read the relevant -section before making your contribution. It will make it a lot easier for us -maintainers and smooth out the experience for all involved. - - - -## Table of contents - -- [Code of conduct](#code-of-conduct) -- [Style guide](#style-guide) -- [Commit messages](#commit-messages) -- [Asking questions](#asking-questions) -- [Reporting bugs](#reporting-bugs) -- [Requesting features](#requesting-features) -- [Contributing code](#contributing-code) - - - -## Code of conduct - -This project is released with a -[Contributor Code of Conduct](https://github.com/LimaRAF/plantRdata/blob/master/CODE_OF_CONDUCT.md). -By participating, you are expected to uphold this code. Please report -unacceptable behavior to . - - - -## Style guide - -We use the [Tidyverse style guide](https://style.tidyverse.org/) for writing R -code. Functions are documented with the -[roxygen2](https://roxygen2.r-lib.org/articles/roxygen2.html) syntax. -`plantRdata` uses the `lower_snake_case`. - - - -## Commit messages - -If you want to contribute by commiting changes, please try to use the -[Conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) -specification. - - - -## Asking questions - -Before you ask a question, it is best to search for existing -[Issues](https://github.com/LimaRAF/plantRdata/issues) that might help -you. In case you have found a suitable issue and still need clarification, you -can write your question in this issue. - -If you then still feel the need to ask a question and need clarification, we -recommend the following: - -- Open a new [Issue](https://github.com/LimaRAF/plantRdata/issues/new). -- Use the template [other_issue.md](https://github.com/LimaRAF/plantRdata/blob/master/.github/ISSUE_TEMPLATE/other_issue.md). -- Provide as much context as you can about what you're running into. -- Provide project and platform versions (paste the output of `sessionInfo()`). - -We will then take care of the issue as soon as possible. - - - -## Reporting bugs - - - -### Before submitting a bug report - -A good bug report shouldn't leave others needing to chase you up for more -information. Therefore, we ask you to investigate carefully, collect information -and describe the issue in detail in your report. Please complete the following -steps in advance to help us fix any potential bug as fast as possible. - -- Make sure that you are using the latest version of `plantRdata`. -- Determine if your bug is really a bug and not an error on your side. -- To see if other users have experienced (and potentially already solved) the -same issue you are having, check if there is not already a bug report existing -for your bug or error in the [bug tracker](https://github.com/LimaRAF/plantRdata/issues?q=label%3Abug). - - - -### How do I submit a bug report? - -We use [GitHub Issues](https://github.com/LimaRAF/plantRdata/issues) to -track bugs and errors. If you run into an issue with the project: - -- Open a new [Issue](https://github.com/LimaRAF/plantRdata/issues/new). -- Use the template [bug_report.md](https://github.com/LimaRAF/plantRdata/blob/master/.github/ISSUE_TEMPLATE/bug_report.md). -- Explain the behavior you would expect and the actual behavior. -- Please provide as much context as possible and describe the -*reproduction steps* that someone else can follow to recreate the issue on -their own. This usually includes your code with a reproducible example. - -We will then take care of the issue as soon as possible. - - - -## Requesting features - - - -### Before requesting a feature - -- Make sure that you are using the latest version of `plantRdata`. -- Read the [documentation](https://github.com/LimaRAF/plantRdata/) -carefully and find out if the functionality is already covered. -- Perform a [search](https://github.com/LimaRAF/plantRdata/issues) to -see if this enhancement has already been suggested. If it has, add a comment to -the existing issue instead of opening a new one. - - - -### How do I submit a feature request? - -Feature requests are tracked as -[GitHub Issues](https://github.com/LimaRAF/plantRdata/issues). - -- Open a new [Issue](https://github.com/LimaRAF/plantRdata/issues/new). -- Use the template [feature_request.md](https://github.com/LimaRAF/plantRdata/blob/master/.github/ISSUE_TEMPLATE/feature_request.md). -- Provide a clear and descriptive title for the issue to identify the suggestion. -- Provide a step-by-step description of the suggested enhancement in as -many details as possible. -- Explain why this enhancement would be useful to most `plantRdata` users. - -We will then take care of the issue as soon as possible. - - - -## Contributing code - - - -### General workflow - -We use the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) -to collaborate on this project: - - -1. [Fork](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) -this repository using the GitHub interface. -1. [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) -your fork using `git clone fork-url` (replace `fork-url` by the URL of your fork). -Alternatively, open RStudio IDE and create a New Project from Version Control. -1. Create a new branch w/ `git checkout -b branch-name` (replace `branch-name` -by the name of your new branch). -1. Make your contribution (see below for examples). -1. Stage (`git add`) and commit (`git commit`) your changes as often as necessary -1. Push your changes to GitHub w/ `git push origin branch-name`. -3. Submit a [Pull Request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-a-pull-request) on the [original repo](https://github.com/LimaRAF/plantRdata/compare). - -We will then review the PR as soon as possible. - - - -### Improve documentation - - - -#### Editing the README - -If you want to contribute by improving the README, please edit the `README.Rmd` -(not the `README.md`). Do not forget to update the `README.md` by running: - -```r -rmarkdown::render("README.Rmd") -``` - - - -#### Editing vignettes - -If you want to contribute by editing an existing vignette, just edit the -corresponding `Rmd` file stored in the `vignettes/` folder. - -If you want to contribute by adding a new vignette, create a new `Rmd` file in -the `vignettes/` folder and add the following header: - -```yaml ---- -title: "Vignette Title" -output: rmarkdown::html_vignette -vignette: > - %\VignetteIndexEntry{Vignette Title} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- -``` - -If you use a new external dependency, do not forget to add it in the `DESCRIPTION` -file under the section `Suggests` (only if this package is not already listed -under the section `Imports`). - -Check the integrity of the package with: - -```r -devtools::check() -``` - - - -#### Editing function documentation - -If you want to contribute by improving the documentation of a function, open -the corresponding file in the `R/` folder and edit lines starting with `#'` -([roxygen2](https://roxygen2.r-lib.org/articles/roxygen2.html) syntax). - -Update the documentation (`Rd` files in the `man/` folder) by running: - -```r -devtools::document() -``` - -If you use a new external dependency in the example section, do not forget to -add it in the `DESCRIPTION` file under the section `Imports` (only if this -package is not already listed). - -Check the integrity of the package with: - -```r -devtools::check() -``` - - - -### Fix bug - -If you want to contribute by improving the code of a function, open and edit -the corresponding file in the `R/` folder. - -Check the integrity of the package with: - -```r -devtools::check() -``` - -Do not forget to adapt the -[unit tests](https://r-pkgs.org/testing-basics.html#introducing-testthat) for -the function by editing the corresponding file stored in the `tests/testthat/` -folder. We use the package [`testthat`](https://testthat.r-lib.org/) to -implement unit tests. - -Check your tests by running: - -```r -devtools::test() -``` - - - -### New feature - -If you want to contribute by submitting a new feature, please follow this -workflow: - -1. Create a new `R` file in the folder `R/`. -2. Implement the code of the function. -3. Document your function w/ the [roxygen2](https://roxygen2.r-lib.org/articles/roxygen2.html) syntax. -4. If necessary, add additional dependencies in the `DESCRIPTION` file. -5. Update the package documentation w/ `devtools::document()`. -6. Create a new `R` file in the folder `tests/testthat/`. -7. Implement [unit tests](https://r-pkgs.org/testing-basics.html#introducing-testthat) for the new function. -8. Check the integrity of the package w/ `devtools::check()`. - -**Thanks for your contribution!** diff --git a/DESCRIPTION b/DESCRIPTION index 239851e..251e747 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plantRdata Type: Package -Title: Accessory Data for Package plantR +Title: Accessory Datasets for Package plantR Version: 0.0.0.9000 Authors@R: c( person(given = "Renato A.", @@ -13,8 +13,8 @@ Authors@R: c( role = c("aut"), email = "andreasancheztapia@gmail.com", comment = c(ORCID = "0000-0002-3521-4338"))) -Description: Creates reproducible datasets and maps for use by package - plantR, a package for managing records from biological collections +Maintainer: Renato A. Ferreira de Lima +Description: Creates reproducible datasets and maps for use by package plantR, a package for managing records from biological collections. URL: https://github.com/LimaRAF/plantRdata BugReports: https://github.com/LimaRAF/plantRdata/issues License: GPL (>= 3) @@ -27,3 +27,7 @@ Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 VignetteBuilder: knitr +Depends: + R (>= 2.10) +LazyData: true +LazyDataCompression: xz diff --git a/NAMESPACE b/NAMESPACE index 6ae9268..0509c99 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,2 +1,7 @@ # Generated by roxygen2: do not edit by hand +importFrom(httr,GET) +importFrom(httr,content) +importFrom(rvest,html_element) +importFrom(rvest,html_text) +importFrom(rvest,html_text2) diff --git a/README.Rmd b/README.Rmd index 8c703ec..af6cb04 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,24 +18,19 @@ plantRdata -[![CRAN status](https://www.r-pkg.org/badges/version/plantRdata)](https://CRAN.R-project.org/package=plantRdata) + [![R CMD Check](https://github.com/LimaRAF/plantRdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/R-CMD-check.yaml) [![Website](https://github.com/LimaRAF/plantRdata/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/pkgdown.yaml) [![Test coverage](https://github.com/LimaRAF/plantRdata/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/LimaRAF/plantRdata/branch/master/graph/badge.svg)](https://codecov.io/gh/LimaRAF/plantRdata) -[![License: GPL (>= 2)](https://img.shields.io/badge/License-GPL%20%28%3E%3D%202%29-blue.svg)](https://choosealicense.com/licenses/gpl-2.0/) + +[![License: GPL (>= 3)](https://img.shields.io/badge/License-GPL%20%28%3E%3D%203%29-blue.svg)](https://choosealicense.com/licenses/gpl-3.0/)

Overview
- • Features
Installation
- • Get started
- • Citation
- • Contributing
- • Acknowledgments
References

@@ -43,17 +38,23 @@ plantRdata + -[![CRAN -status](https://www.r-pkg.org/badges/version/plantRdata)](https://CRAN.R-project.org/package=plantRdata) [![R CMD Check](https://github.com/LimaRAF/plantRdata/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/R-CMD-check.yaml) [![Website](https://github.com/LimaRAF/plantRdata/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/pkgdown.yaml) [![Test coverage](https://github.com/LimaRAF/plantRdata/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/LimaRAF/plantRdata/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/LimaRAF/plantRdata/branch/master/graph/badge.svg)](https://codecov.io/gh/LimaRAF/plantRdata) + [![License: GPL (\>= -2)](https://img.shields.io/badge/License-GPL%20%28%3E%3D%202%29-blue.svg)](https://choosealicense.com/licenses/gpl-2.0/) +3)](https://img.shields.io/badge/License-GPL%20%28%3E%3D%203%29-blue.svg)](https://choosealicense.com/licenses/gpl-3.0/)

Overview
• -Features
Installation
• -Get started
• -Long-form documentations
• -Citation
• -Contributing
• -Acknowledgments
References

## Overview -This is a data package that creates the taxonomic datasets and maps to -be more easily used by the R package plantR -(). +This is a data package that compiles, edits and redistributes relatively +large taxonomic datasets and maps that are currently used by the R +package `plantR` (). These datasets +are used for the validation of taxonomic and geographic information +associated to species occurrence records. -## Features +Currently, `plantRdata` provides processed datasets from the following +sources: -The main purpose of `plantRdata` is to… **{{ DESCRIBE THE MAIN FEATURES -}}** +- [World Flora Online](https://www.worldfloraonline.org/) +- [World Checklist of Vascular Plants](https://powo.science.kew.org/) +- [Global Biodiversity Information Facility](https://www.gbif.org/) + - Only the kingdoms Plantae, Fungi and Animalia are currently provided + +Please read the documentation of each dataset for further details (e.g. +`?wfoNames`) on dataset content, processing, orginal source and last +update. ## Installation @@ -61,45 +63,21 @@ Then you can attach the package `plantRdata`: library("plantRdata") ``` -## Get started - -For an overview of the main features of `plantRdata`, please read the -[Get -started](https://LimaRAF.github.io/plantRdata/articles/plantRdata.html) -vignette. - -## Long-form documentations - -`plantRdata` provides **{{ NUMBER OF VIGNETTES }}** vignettes to learn -more about the package: - -- the [Get - started](https://LimaRAF.github.io/plantRdata/articles/plantRdata.html) - vignette describes the core features of the package -- **{{ LIST ADDITIONAL VIGNETTES }}** - -## Citation - -Please cite `plantRdata` as: - -> Lima Renato (2024) plantRdata: An R package to **{{ TITLE }}**. R -> package version 0.0.0.9000. - -## Contributing - -All types of contributions are encouraged and valued. For more -information, check out our [Contributor -Guidelines](https://github.com/LimaRAF/plantRdata/blob/main/CONTRIBUTING.md). - -Please note that the `plantRdata` project is released with a -[Contributor Code of -Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). -By contributing to this project, you agree to abide by its terms. +## References -## Acknowledgments +This package does not generate new information. It only provide +processed snapshots of the datasets it compiles. So, we kindly ask you +to read and cite the original data providers: -**{{ OPTIONAL SECTION }}** +> Borsch, T., Berendsohn, W., Dalcin, E., et al. (2020). World Flora +> Online: Placing taxonomists at the heart of a definitive and +> comprehensive global resource on the world’s plants. Taxon, 69(6): +> 1311-1341. -## References +> Govaerts, R., Nic Lughadha, E., Black, N. et al. (2021). The World +> Checklist of Vascular Plants, a continuously updated resource for +> exploring global plant diversity. Sci. Data 8: 215. +> -**{{ OPTIONAL SECTION }}** +> GBIF Secretariat (2023). GBIF Backbone Taxonomy. Checklist dataset. +> accessed via GBIF.org.