Atlas of living australia

Author

Galen Holt

I need to pull some records from the Atlas of living australia. There’s an API. Can I use it so I don’t have to do this manually (and can re-do it easily?).

Was going to set up to hit the API directly, but they have an R package (that hits a LOT of these sorts of atlases, which is nice).

# library(httr2)
library(galah)

Have to register at their website first- if you’re at an Australian university, it’s likely you can login with those credentials- click the AAF button.

galah_config(email = "g.holt@deakin.edu.au", atlas = "Australia")

Try it

I’m just following the vignette, but not filtering or selecting

lippia <- galah_call() |>
  galah_identify("lippia") |>
  # galah_select(institutionID, group = "basic") |>
  atlas_occurrences()
Request for 111 occurrences placed in queue
Current queue length: 1
-
Downloading
lippia
# A tibble: 111 × 8
   recordID       scientificName taxonConceptID decimalLatitude decimalLongitude
   <chr>          <chr>          <chr>                    <dbl>            <dbl>
 1 009f0e72-30db… Lippia         https://id.bi…            NA               NA  
 2 00a48aef-c1f7… Lippia         https://id.bi…            NA               NA  
 3 00a7d2db-634f… Lippia alba v… https://id.bi…           -23.4            150. 
 4 03feac6c-4e8c… Lippia         https://id.bi…           -20.3            -50.5
 5 04992d8b-d1d1… Lippia         https://id.bi…            NA               NA  
 6 04e286bb-efd0… Lippia         https://id.bi…           -22.2            -47.1
 7 04f27e61-cfa5… Lippia alba    https://id.bi…            NA               NA  
 8 0f687a47-e2f8… Lippia alba v… https://id.bi…           -23.6            149. 
 9 101fb056-4704… Lippia alba v… https://id.bi…           -23.6            149. 
10 10a0dc77-4c4d… Lippia alba v… https://id.bi…           -15.4            132. 
# ℹ 101 more rows
# ℹ 3 more variables: eventDate <dttm>, occurrenceStatus <chr>,
#   dataResourceName <chr>

From the website though, I know that Phyla nodiflora comes up as a synonym with way more records. Can I get that sort of info from the API before pulling?

all_lippia <- search_taxa('lippia')
all_lippia
# A tibble: 1 × 13
  search_term scientific_name scientific_name_authorship taxon_concept_id  rank 
  <chr>       <chr>           <chr>                      <chr>             <chr>
1 lippia      Lippia          L.                         https://id.biodi… genus
# ℹ 8 more variables: match_type <chr>, kingdom <chr>, phylum <chr>,
#   class <chr>, order <chr>, family <chr>, genus <chr>, issues <chr>

Looks like no- these come up in the search bar on the website, but not in the above. Oh well, I guess be aware of that.

pnode <- search_taxa('phyla nodiflora')

Can I ask for both in one call?

Yeszs

lippia_phyla <- galah_call() |>
  galah_identify(c("lippia", 'phyla nodiflora')) |>
  # galah_select(institutionID, group = "basic") |>
  atlas_occurrences()
Request for 1824 occurrences placed in queue
Current queue length: 1
--
Downloading
lippia_phyla
# A tibble: 1,824 × 8
   recordID       scientificName taxonConceptID decimalLatitude decimalLongitude
   <chr>          <chr>          <chr>                    <dbl>            <dbl>
 1 00268357-9fec… Phyla nodiflo… https://id.bi…           -12.6             133.
 2 0031342a-24c0… Phyla nodiflo… https://id.bi…           -11.9             131.
 3 00792596-1929… Phyla nodiflo… https://id.bi…           -12.9             130.
 4 009f0e72-30db… Lippia         https://id.bi…            NA                NA 
 5 00a48aef-c1f7… Lippia         https://id.bi…            NA                NA 
 6 00a7d2db-634f… Lippia alba v… https://id.bi…           -23.4             150.
 7 00b4c6fe-2c52… Phyla nodiflo… https://id.bi…           -12.8             130.
 8 00bd4543-36ab… Phyla nodiflo… https://id.bi…           -33.2             145.
 9 00ce5430-d3da… Phyla nodiflo… https://id.bi…           -24.4             151.
10 00d35f73-85c4… Phyla nodiflo… https://id.bi…           -34.2             140.
# ℹ 1,814 more rows
# ℹ 3 more variables: eventDate <dttm>, occurrenceStatus <chr>,
#   dataResourceName <chr>

And it returns the names, so I can filter.