Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write gbif_download() function #1

Closed
peterdesmet opened this issue Nov 21, 2017 · 3 comments
Closed

Write gbif_download() function #1

peterdesmet opened this issue Nov 21, 2017 · 3 comments
Assignees

Comments

@peterdesmet
Copy link
Member

peterdesmet commented Nov 21, 2017

Usage:

gbif_download(
    taxa="https://raw.githubusercontent.com/trias-project/alien-plants-belgium/afbd2805de77afd79fb74669c403d40f1416661b/data/processed/taxon.csv",
    country="BE", # default
    output="../data/output/gbif_downloads.csv" # default
)

The script would:

  1. Verify and report errors the parameter checklist:
    • Can it be found
    • Is it a csv file
    • Is it a GitHub commit URL
    • Has the file a column gbif_nubKey
    • Does gbif_nubKey contain numbers only
  2. Verify and report errors for the option country:
    • Is it a valid ISO 3166-1 alpha-2
  3. Verify and report errors for the option output:
    • Does the file exist
  4. Use rgbif to trigger a download
  5. Write information to data/output/gbif_downloads.csv:
    • gbif_download_key: GBIF download UUID
    • input_checklist: checklist (parameter)
    • input_country: country (parameter)
@peterdesmet peterdesmet changed the title General idea for occurrence_download() function Write occurrence_download() function Nov 21, 2017
@peterdesmet peterdesmet changed the title Write occurrence_download() function Write gbif_download() function Nov 21, 2017
@peterdesmet
Copy link
Member Author

Note: function should be part of TrIAS R package, not this repository.

@damianooldoni
Copy link
Contributor

point 1,2,3 not present anymore in the pipeline. But I the checks have been written and I think they are still very useful while merging checklists.

@peterdesmet
Copy link
Member Author

Rather than a function, we opted to use basic R and rgbif functionality: https://github.com/trias-project/pipeline/blob/master/src/occurrences.Rmd. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants