OEWS: the BLS API serves only the latest OEWS year, so history comes
from the annual oesm{yy}nat.zip files (2013–2024), which bls.gov only
serves to a full browser header set; each zip's national_M{year}_dl
sheet (xls through 2013, xlsx after; OCC_GROUP through 2018, O_GROUP
plus area/industry columns from 2019) is normalised to one row per SOC
occupation with employment and the hourly/annual wage distribution,
suppressed cells (* # **) as NULL, and the BLS series-id prefix kept
per row. One bib Source per release (module:bls, table:bls.oews,
source:bls-website, year:N) and a cms.ingest_log row with the zip's
sha256.
CES: a closed registry of employment (01) and average hourly earnings
(03) series for health care, ambulatory care, offices of physicians,
home health, hospitals and nursing/residential care (CES65<industry>
<type>), pulled through the public API in 10-year × 25-series chunks
(20 × 50 with BLS_API_KEY), monthly rows with the series id on every
row, one bib Source per series.
stack bls oews [--year]... [--write [--offline]] [--occ]...;
stack bls ces [--write] [--series]... [--annual]. Notebook 7f overlays
clinical-staff wages (31-9092, 29-2061, 29-1141, 29-1171) and
physician-office / ambulatory employment on the family's exposure
dates. CLI docs regenerated.
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
"""BLS Current Employment Statistics — health-care employment and
|
||
earnings series, monthly, from the BLS public API (#695)."""
|
||
|
||
from __future__ import annotations
|
||
|
||
from conf.table_base import SQLTable
|
||
|
||
|
||
class Ces(SQLTable):
|
||
"""One monthly observation of one CES series."""
|
||
|
||
__schema__ = "bls"
|
||
__tablename__ = "ces"
|
||
|
||
series_id: str | None = None
|
||
"""BLS series id, e.g. ``CES6562110001``."""
|
||
|
||
industry_code: str | None = None
|
||
"""CES industry code inside the series id (``656211`` = offices of physicians)."""
|
||
|
||
industry_name: str | None = None
|
||
"""Industry title from the series registry."""
|
||
|
||
data_type: str | None = None
|
||
"""``employment`` (thousands, all employees) or ``avg_hourly_earnings`` (dollars)."""
|
||
|
||
seasonal: str | None = None
|
||
"""``S`` seasonally adjusted / ``U`` not."""
|
||
|
||
year: int | None = None
|
||
month: int | None = None
|
||
"""1–12; ``13`` is the BLS annual average row."""
|
||
|
||
value: float | None = None
|
||
|
||
item_key: str | None = None
|
||
"""bib key of the Source item citing this series."""
|