odkc2020 | R Documentation |
Download all ODKC data including attachments
Load existing nesting records from WAStD: load only a minimal set of source, source ID, QA status to determine later what to create / update / skip:
does not exist in WAStD: create (POST)
exists in WAStD with status "new": update (PATCH)
exists in WAStD with status higher than "new": skip (and message)
Make (transform) ODKC to WAStD data
Load transformed data into WAStD's API (create/update/skip)
No QA
odkc2020()
## Not run: wastdr::wastdr_setup( api_url = Sys.getenv("WASTDR_API_DEV_URL"), api_token = Sys.getenv("WASTDR_API_DEV_TOKEN") ) wastdr::wastdr_setup( api_url = Sys.getenv("WASTDR_API_TEST_URL"), api_token = Sys.getenv("WASTDR_API_TEST_TOKEN") ) wastdr::wastdr_setup( api_url = Sys.getenv("WASTDR_API_URL"), api_token = Sys.getenv("WASTDR_API_TOKEN") ) Sys.setenv(ODKC_IMPORT_UPDATE_EXISTING = TRUE) Sys.setenv(ODKC_IMPORT_UPDATE_EXISTING = FALSE) Sys.setenv(ODKC_IMPORT_UPLOAD_MEDIA = TRUE) Sys.setenv(ODKC_IMPORT_UPLOAD_MEDIA = FALSE) Sys.setenv(ODKC_DOWNLOAD = TRUE) # Dl media files Sys.setenv(ODKC_DOWNLOAD = FALSE) library(etlTurtleNesting) library(wastdr) library(drake) odkc2020() visNetwork::visSave(vis_drake_graph(odkc2020()), "drake_graph.html") drake::vis_drake_graph(odkc2020()) drake::clean() drake::clean("wastd_users") # after updating WAStD user aliases drake::clean("upload_to_wastd") drake::clean("odkc_up") drake::clean("upload_to_wastd") drake::make(plan = odkc2020(), targets = c("upload_to_wastd")) drake::make(odkc2020(), lock_envir = FALSE) deps_code(quote(knitr_in("doc/qa_sites.Rmd"))) deps_code(quote(knitr_in("doc/qa_users.Rmd"))) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.