indicators
Get economic indicators by country and indicator.
Examples
from openbb import obb
obb.economy.indicators(provider='econdb', symbol=PCOCO)
# Enter the country as the full name, or iso code. Use `available_indicators()` to get a list of supported indicators from EconDB.
obb.economy.indicators(symbol=CPI, country='united_states,jp', provider='econdb')
# Use the `main` symbol to get the group of main indicators for a country.
obb.economy.indicators(provider='econdb', symbol=main, country='eu')
# When the provider is 'imf', the absence of a symbol will default to 'irfcl_top_lines'. Use 'IRFCL' to get all the data from the set of indicators.
obb.economy.indicators(provider='imf')
# When the provider is 'imf', complete tables are returned by using a 'preset'. Refer to the function's docstring for descriptions of each preset. When no country is supplied, the data is returned for all countries.
obb.economy.indicators(provider='imf', symbol=gold_reserves)
# When the provider is 'imf', multiple countries and symbols can be supplied. Enter countries as a two-letter ISO country code, or the country name in lower_snake_case.
obb.economy.indicators(provider='imf', symbol=RAFA_USD,RAPFA_USD,RAFA_RAPFA_RO, country='us,china,jp,4f,gb', start_date='2010-01-01', end_date='2020-12-31', frequency=annual)
Parameters
- standard
- econdb
- imf
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | Union[str, List[str]] | The country to get data. The country represented by the indicator, if available. Multiple items allowed for provider(s): econdb, imf. | None | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | Union[str, List[str]] | The country to get data. The country represented by the indicator, if available. Multiple items allowed for provider(s): econdb, imf. | None | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
symbol | Union[str, List[str]] | Symbol to get data for. The base symbol for the indicator (e.g. GDP, CPI, etc.). Use available_indicators() to get a list of available symbols. Multiple items allowed for provider(s): econdb. | False | |
transform | Literal['toya', 'tpop', 'tusd', 'tpgp'] | The transformation to apply to the data, default is None. ; tpop: Change from previous period; toya: Change from one year ago; tusd: Values as US dollars; tpgp: Values as a percent of GDP; ; Only 'tpop' and 'toya' are applicable to all indicators. Applying transformations across multiple indicators/countries may produce unexpected results. This is because not all indicators are compatible with all transformations, and the original units and scale differ between entities. tusd should only be used where values are currencies. | None | True |
frequency | Literal['annual', 'quarter', 'month'] | The frequency of the data, default is 'quarter'. Only valid when 'symbol' is 'main'. | quarter | True |
use_cache | bool | If True, the request will be cached for one day. Using cache is recommended to avoid needlessly requesting the same data. | True | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
country | Union[str, List[str]] | The country to get data. The country represented by the indicator, if available. Multiple items allowed for provider(s): econdb, imf. | None | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
symbol | Union[str, List[str]] | Symbol to get data for. Use available_indicators() to get the list of available symbols. Use 'IRFCL' to get all the data from the set of indicators. Complete tables are available only by single country, and are keyed as described below. The default is 'irfcl_top_lines'. Available presets not listed in available_indicators() are:; ; 'IRFCL': All the data from the set of indicators. Not compatible with multiple countries. 'irfcl_top_lines': The default, top line items from the IRFCL data. Compatible with multiple countries. 'reserve_assets_and_other_fx_assets': Table I of the IRFCL data. Not compatible with multiple countries. 'predetermined_drains_on_fx_assets': Table II of the IRFCL data. Not compatible with multiple countries. 'contingent_drains_fx_assets': Table III of the IRFCL data. Not compatible with multiple countries. 'memorandum_items': The memorandum items table of the IRFCL data. Not compatible with multiple countries. 'gold_reserves': Gold reserves as value in USD and Fine Troy Ounces. Compatible with multiple countries. 'derivative_assets': Net derivative assets as value in USD. Compatible with multipile countries. Multiple items allowed for provider(s): imf. | irfcl_top_lines | True |
frequency | Literal['annual', 'quarter', 'month'] | Frequency of the data. | quarter | True |
Returns
OBBject
results : List[EconomicIndicators]
Serializable results.
provider : Optional[Literal['econdb', 'imf']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
Data
- standard
- econdb
- imf
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
symbol_root | str | The root symbol for the indicator (e.g. GDP). |
symbol | str | Symbol representing the entity requested in the data. |
country | str | The country represented by the data. |
value | Union[float, int] |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
symbol_root | str | The root symbol for the indicator (e.g. GDP). |
symbol | str | Symbol representing the entity requested in the data. |
country | str | The country represented by the data. |
value | Union[float, int] |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
symbol_root | str | The root symbol for the indicator (e.g. GDP). |
symbol | str | Symbol representing the entity requested in the data. |
country | str | The country represented by the data. |
value | Union[float, int] | |
scale | str | The scale of the value. |
table | str | The name of the table associated with the symbol. |
level | int | The indentation level of the data, relative to the table and symbol_root |
order | int | Order of the data, relative to the table. |
reference_sector | str | The reference sector for the data. |
title | str | The title of the series associated with the symbol. |