cpi
Consumer Price Index (CPI) data from the IMF.
Examples
from openbb import obb
# Latest CPI basket weightings reported by the IMF.
obb.imf.cpi(provider='imf', country='CAN', transform='weight_percent', expenditure='all', limit=1)
Parameters
- standard
- imf
country: str | None | list[str | None]
Default: united_states
The country to get data. Multiple items allowed for provider(s): imf.
transform: str | None
Default: yoy
Transformation of the CPI data.
Choices
- index
- period
- yoy
- ref_index
- ref_period
- ref_yoy
- weight
- weight_percent
frequency: str | None
Default: monthly
The frequency of the data.
harmonized: bool | None
Default: False
If true, returns harmonized data.
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.
country: str | None
Default: USA
The country (ISO3 code or label) to get data for.
transform: str | None
Default: yoy
Transformation of the CPI data.
Choices
- index
- period
- yoy
- ref_index
- ref_period
- ref_yoy
- weight
- weight_percent
frequency: str | None
Default: monthly
The frequency of the data.
harmonized: bool | None
Default: False
If true, returns harmonized data.
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.
expenditure: str | None | list[str | None]
Default: total
Expenditure component of CPI. Multiple items allowed.
Choices
- total
- all
- food_non_alcoholic_beverages
- alcoholic_beverages_tobacco_narcotics
- clothing_footwear
- housing_water_electricity_gas
- furniture_household_equipment
- health
- transport
- communication
- recreation_culture
- education
- restaurants_hotels
- miscellaneous_goods_services
limit: int | None
Maximum number of records to retrieve per series and country. If None, retrieves all available records.
Returns
results: ImfConsumerPriceIndex
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
- imf
date: date | str
The date of the data.
country: str
None
value: float
CPI index value or period change.
date: date | str
The date of the data.
country: str
None
value: float
CPI index value or period change.
unit: str
Unit of measurement.
unit_multiplier: float | int
Unit multiplier for the observation value.
country_code: str
ISO3 country code.
series_id: str
IMF series identifier.
expenditure: str
Expenditure category.
title: str
Complete reference title for the series.
order: int | None
Sort order for expenditure categories and table presentations.