read_payrolls: Download and tidy ABS payroll jobs and wages data

View source: R/read_payrolls.R

read_payrollsR Documentation

Download and tidy ABS payroll jobs and wages data

Description

Import a tidy tibble of ABS Weekly Payrolls data.

Usage

read_payrolls(
  series = c("industry_jobs", "industry_wages", "sa4_jobs", "sa3_jobs",
    "subindustry_jobs", "empsize_jobs", "gccsa_jobs", "sex_age_jobs"),
  path = Sys.getenv("R_READABS_PATH", unset = tempdir())
)

Arguments

series

Character. Must be one of:

  • "industry_jobs" Payroll jobs by industry division, state, sex, and age group (Table 4)

  • "industry_wages" Total wages by industry division, state, sex, and age group (Table 4)

  • "sa4_jobs" Payroll jobs by statistical area 4 (SA4) and state (Table 5)

  • "sa3_jobs Payroll jobs by statistical area 4 (SA4), statistical area 3 (SA3), and state (Table 5)

  • "subindustry_jobs" Payroll jobs by industry sub-division and industry division (Table 6)

  • "empsize_jobs" Payroll jobs by size of employer (number of employees) and state (Table 7)

  • "gccsa_jobs" Payroll jobs by Greater Capital City Statistical Area (Table 5)

  • "sex_age_jobs Payroll jobs by sex and age (Table 8)

The default is "industry_jobs".

path

Local directory in which downloaded ABS time series spreadsheets should be stored. By default, path takes the value set in the environment variable "R_READABS_PATH". If this variable is not set, any files downloaded by read_abs() will be stored in a temporary directory (tempdir()).

Details

The ABS 'Weekly Payroll Jobs and Wages in Australia' dataset is very useful to analysts of the Australian labour market. It draws upon data collected by the Australian Taxation Office as part of its Single-Touch Payroll initiative and supplements the monthly Labour Force Survey. Unfortunately, the data as published by the ABS (1) is not in a standard time series spreadsheet; and (2) is messy in various ways that make it hard to read in R. This convenience function uses download_abs_data_cube() to import the payrolls data, and then tidies it up.

Value

A tidy (long) tbl_df. The number of columns differs based on the series.

Examples

## Not run: 
# Fetch payroll jobs by industry and state (the default, "industry_jobs")
read_payrolls()

# Payroll jobs by employer size
read_payrolls("empsize_jobs")

## End(Not run)


readabs documentation built on Aug. 8, 2023, 9:06 a.m.