Filter WAStD turtledata to an area_name

filter_wastd_turtledata_area(
  x,
  area_name = NULL,
  verbose = wastdr::get_wastdr_verbose()
)

Arguments

x

An object of class wastd_data as returned by download_wastd_turtledata. This data can be filtered to an area_name (WAStD Area of type Locality).

area_name

(chr) The name of the area to filter the data by. Options:

  • NULL (default): do not filter data, return unfiltered data.

  • "All turtle programs": do not filter data, return unfiltered data.

  • "Other": Filter data to area_name NA.

  • Any name in unique(wastd_data$areas$area_name): return data filtered to this area_name.

verbose

Whether to show debug messages. Default: wastdr::get_wastdr_verbose()

Value

An object of class wastd_data filtered to records within area_name and the list of seasons.

Examples

if (FALSE) {
data(wastd_data)
first_area <- wastd_data$areas$area_name[[1]]
wastd_data_filtered <- wastd_data %>%
  filter_wastd_turtledata_arera(area_name = first_area)
wastd_data
wastd_data_filtered
unique(wastd_data_filtered$areas$area_name)
}