international_macroeconomic_data_set
Get ERS International Macroeconomic Data Set - historical and projected real GDP, GDP per capita, GDP deflator, real GDP shares, real exchange rates, consumer price indices, and population for baseline countries and regions from 1970 through the 2035 projection horizon, pivoted to a wide layout with the countries and regions as columns and the years as rows.
Examples
from openbb import obb
obb.usda.international_macroeconomic_data_set(provider='usda')
# Get real GDP year-to-year growth rates by country and region since 2000.
obb.usda.international_macroeconomic_data_set(variable='real_gdp', measure='growth', start_year=2000, provider='usda')
# Get historical and projected population by country and region.
obb.usda.international_macroeconomic_data_set(variable='population', measure='level', provider='usda')
# Get consumer price indices, 2017 = 100, since 2010.
obb.usda.international_macroeconomic_data_set(variable='cpi', measure='level', start_year=2010, provider='usda')
Parameters
- standard
- usda
variable: str | None
Default: real_gdp
Description
Macroeconomic variable to retrieve. Each variable is a separate file whose baseline countries and regions spread into the wide columns while the years stay in the rows, running from 1970 through the 2035 projection horizon. Valid variables are:
real_gdp, real_gdp_per_capita, gdp_deflator, real_gdp_shares, real_exchange_rate, cpi, population
measure: str | None
Default: level
Description
Measure to spread. 'level' returns the variable's level unit; 'growth' returns its year-to-year percent change. Valid measures are:
level, growth
start_year: int | None
Start year for filtering the data. If None, returns from 1970, the first year of the series.
end_year: int | None
End year for filtering the data. If None, returns through 2035, the last projection year.
Returns
results: InternationalMacroeconomicDataSet
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
- usda
year: int
Calendar year of the observation, from 1970 through the 2035 projection horizon.
unit: str | None
Unit shared by every value column for the selected variable and measure, as published.