options(rmarkdown.html_vignette.check_title = FALSE)

Get WAStD

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)

All the data

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.

Filtering the results

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

# AnimalEncounters of Turtles from 2016 onwards
# https://tsc.dbca.wa.gov.au/api/1/animal-encounters/?taxon=Cheloniidae&when__year__gte=2016

TurtleNestEncounters

# https://tsc.dbca.wa.gov.au/api/1/turtle-nest-encounters/?taxon=Cheloniidae&when__year__gte=2016

LineTransectEncounters

LoggerEncounters



parksandwildlife/wastdr documentation built on Nov. 17, 2022, 4:52 p.m.