Skip to contents

Transforms a list of raw assessment data from assessment_data() and converts to an opinionated list of unnested tibbles. The purpose of this function is to generate 'tidy' tibbles from the raw response, which we feel are easier to work with in downstream analyses.

Due to the complexity of the taxon response, we have tidied the 'taxon' element, moving Common Names, SSC Groups and Synonyms to named elements in the list, prepending these parts of the response with taxon_. The same process was applied to conservation_actions_in_place, which are nested under conservation_actions in the raw response. Finally, we have ordered the named lists alphabetically.

We have, for now, omitted the raw response's 'documentation' element as this is mostly long paragraphs of text and HTML. If this is important for your work, we would recommend fetching this from the object created with assessment_data() and process according to your needs.

Usage

parse_assessment_data(raw_assessment_data)

Arguments

raw_assessment_data

A list() generated by assessment_data().

Value

Returns an opinionated named list of tibbles

Examples

if (FALSE) { # \dontrun{
parse_assessment_data(raw_assessment_data)
} # }