It's quite confusing that although search_all(lists) returns dataResourceUid as the column name containing the unique list ID, but this column can't be used to filter a species list correctly with atlas_species().
library(galah)
galah_config(email = "your-email-here")
# List id under "dataResourceUid"
search_all(lists, "New South Wales")
#> # A tibble: 2 × 19
#> dataResourceUid listName listType dateCreated lastUpdated lastUploaded
#> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 dr650 New South Wales… CONSERV… 2015-04-04… 2023-06-07… 2023-06-07T…
#> 2 dr487 New South Wales… SENSITI… 2013-06-20… 2023-08-30… 2023-08-30T…
#> # ℹ 13 more variables: lastMatched <chr>, username <chr>, itemCount <int>,
#> # region <chr>, isAuthoritative <lgl>, isInvasive <lgl>, isThreatened <lgl>,
#> # wkt <chr>, category <chr>, generalisation <chr>, authority <chr>,
#> # sdsType <chr>, looseSearch <lgl>
# dataResourceUid
# doesn't work correctly
galah_call() |>
filter(year == 2023,
cl22 == "New South Wales",
dataResourceUid == "dr650") |>
atlas_species()
#> # A tibble: 0 × 11
#> # ℹ 11 variables: Species <chr>, Species Name <chr>,
#> # Scientific Name Authorship <chr>, Taxon Rank <chr>, Kingdom <chr>,
#> # Phylum <chr>, Class <chr>, Order <chr>, Family <chr>, Genus <chr>,
#> # Vernacular Name <chr>
Instead, the field species_list_uid is the field used to filter by a specific list ID
I think it would be more transparent to keep id names the same, even if this isn't the true column name returned by the API containing list IDs. Otherwise, I'm not sure how users would figure this out themselves
It's quite confusing that although
search_all(lists)
returnsdataResourceUid
as the column name containing the unique list ID, but this column can't be used to filter a species list correctly withatlas_species()
.Instead, the field
species_list_uid
is the field used to filter by a specific list IDI think it would be more transparent to keep id names the same, even if this isn't the true column name returned by the API containing list IDs. Otherwise, I'm not sure how users would figure this out themselves