Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search_taxa returns spec. in species column for some undescribed species #247

Open
Acanthiza opened this issue Sep 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Acanthiza
Copy link

search_taxa occasionally returns a species column with either just spec. or Genus spec.. This behaviour appears to only occur with undescribed taxa. It happens only occasionally (certainly not for all undescribed taxa), but consistently for a particular search term (a handful in the reprex below). In all these cases the scientific_name column appears to provide the expected result for the species column.

library("galah")
#> galah: version 2.0.2
#> ℹ Default node set to ALA (ala.org.au).
#> ℹ See all supported GBIF nodes with `show_all(atlases)`.
#> ℹ To change nodes, use e.g. `galah_config(atlas = "GBIF")`.
#> Attaching package: 'galah'
#> 
#> The following object is masked from 'package:stats':
#> 
#>     filter

result <- search_taxa(c("Sterculia sp. (Annan River)"
                        , "Sida sp. (Small Flower)"
                        , "Sida sp. (Camooweal S.T.Blake 17936)"
                        , "Acacia sp. Small Red-leaved Wattle (J.B.Williams 95033)"
                        )
                      )

# This looks ok
result$scientific_name
#> [1] "Sterculia sp. (Annan River)"                            
#> [2] "Sida sp. (Small Flower)"                                
#> [3] "Sida sp. (Camooweal S.T.Blake 17936)"                   
#> [4] "Acacia sp. Small Red-leaved Wattle (J.B.Williams 95033)"

# Not sure if this is the intended result for 'species'
result$species
#> [1] "Sterculia spec." "Sida spec."      "Sida spec."      "spec."

Created on 2024-09-25 with reprex v2.0.2

Expected behaviour: in these cases, the species column is populated with the result from the scientific_name column.

An easy workaround is to simply replace instances of spec. in the species column with the result from the scientific_name column (being careful to match the spec. appropriately).

@Acanthiza Acanthiza added the bug Something isn't working label Sep 25, 2024
@daxkellie
Copy link
Contributor

Thanks for raising this issue @Acanthiza. I am fairly certain this is a parsing issue on the ALA system (and therefore an issue outside of galah), as the classification values in the ALA seem to match the values returned by your reprex. For example, the classification of your 4th example on the ALA website also shows the species as spec..

For now, I think you are spot on that replacing species with scientific_name is the easiest quick fix. In the meantime, I'll investigate whether it's possible to at least fix the examples you have provided above on the ALA system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants