Hi,

My name is Hugh and  I'm hoping to download all records for several hundred trees species.

I've been speaking to Scott Chamberlain, and I'm trying to determine if occ_data can be used to return all records identified as all synonyms for a given taxa, if you search using either the scientific name, or the taxon key?

It seems that for some taxa with unresolved synonyms, we could be missing records, depending on which synonym we use, and thus underestimating the range. Ideally we' like to get all records for a taxa in one go, regardless of which synonym we search. 

However, both different synonyms, and different numbers of records, are returned for these species:

## Create keys
palustris.key   <- name_backbone(name = 'Quercus palustris', rank = 'species')$usageKey
coccinea.key  <- name_backbone(name = 'Quercus coccinea', rank = 'species')$usageKey


## Search data
palustris.occ = occ_data(taxonKey = palustris.key,  limit = 200000)     ## equivalent to gbif( 'Quercus palustris' , download = TRUE) 
coccinea.occ = occ_data(taxonKey = coccinea.key, limit = 200000)

> unique(palustris.occ$data$scientificName)

[1] "Quercus palustris Münchh."

> unique(coccinea.occ$data$scientificName)

[1] "Quercus coccinea Münchh."                             "Quercus palustris Regel ex A.DC." "Quercus coccinea var. tuberculata Sarg."  
[4] "Quercus coccinea subsp. microcarpa Torrey"  "Quercus coccinea var. coccinea

Scott suggested an alternative approach ::

x        = name_lookup('Quercus palustris')
keys  = x$data$key
out    = occ_data(taxonKey = keys, limit = 200000)

However, using this approach on another species (e.g. Acacia baileyana) returns names for other organisms (e.g. invertebrates!).

So it sounds like using  occ_data on the taxon key, then searching all synonyms separately might be the safest approach?

Thanks very much,

--
Hugh