LOOP_BLS_OCCUPATIONS
Load paired annual earnings and employment series for one, several, or all occupations in the BLS Current Population Survey.
Syntax
LOOP_BLS_OCCUPATIONS(year, minimumEmployment, selector1, selector2, ...)
LOOP_BLS_OCCUPATIONS(year, minimumEmployment, "DISTRIBUTION", selector1, ...)
| Argument | Description |
|---|---|
year | An annual year, or LATEST. If omitted, the latest available annual year is used. |
minimumEmployment | Minimum employment, in thousands, required for both men and women in the selected year. The default is zero. |
DISTRIBUTION | Optional mode flag. It must follow the first two arguments. |
selector1... | Optional occupation codes or text fragments. Multiple selectors are combined with OR logic. Text matching is case-insensitive. |
Historical-series mode
Without DISTRIBUTION, the command returns a DataSeriesList containing four annual series for each matched occupation, in this stable order:
- Men—median weekly earnings
- Women—median weekly earnings
- Men—number employed, in thousands
- Women—number employed, in thousands
Retail=LOOP_BLS_OCCUPATIONS(2025,0,"Retail salespersons")
MenWages=EX(Retail,series:0)
WomenWages=EX(Retail,series:1)
MenEmployment=EX(Retail,series:2)
WomenEmployment=EX(Retail,series:3)
Earnings=LIST(MenWages,WomenWages)
Chart=LINE_CHART(Earnings)
The year and employment threshold determine whether an occupation is admitted; the returned series retain their available annual history.
Distribution mode
DISTRIBUTION restricts the sample to detailed, leaf-level occupations with complete paired data. It returns exactly four aligned cross-sectional series:
| Index | Series |
|---|---|
series:0 | Men's median weekly earnings across occupations. |
series:1 | Women's median weekly earnings across occupations. |
series:2 | Men's employment weights for those occupations. |
series:3 | Women's employment weights for those occupations. |
Occupations=LOOP_BLS_OCCUPATIONS(2025,100,"DISTRIBUTION")
MenWages=EX(Occupations,series:0)
WomenWages=EX(Occupations,series:1)
MenEmployment=EX(Occupations,series:2)
WomenEmployment=EX(Occupations,series:3)
MenFit=FIT_DIST(MenWages)
WomenFit=FIT_DIST(WomenWages)
Unweighted=MERGE_CHARTS(MenFit,WomenFit)
MenWeighted=FIT_DIST(MenWages,MenEmployment)
WomenWeighted=FIT_DIST(WomenWages,WomenEmployment)
Weighted=MERGE_CHARTS(MenWeighted,WomenWeighted)
Selection rules
- An occupation must have earnings and employment observations for both sexes in the selected year.
- The minimum-employment test is applied separately to men and women.
- A numeric selector matches an occupation code exactly.
- A text selector matches any occupation name containing that text.
- Distribution mode removes occupational aggregates to avoid double-counting their detailed components.
Best use
Use the command for reproducible access to the BLS occupational earnings panel, historical comparisons of selected occupations, or as the data-building layer for BLS_GENDER.
Interpretation cautions
- The earnings observations are occupational medians, not individual wages.
- A difference between men and women does not by itself measure unequal pay for identical work.
- The minimum-employment filter reduces small-cell instability but changes the set of occupations studied.
- BLS observations may be revised, and the latest available year can change.
Related commands
BLS_GENDER—build the complete extractable gender-and-occupation study.FIT_DIST—fit unweighted or employment-weighted distributions.MERGE_CHARTS—combine the men's and women's distribution charts.EXTRACT—retrieve a series from the returned data list.