AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
39 stars 3 forks source link

Add `select_fields()` function #95

Closed daxkellie closed 2 years ago

daxkellie commented 2 years ago

The change to ala_counts(group_by = ) to allow multiple group_by arguments may now make select_groups() and select_columns() duplicate functions. In addition, there is now some inconsistency in how galah differentiates groups, columns and fields.

An option that improves consistency is to create a select_fields() function. This function will accept and filter by fields arguments (consistent with search_fields() and find_field_values())

/cc @mjwestgate

daxkellie commented 2 years ago

Rather than using aselect_fields function, the solution we came to was to have a galah_group_by function which mirrors how one would use dplyr::group_by() %>% summarise(sum(.)). Syntax changes made according to #101