Survey design data with or without associated observations
Source:R/sight_design.R
sight_read_design.Rdsight_read_design(): Reads aerial survey designs without observation data.sight_read_design_id(): Is the same as sight_read_design except it filters by IDs and not the common names of the parameters.sight_read_design_entries(): Reads aerial survey designs with associated observation data, but does not guarantee that observations outside the design are included (for that try sight_read_data).sight_read_design_entries_id(): Is the same as sight_read_design_entries except it filters by IDs and not the common names of the parameters.
Usage
sight_read_design(
species = NULL,
survey_type = NULL,
analysis_unit = NULL,
management_unit = NULL,
stratum = NULL,
bio_year = NULL,
is_selected = NULL,
is_surveyed = NULL,
filter_species = TRUE,
filter_survey_type = TRUE,
sort = NULL,
pages = list(omit = 1),
appends = NULL,
includes = NULL,
...
)
sight_read_design_id(
survey_type_id = NULL,
analysis_unit_id = NULL,
management_unit_id = NULL,
stratum_id = NULL,
bio_year = NULL,
is_selected = NULL,
is_surveyed = NULL,
sort = NULL,
pages = list(omit = 1),
appends = NULL,
includes = NULL,
dry_run = FALSE,
...
)
sight_read_design_entries(
species = NULL,
survey_type = NULL,
analysis_unit = NULL,
management_unit = NULL,
stratum = NULL,
bio_year = NULL,
is_selected = NULL,
is_surveyed = NULL,
sort = NULL,
pages = list(omit = 1),
dry_run = FALSE,
...
)
sight_read_design_entries_id(
survey_type_id = NULL,
analysis_unit_id = NULL,
management_unit_id = NULL,
stratum_id = NULL,
design_id = NULL,
bio_year = NULL,
is_selected = NULL,
is_surveyed = NULL,
sort = NULL,
pages = list(omit = 1),
dry_run = FALSE,
...
)Arguments
- species
The name of the species to filter by, required when using survey_type argument
- survey_type
The name of the survey type to filter by.
- analysis_unit
The name of the analysis unit to filter by.
- management_unit
The name of the management unit to filter by.
- stratum
The name of the stratum to filter by.
- bio_year
The biological year to filter by.
- is_selected
A logical to filter by selected subunits.
- is_surveyed
A logical to filter by surveyed subunits.
- filter_species
logical, if FALSE species is only used for lookup context and not passed as a filter (default TRUE). Only used by
sight_read_design().- filter_survey_type
logical, if FALSE survey_type is only used for lookup context and not passed as a filter (default TRUE). Only used by
sight_read_design().- sort
A vector of column names to sort by
- pages
A named list of pagination options. See Details.
- appends
A character vector of fields to append to each design, see details.
- includes
A character vector of related resources to include, see details.
- ...
Additional arguments passed to the underlying spdgt.auth function (e.g.,
verbosity,timeout).- survey_type_id
The unique ID of the survey type to filter by.
- analysis_unit_id
The unique ID of the analysis unit to filter by.
- management_unit_id
The unique ID of the management unit to filter by.
- stratum_id
The unique ID of the stratum to filter by.
- dry_run
If
TRUE, print the HTTP request without sending it and return the request object invisibly. Useful for debugging.- design_id
The unique design ID to filter by or -1 to return all entries without a design.
Value
A tibble. For sight_read_design() / sight_read_design_id(), one
row per design record with columns:
- id
Integer. Design record identifier.
- survey_type_id
Integer. Survey type identifier.
- subunit_id
Integer. Subunit identifier.
- stratum_id
Integer. Stratum identifier.
- point_id, line_id
Integer. Spatial sampling identifiers (may be
NULL).- bio_year
Integer. Biological year.
- is_selected, is_surveyed
Logical. Whether the subunit was selected/surveyed.
- created_at, updated_at
Character. Timestamps.
For sight_read_design_entries() / sight_read_design_entries_id(), one
row per design record with associated observation data:
- design_id
Integer. Design record identifier.
- project_id
Integer. Project identifier.
- survey_type_id, survey_type
Survey type identifier and name.
- species_id, species
Species identifier and name.
- analysis_unit_id, analysis_unit
Analysis unit (DAU) identifier and name.
- management_unit_id, management_unit
Management unit (GMU) identifier and name.
- subunit_id, subunit
Subunit identifier and name.
- stratum_id, stratum
Stratum identifier and name.
- bio_year
Integer. Biological year.
- is_selected, is_surveyed
Logical. Whether the subunit was selected/surveyed.
- entries
List column. Nested tibble of observation entries for the design record.
Details
The sight_read_design() function retrieves aerial survey designs without
observation data using the endpoint at /aerial-surveys/designs. The
sight_read_design_entries() function retrieves aerial survey
designs along with
associated observation data using the endpoint at
/aerial-surveys/designs-with-joins.
Both functions allow filtering based on various parameters as well as pagination, includes, and appends.
Pagination can be controlled using the pages argument, which is a named
list that can include:
omit: Number of records to skip (default is 1).size: Maximum number of records to return.number: Page number to retrieve.
The includes argument allows you to specify related resources to include
in the response. Valid values for sight_read_design() are:
surveyType: Include survey type details.subunit: Include subunit details.stratum: Include stratum details.
Valid values for sight_read_design_entries() are:
entries: Include associated observation entries.
The appends argument allows you to specify additional fields to append to
each design. Valid values for sight_read_design() are:
bio_year_start: Append the start of the biological year.bio_year_end: Append the end of the biological year.
No appends are currently available for sight_read_design_entries().
See also
lkup_survey_type_id(), lkup_dau_id(), lkup_gmu_id(),
lkup_strata_id() for converting names to IDs