Filter odkc_data to a given area_name.
filter_odkc_turtledata(
data,
area_name = NULL,
username = NULL,
verbose = wastdr::get_wastdr_verbose()
)
(list) The output of data("odkc_data"), a list of tibbles and sf
(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(odkc_data$areas$area_name)
: return data filtered to
this area_name.
(chr) The ODK Collect username to filter the data by. This is handy to investigate where and when a particular name was used. Default: NULL
Whether to show debug messages. Default: wastdr::get_wastdr_verbose()
(list) The input data, optionally filtered to a subset of records.
Other odkc:
add_hatching_emergence_success_odkc()
,
add_nest_labels_odkc()
,
download_odkc_turtledata_2020()
,
exclude_training_species_odkc()
,
general_disturbance_by_season_odkc()
,
hatching_emergence_success_odkc()
,
map_dist_odkc()
,
map_mwi_odkc()
,
map_sv_odkc()
,
map_tracks_odkc()
,
map_tt_odkc()
,
nest_disturbance_by_season_odkc()
,
nesting_type_by_area_season_age_species_odkc()
,
nesting_type_by_area_season_species_odkc()
,
nesting_type_by_season_age_species_odkc()
,
nesting_type_by_season_calendarday_age_species_odkc()
,
nesting_type_by_season_calendarday_species_odkc()
,
nesting_type_by_season_day_species_odkc()
,
nesting_type_by_season_species_odkc()
,
nesting_type_by_season_week_age_species_odkc()
,
nesting_type_by_season_week_site_species_odkc()
,
nesting_type_by_season_week_species_odkc()
,
nesting_type_by_site_season_age_species_odkc()
,
nesting_type_by_site_season_species_odkc()
data(odkc_data)
# All data
data_all <- filter_odkc_turtledata(odkc_data)
nrow(data_all$tracks)
#> [1] 100
# One area
area_names <- unique(odkc_data$areas$area_name)
area_names
#> [1] "Scott Reef" "Troughton Island" "Browse Island"
#> [4] "Cape Domett" "Smokey Bay Area" "Lacepede Islands"
#> [7] "Cable Beach Broome" "Roebuck Bay" "Eco Beach"
#> [10] "Eighty Mile Beach" "Bedout Island" "Mundabullangana"
#> [13] "Port Hedland" "Delambre Island" "Montebello Islands"
#> [16] "Rosemary Island" "Conzinc Bay" "Cape Lambert"
#> [19] "Caravan Park" "Barrow Island" "Thevenard Island"
#> [22] "Ningaloo" "Onslow" "Dirk Hartog Island"
#> [25] "Perth Metro" "Pendoley Headquarters"
data_area_1 <- filter_odkc_turtledata(odkc_data, area_name = "Cape Dommett")
nrow(data_area_1$tracks)
#> [1] 0
data_area_2 <- filter_odkc_turtledata(odkc_data, area_name = area_names[[2]])
nrow(data_area_2$tracks)
#> [1] 0
# Orphans
data_orphans <- filter_odkc_turtledata(odkc_data, area_name = "Other")
nrow(data_orphans)
#> NULL