Quarterly Census of Employment and Wages API

Kris Eberwein

2018-03-16

The QCEW Data Landscape

The Quarterly Census of Employment and Wages (QCEW) is a division of the BLS. Some QCEW time-series data is available via the main BLS API, but the QCEW also houses quarterly data on their own API. The QCEW API returns employment and wage statistics sliced by area, industry type, or industry size. For further documentation on the QCEW API, you can refer to the QCEW website.

The QCEW API

The QCEW API is structured differently than the main BLS API. For this reason, the blscrapeR package includes a function for extracting these data.

For example, if we wanted to gather the quarterly employment and wage information for the Software Publishing industry in Q1 of 2016, we could run the following code:

library(blscrapeR)
dat <- qcew_api(year=2016, qtr=1, slice="industry", sliceCode=5112)

We can also get annual averages by passing “A” as an argument to qtr.

library(blscrapeR)
dat <- qcew_api(year=2016, qtr="A", slice="industry", sliceCode=5112)

Function Arguments

Included Data Sets

The qcew_api() function accepts various codes in the sliceCode argument. The sliceCode that is used will depend on the slice we wish to see. There are three built-in data sets to help with our sliceCode selections.

Area Description Data (FIPS codes)

areaCodes <- blscrapeR::area_titles
head(areaCodes)

Industry Description Data (NIACS codes)

industryCodes <- blscrapeR::niacs
head(industryCodes)

Industry Size Data (Size codes)

sizeCodes <- blscrapeR::size_titles
head(sizeCodes)