What the command does

QCEW retrieves a public industry slice from the U.S. Bureau of Labor Statistics Quarterly Census of Employment and Wages. RainbowStats downloads the BLS CSV, normalizes annual and quarterly fields, removes suppressed observations from analysis, resolves county FIPS codes, and labels the requested industry.

No API key or registration is required. Select a year, an annual or quarterly period, and a BLS industry code. RainbowStats handles the remote file, CSV parsing, caching, and county-level analytical structure.

Syntax

Annual data

QCEW(year, ANNUAL, "industryCode")

Uses annual-average establishments and employment, annual wages, average weekly wage, and average annual pay.

Quarterly data

QCEW(year, quarter, "industryCode")

Use quarter 1, 2, 3, or 4. Quarterly employment is the mean of the three reported monthly employment levels.

# All industries, annual county analysis
qcew=QCEW(2025,ANNUAL,"10")
slide(qcew)

# Manufacturing, first quarter
manufacturing=QCEW(2025,1,"31-33")
slide(EXTRACT(manufacturing,cross_section))
Industry codes are text. Keep the industry argument in quotation marks. Hyphenated ranges such as "31-33" are supported; underscores are normalized when required by the BLS filename.

Industry codes

The bundled industry registry contains 2,159 QCEW code-and-title entries. The resolved title appears in the summary and slideshow, so the output says what the selected code represents.

CodeIndustryExample
10Total, all industriesQCEW(2025,ANNUAL,"10")
31-33ManufacturingQCEW(2025,ANNUAL,"31-33")
5415Computer systems design and related servicesQCEW(2025,ANNUAL,"5415")
6211Offices of physiciansQCEW(2025,ANNUAL,"6211")

Extractable outputs

Use EXTRACT to inspect the source or select a county-level measure.

ExtractWhat it returnsExample
slideshow, slidesSummary, interpretation guide, and analysis-ready data table.slide(EXTRACT(qcew,slideshow))
summary, auditPeriod, industry title, record counts, suppression count, employment, and wages.slide(EXTRACT(qcew,summary))
data, records, tableUp to 250 analysis-ready county records.slide(EXTRACT(qcew,data))
cross_section, counties, countyThe default multivariable county regression and residual analysis.slide(EXTRACT(qcew,cross_section))
count, sizeNumber of downloaded source records before analytical filtering.EXTRACT(qcew,count)

Individual measures

employment establishments total_wages taxable_wages contributions average_weekly_wage average_annual_pay employment_lq establishment_lq employment_percent_change total_wage_percent_change

Convenience aliases include jobs, estabs, wages, weekly_wage, avg_weekly_wage, annual_pay, avg_annual_pay, employment_growth, and wage_growth. Average annual pay is available only for annual data.

Complete examples

All-industry county employment structure

qcew=QCEW(2025,ANNUAL,"10")
slide(qcew)
slide(EXTRACT(qcew,summary))
slide(EXTRACT(qcew,cross_section))
slide(EXTRACT(qcew,data))

Compare wage and employment measures

tech=QCEW(2025,ANNUAL,"5415")
slide(EXTRACT(tech,employment))
slide(EXTRACT(tech,average_weekly_wage))
slide(EXTRACT(tech,employment_lq))
slide(EXTRACT(tech,employment_growth))

Readable county labels

County FIPS identifiers are resolved through the U.S. county registry. Regression residual tables therefore show labels such as Eureka, NV, Storey, NV, and Butte, ID rather than leaving the analyst to interpret five-digit codes.

Default cross-section model

The default model asks how county employment for the selected industry varies with the number of establishments and average weekly wages.

log(Employment) = β₀ + β₁ log(Establishments) + β₂ log(Average Weekly Wage) + error

Establishment coefficient

An elasticity: the percentage association between establishment count and employment, holding the wage measure constant.

Wage coefficient

The conditional association between average weekly wages and employment. It is descriptive and is not automatically causal.

Positive residual

The county has more employment than the model predicts—possibly reflecting unusually large or employment-intensive establishments.

Negative residual

The county has less employment than the fitted relationship predicts for its establishment count and wage level.

Turn a log residual into an intuitive ratio. exp(residual) equals actual employment divided by predicted employment. A residual of 0.69 is about twice predicted employment; a residual of -0.69 is about one-half of predicted employment.

How records are selected

The BLS industry file contains multiple geographic levels, ownership classes, establishment-size classes, and disclosure states. RainbowStats builds a coherent county cross-section by applying these rules:

  • Keep identifiers recognized by the county registry.
  • Keep the all-size establishment category (size_code = 0).
  • Exclude records suppressed by BLS disclosure rules.
  • Prefer ownership code 0 when present, otherwise private ownership code 5, otherwise the lowest available ownership code.
  • Keep one observation per county and use the county name as its analytical label.
  • Screen constant and nearly perfectly correlated predictors before regression to avoid a singular design matrix.

The summary reports both downloaded records and county analysis records, making the effect of this filtering visible.

Responsible interpretation

  • QCEW is establishment-based administrative data. It measures covered employment and wages, not every form of work or household income.
  • Suppressed records are missing for confidentiality reasons; their absence can affect small-area and narrowly defined industry comparisons.
  • A location quotient measures local concentration relative to a broader benchmark. It is not a measure of productivity or profitability.
  • County results can reflect commuting, industry mix, ownership structure, and establishment scale. A large residual is a lead for investigation, not proof of an economic mechanism.
  • Annual and quarterly fields are not interchangeable. Average annual pay is annual-only, while quarterly employment is constructed from three monthly observations.
  • Use the period and industry title shown in the summary when publishing or comparing results.

Source and attribution

Data are supplied by the U.S. Bureau of Labor Statistics through the public QCEW data files and API. RainbowStats normalizes the source CSV and constructs the analytical county cross-section; it does not modify the underlying BLS observations.

QCEW program · QCEW open data · QCEW data API