Skip to contents

The assessment_by_ functions including assessments_by_taxonomy() 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_taxonomy() returns minimal assessment data for a given taxonomic hierarchy name.

Usage

assessments_by_taxonomy(
  api,
  level,
  name,
  year_published = NULL,
  latest = TRUE,
  scope_code = NULL,
  wait_time = 0.5
)

Arguments

api

An httr2 response object created with init_api().

level

String. The level of taxonomic hierachy. Must be one of: kingdom, phylum, class, order or family.

name

String. The name of taxonomic hierarchy.

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 calling list_codes(api, "scopes").

wait_time

Time in seconds to wait between API calls. A wait of 0.5 seconds or greater will ensure you won't hit the IUCN Red List API rate limit. 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.

Examples

if (FALSE) { # \dontrun{
assessments_by_taxonomy(api,
  level = "family",
  name = "felidae",
  year_published = 2022,
  latest = TRUE,
  scope_code = 1,
  wait_time = 0.5
)
} # }