relative_importance
Fetch BLS CPI relative-importance and weights for one yearly file + sheet.
Examples
from openbb import obb
# Latest CPI relative-importance weights for CPI-U & CPI-W.
obb.bls.cpi.relative_importance(provider='bls')
# 2024 weights for selected local areas (Table 2).
obb.bls.cpi.relative_importance(provider='bls', year=2024, table=2)
Parameters
- standard
- bls
year: int | None
Year of the relative-importance file to fetch; None walks back until a published file is found.
table: int | None
Default: 1
Which of the 7 sheets in the relative-importance XLSX to return.
Returns
results: BlsCpiRelativeImportance
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 | str
December reference date for the weights.
label: str | None
BLS item or expenditure-category label.
level: int | None
Indent depth from the source XLSX.
row_index: int
Sequential ordering index assigned during parsing.
section: str | None
Section the row appears under in the source XLSX (Expenditure category or Special aggregate indexes).
area: str | None
Geographic area the weight refers to (e.g., U.S. City Average or a selected local area).
footnote: str | None
Resolved footnote text for any (N) markers attached to the row's label.
basket: str
Which CPI basket the weight refers to (CPI-U or CPI-W).
relative_importance: float | None
Weight as a percentage of the parent index.
table_id: str
Source table identifier.
table_name: str
Full BLS table title.