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.
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
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.
wastd_data
comes with its own print method:
wastd_data
## <WAStD Data> accessed on 2022-05-17 09:24:14
## Areas: 25
## Sites: 218
## Surveys: 1000
## Animals (tags, incidents): 1000
## Turtle Tags: 1000
## Turtle Damages: 1000
## Turtle Morphometrics: 1000
## Turtle Nest Encounters: 1000
## Logger Observations: 275
## Nest Tags: 1000
## Nest Excavations: 608
## Hatchling Morph: 148
## Hatchling Fans: 1000
## Hatchling Outliers: 284
## Light Sources: 636
## Line Transect Encounters: 242
## Track Tallies: 486
## Disturbance Tallies: 115
## Dist/Pred (nest/general): 1000
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