tables
Fetch a BLS Productivity prod2 supplemental table in long form (every column preserved).
Examples
from openbb import obb
# Quarterly Nonfarm business sector labor productivity (the default headline series).
obb.bls.productivity.tables(provider='bls')
# Manufacturing sector unit labor costs, quarterly.
obb.bls.productivity.tables(provider='bls', sector='Manufacturing sector', measure='Unit labor costs')
# Total economy hours worked, in billions of hours.
obb.bls.productivity.tables(provider='bls', dataset='total-economy-hours-employment', sector='Total economy', measure='Hours worked', units='Billions of hours')
# Nonfarm business labor productivity growth by business cycle.
obb.bls.productivity.tables(provider='bls', dataset='major-sectors-business-cycles', units='Compound annual growth rate')
Parameters
- standard
- bls
dataset: str | None
Default: major-sectors-quarterly
Productivity supplemental dataset to load.
start_date: date | None | str
Start date of the data, in YYYY-MM-DD format.
end_date: date | None | str
End date of the data, in YYYY-MM-DD format.
sector: str | None
Default: Nonfarm business sector
Sector to restrict the results. Defaults to the headline Nonfarm business sector; clear it to load every sector.
measure: str | None
Default: Labor productivity
Measure to restrict the results. Defaults to Labor productivity; clear it to load every measure.
units: str | None
Default: Index (2017=100)
Units to restrict the results. Defaults to the 2017=100 index (one row per period); clear it to load every units basis. The source is long-form, so leaving every dimension open returns one row per sector / measure / units / period.
Returns
results: BlsProductivityTables
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- bls
date: date | None | str
First-of-period date the observation applies to.
period_kind: str
Period kind for the row (quarter, annual, or business cycle).
year: int | None
Year reported in the source XLSX.
quarter: int | str | None
Quarter index reported in the source XLSX.
sector: str | None
BLS sector this row belongs to.
basis: str | None
Worker-counting basis used for the row.
component: str | None
Sub-sector component for the total-economy workbook.
measure: str
Productivity measure being reported.
units: str
Units the value is expressed in.
value: float | None
Numeric observation.
value_string: str | None
Raw cell text when the value isn't numeric.
cycle_period: str | None
Business-cycle period label as published by BLS.
cycle_start_date: date | None
First-of-quarter start date for the business-cycle period.
cycle_end_date: date | None
First-of-quarter end date for the business-cycle period.
row_index: int
Sequential parser order preserving the source layout.
table_id: str
Stable dataset identifier.
table_title: str
Human-readable dataset title.
source_file: str
Filename of the source XLSX on bls.gov.
release_date: date | None
Release date stamped in the workbook header.