| get_jolts | R Documentation |
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.
get_jolts(
monthly_only = TRUE,
remove_regions = TRUE,
remove_national = TRUE,
suppress_warnings = TRUE,
return_diagnostics = FALSE,
cache = check_bls_cache_env()
)
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. |
cache |
Logical. Uses USE_BLS_CACHE environment variable, or defaults to FALSE. If TRUE, will download a cached file from BLS server and update cache if BLS server indicates an updated file. |
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
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:
BLS series identifier
Year of observation
Time period (M01-M12 for months)
JOLTS statistic value (transformed based on data type)
Date of observation
State name
Type of JOLTS measure (job openings, hires, separations, etc.)
Geographic area description
Establishment size class
Industry classification
Whether the value is a "Level" (count) or "Rate" (percentage)
Month name
## Not run:
# 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)]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.