runapp-aus / strayr

A catalogue of ready-to-use ABS coding structures. Package documentation can be found here: https://runapp-aus.github.io/strayr/
45 stars 14 forks source link

Seifa 2021 #105

Open peteowen1 opened 1 year ago

peteowen1 commented 1 year ago

Included summary tables in get_seifa, with data_subclass = 'summary'.

Added the data_subclass as a column name to avoid confusion about which row is which when multiple subclasses are chosen, like current output shown below: image

Added year as a column name - again to avoid confusion.

Treat hyphens as missing in the spreadsheets so that score columns get read in as numeric class instead of character.

wfmackey commented 1 year ago

@peteowen1 given SA codes are stored as characters in absmapsdata (eg: class(sa42021$sa4_code_2021) is character, would it be better to set area_code variables to be characters, too?

wfmackey commented 1 year ago

e.g. desired behaviour of:

get_seifa(structure = c("lga"),
          data_subclass = c("ieo"),
          year = NULL) %>% 
  dplyr::select(1:4) %>% 
  dplyr::glimpse()

Rows: 548                                                                     
Columns: 4
$ data_subclass <chr> "ieo", "ieo", "ieo", "ieo", "ieo", "ieo", "ieo", "ieo", …
$ structure     <chr> "lga", "lga", "lga", "lga", "lga", "lga", "lga", "lga", …
$ area_code     <chr> "10050", "10180", "10250", "10300", "10470", "10500", "1…
$ area_name     <chr> "Albury", "Armidale Regional", "Ballina", "Balranald", "…

it's just one line to change and i'll add a commit

peteowen1 commented 7 months ago

@wfmackey forgot about this - have updated one line of code to make area_code a character variable