options(rmarkdown.html_vignette.check_title = FALSE)
After setting up wastdr
's authentication in vignette "Setup",
we can now retrieve data using wastdr::wastd_GET()
to send GET
requests to the WAStD
API.
This vignette shows examples of retrieving and parsing data from all existing WAStD API endpoints. The intent of this vignette is to serve as a starting point
See vignette "get-tsc" for examples of the Threatened Species and Communities side.
library(wastdr) library(dplyr) library(leaflet) library(listviewer) library(ggplot2)
You can download all the Turtle data from WAStD in one step. Be warned, this step will run for about half an hour.
wastd_data <- wastdr::download_wastd_turtledata()
wastdr
contains a small sample of the above for demonstration purposes.
data("wastd_data", package = "wastdr")
wastd_data
comes with its own print method:
wastd_data
Read the source code of wastdr::download_wastd_turtledata
to see the individual steps.
You can use those as starters to download subsets of data.
See examples of filter parameters and possible filter values on:
This section will be expanded to show how to filter the data, e.g.
# AnimalEncounters of Turtles from 2016 onwards # https://tsc.dbca.wa.gov.au/api/1/animal-encounters/?taxon=Cheloniidae&when__year__gte=2016
# https://tsc.dbca.wa.gov.au/api/1/turtle-nest-encounters/?taxon=Cheloniidae&when__year__gte=2016
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.