Learn R Programming

blscrapeR (version 1.0.1)

qcew_api: Request data from the Quarterly Census of Employment and Wages.

Description

Return data from the QCEW API. This is seperate from the main BLS API and returns quarterly data sliced by industry, area or size. Industry is identified by NIACS code and area is identified by FIPS code. A key is not required for the QCEW API.

Usage

qcew_api(year = 2012, qtr = 1, slice = NULL, sliceCode = NULL)

Arguments

year
These data begin in 2012 and go to the most recent complete quarter. The argument can be entered as an integer or a character. The default is 2012.
qtr
Quarter: This can be any integer between 1 and 4. The argument can be entered as an integer or a character. The default is 1, which returns the first quarter.
slice
The slice should be one of the three data slices offered by the API; "industry", "area", or "size."
sliceCode
The slice codes depend on what slice you select. For example, if you select the "area" slice, your sliceCode should be a FIPS code. If you select "industry," your sliceCode should be a NIACS code. There are three internal data sets containing acceptable slice codes to help with selections; blscrapeR::niacs contains industry codes and descriptions, blscrapeR::area_titles contains FIPS codes and area descriptions, and blscrapeR::size_titles contains industry size codes. These codes can be used for the sliceCode argument.

See Also

http://data.bls.gov/cew/doc/access/csv_data_slices.htm

Examples

Run this code

## Not run: 
# # A request for the employment levels and wages for NIACS 5112: Software Publishers.
# dat <- qcew_api(year=2015, qtr=1, slice="industry", sliceCode=5112)
# ## End(Not run)

Run the code above in your browser using DataLab