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

Unable to view values for some fields using show_values() #246

Open
daxkellie opened this issue Aug 20, 2024 · 0 comments
Open

Unable to view values for some fields using show_values() #246

daxkellie opened this issue Aug 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@daxkellie
Copy link
Contributor

When searching through metadata, show_values() allows users to see what categories are inside a given field. However, an error occurs when trying to use show_values() on some specific fields. For example, 2023 LGAs hit an error when trying to see values.

library(galah)

search_all(fields, "Local Government Areas")
#> # A tibble: 4 × 3
#>   id       description                                      type  
#>   <chr>    <chr>                                            <chr> 
#> 1 cl10923  PSMA Local Government Areas (2018)               fields
#> 2 cl110923 PSMA Local Government Areas - Abbreviated (2018) fields
#> 3 cl11170  Local Government Areas 2023                      fields
#> 4 cl959    Local Government Areas                           fields

# Doesn't work
search_all(fields, "cl11170") |>
  show_values()
#> • Showing values for 'cl11170'.
#> Warning: There was 1 warning in `mutate()`.
#> ℹ In argument: `field_value = stringr::str_extract(result$i18nCode,
#>   "(?<=\\.).*")`.
#> Caused by warning:
#> ! Unknown or uninitialised column: `i18nCode`.
#> # A tibble: 0 × 1
#> # ℹ 1 variable: cl11170 <chr>

Other LGA fields work correctly

# Works
search_all(fields, "cl10923") |>
  show_values()
#> • Showing values for 'cl10923'.
#> # A tibble: 560 × 1
#>    cl10923                     
#>    <chr>                       
#>  1 BRISBANE CITY               
#>  2 GREATER GEELONG CITY        
#>  3 EAST GIPPSLAND SHIRE        
#>  4 MORETON BAY REGIONAL        
#>  5 PASTORAL UNINCORPORATED AREA
#>  6 COOK SHIRE                  
#>  7 CAIRNS REGIONAL             
#>  8 TOWNSVILLE CITY             
#>  9 SUNSHINE COAST REGIONAL     
#> 10 CENTRAL COAST COUNCIL       
#> # ℹ 550 more rows

Created on 2024-08-20 with reprex v2.0.2

It's unclear whether this is an issue with the field or galah's ability to read and parse values within that field.

@daxkellie daxkellie added the bug Something isn't working label Aug 20, 2024
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

1 participant