
Enrich iNaturalist specific project observations with IUCN conservation status
Source:R/functions.R
add_iucn_to_obs.Rd
This function enriches all the iNaturalist project observations with the
IUCN Red List conservation status thanks to the
get_conservation_status()
function.
The observations are filtered to include only 'Research grade' data also
that meet the following a valid date, an 'open' geographic location, the
presence of a photo or sound, and the exclusion of captive or cultivated
organisms.
Value
A data.frame object representing the iNaturalist project
observations, as well as the conservation status of the taxa.
The structure of the data.frame follows the original structure as obtained
by the rinat::get_inat_obs_project() function where the type arguments is
set to "observations".
The content of the data.frame returned is enriched with the following
columns:
info_title_proj: Acharactervalue representing the title of the project, as obtained by therinat::get_inat_obs_project()function where the type arguments is set to "info";info_slug_proj: Acharactervalue representing the slug of the project;info_taxa_num_proj: Anumericvalue representing the number of taxa in the project;info_place_uuid_proj: Acharactervalue representing the place uuid of the project within iNaturalist system;status: Acharactervalue representing the conservation status of the taxa by parsing the Taxa iNaturalist API JSON response, based on thetaxon.idvalue and only if the authority is the 'IUCN Red List'. In the case the JSON parsing fails, it will returns an Error message and fill this column with NA. The function also prints some console messages to inform the user about the status results for eachtaxon.id, as well as the number of taxa that encountered a JSON parsing error.
Author
Alessandro Oggioni, phD (2023) alessandro.oggioni@cnr.it