Closed peterdesmet closed 5 years ago
A solution could be using name_usage()
instead of name_lookup()
:
alien_plants_complete <- name_usage(
datasetKey = "9ff7d317-609b-4c08-bd86-3bc404b77c42",
return = "data",
limit = 99999) %>%
filter(origin == "SOURCE") #origin is not an argument of name_usage()
colnames(alien_plants_complete)
[1] "key" "nubKey" "nameKey"
[4] "taxonID" "kingdom" "family"
[7] "kingdomKey" "familyKey" "datasetKey"
[10] "parentKey" "parent" "scientificName"
[13] "canonicalName" "authorship" "nameType"
[16] "origin" "taxonomicStatus" "nomenclaturalStatus"
[19] "numDescendants" "lastCrawled" "lastInterpreted"
[22] "issues" "synonym" "species"
[25] "speciesKey" "rank" "genus"
[28] "genusKey"
This issue has an implication in composition of verification spreadsheet. See here: https://docs.google.com/a/inbo.be/document/d/17TpZNcokL3NW5s9hkRAgvS6hyg6OhyfSFQEZ9xf7-No/edit?disco=AAAACBJyasU
Does name_usage
work with a vector of datasetKey
s?
No, but we can easily solve this problem by using map_df
from purrr
:
map_df(checklists_metadata$datasetKey, ~
name_usage(datasetKey = ., limit = 99999, return = "data")
) %>%
filter(origin == "SOURCE")
or explicitly:
map_df(checklists_metadata$datasetKey, function(x)
name_usage(datasetKey = x, limit = 99999, return = "data")
) %>%
filter(origin == "SOURCE")
Done in cd4f8dc133d4df4351eafb2cb82fb0b70f071888.
I noticed that the
issues
we collect in get_taxa.Rmd are issues with the backbone taxon, not issues of the checklist taxa:We get the ORIGINAL_NAME_DERIVED in our issues, which isn't useful for us. Unfortunately, the lookup function doesn't seem to return
issues
as a column: