Learn R Programming

BLSloadR (version 0.2)

get_jolts: Download Job Openings and Labor Turnover Survey (JOLTS) Data

Description

This function downloads Job Openings and Labor Turnover data from the U.S. Bureau of Labor Statistics. JOLTS data provides insights into job market dynamics including job openings, hires, separations, quits, and layoffs. Data is available at national, regional, and state levels with various industry and size class breakdowns.

Usage

get_jolts(
  monthly_only = TRUE,
  remove_regions = TRUE,
  remove_national = TRUE,
  suppress_warnings = TRUE,
  return_diagnostics = FALSE
)

Value

By default, returns a data.table with JOLTS data. If return_diagnostics = TRUE, returns a bls_data_collection object containing JOLTS data with the following key columns:

series_id

BLS series identifier

year

Year of observation

period

Time period (M01-M12 for months)

value

JOLTS statistic value (transformed based on data type)

date

Date of observation

state_text

State name

dataelement_text

Type of JOLTS measure (job openings, hires, separations, etc.)

area_text

Geographic area description

sizeclass_text

Establishment size class

industry_text

Industry classification

ratelevel_code

Whether the value is a "Level" (count) or "Rate" (percentage)

periodname

Month name

Arguments

monthly_only

Logical. If TRUE (default), excludes annual data (period M13) and includes only monthly observations.

remove_regions

Logical. If TRUE (default), excludes regional aggregates (Midwest, Northeast, South, West) identified by state codes MW, NE, SO, WE.

remove_national

Logical. If TRUE (default), excludes national-level data (state code 00). Set to FALSE to include national data with industry and size class breakdowns.

suppress_warnings

Logical. If TRUE (default), suppress individual download warnings and diagnostic messages for cleaner output during batch processing. If FALSE, returns the data and prints warnings and messages to the console.

return_diagnostics

Logical. If TRUE, returns a bls_data_collection object with full diagnostics. If FALSE (default), returns just the data table.

Details

The function performs several data transformations:

  • Converts rate values to proportions (divides by 100) except for Unemployed to Job Opening ratio.

  • Converts level values to actual counts (multiplies by 1000)

  • Creates a proper date column from year and period

  • Adds readable month names

Examples

Run this code
# \donttest{
# Download state-level JOLTS data (default - returns data directly)
jolts_data <- get_jolts()

# Include national data with industry breakdowns
jolts_national <- get_jolts(remove_national = FALSE)

# Get full diagnostic object if needed
jolts_with_diagnostics <- get_jolts(return_diagnostics = TRUE)
print_bls_warnings(jolts_with_diagnostics)

# View job openings by state for latest period
job_openings <- jolts_data[dataelement_text == "Job openings" & 
                          date == max(date)]
# }

Run the code above in your browser using DataLab