R/download_data_cube.r
read_lfs_datacube.Rd
Convenience function to download and tidy data cubes from ABS Labour Force, Australia, Detailed.
read_lfs_datacube(cube, path = Sys.getenv("R_READABS_PATH", unset = tempdir()))
character. A character string that is either the complete filename
or (uniquely) in the filename of the data cube you want to download. Use
get_available_lfs_cubes()
to see a dataframe of options.
Local directory in which downloaded files should be stored.
A tibble with the data from the data cube. Columns names are tidied and dates are converted to Date class.
read_lfs_datacube("EQ02")
#> File downloaded in /var/folders/g6/rgtlsw6n123b0gt5483s5_cm0000gn/T//Rtmp9OldRq/EQ02.xlsx
#> # A tibble: 8,640 × 8
#> date sex number_of_months_or_years_with_curr…¹ state_and_territory_…²
#> <date> <chr> <chr> <chr>
#> 1 2001-05-01 Males Fewer than 3 months New South Wales
#> 2 2001-05-01 Males Fewer than 3 months Victoria
#> 3 2001-05-01 Males Fewer than 3 months Queensland
#> 4 2001-05-01 Males Fewer than 3 months South Australia
#> 5 2001-05-01 Males Fewer than 3 months Western Australia
#> 6 2001-05-01 Males Fewer than 3 months Tasmania
#> 7 2001-05-01 Males Fewer than 3 months Northern Territory
#> 8 2001-05-01 Males Fewer than 3 months Australian Capital Te…
#> 9 2001-05-01 Males 3-5 months New South Wales
#> 10 2001-05-01 Males 3-5 months Victoria
#> # ℹ 8,630 more rows
#> # ℹ abbreviated names:
#> # ¹number_of_months_or_years_with_current_employer_or_business,
#> # ²state_and_territory_stt__asgs_2011
#> # ℹ 4 more variables: employed_full_time_000 <dbl>,
#> # employed_part_time_000 <dbl>,
#> # number_of_hours_actually_worked_in_all_jobs_employed_full_time_000_hours <dbl>, …