
Get minimal assessment data for an API group
Source:R/assessments_by_group.R
assessments_by_group.RdThe assessment_by_ functions including assessments_by_group() return 'minimal' assessment data
for your specified filters (arguments). The minimal assessment data provides assessment_ids and sis_taxon_ids
(as a tibble) which can then be used with assessment_data(), assessment_data_many() and parse_assessment_data()
to get full assessment data.
The assessments_by_group() function acts upon the API assessment group names and codes.
Valid names can be found by calling list_group_names() and codes can be
found with list_codes(api, "scopes").
Usage
assessments_by_group(
api,
group,
code,
year_published = NULL,
latest = TRUE,
scope_code = NULL,
wait_time = 0.5,
show_warnings = TRUE
)Arguments
- api
An httr2 response object created with init_api().
- group
String. A valid API group name. Valid names can be found by calling
list_group_names().- code
String. A valid group code. Valid codes for an API group can be found by calling e.g.
list_codes(api, "habitats")- year_published
Integer. The publication year you wish to filter.
- latest
Boolean. Return latest or historic assessments. Defaults to
TRUE.- scope_code
String. A valid assessment scope. Defaults to
NULL(i.e. returns assessments of all scopes). Valid scope codes can be found by callinglist_codes(api, "scopes").- wait_time
Float. Time in seconds to wait between API calls. A wait time of >=0.5s will avoid API rate limiting.
- show_warnings
Boolean. Whether to show a warning to the console if no assessments are found for your specified arguments. Defaults to
TRUE.
Value
Returns a tibble() of minimal assessment data for your specified arguments. The minimal assessment data
provides assessment_ids and sis_taxon_ids which can be used with assessment_data(), assessment_data_many() and
parse_assessment_data() to get full assessment data.