Files
OpenBB/website/content/sdk/reference/economy/macro.md
teh_coderer 79046608b6 Docs Fix (#3543)
* Update generate_terminal_markdown.py

* updates

* update workflows

* Automated Change

* tests

* tests

* Automated Change

* Update test_generate_docs.py

* Automated Change

* updates

* Automated Change

* Update gen-docs.yml

* Update test.yml

* Automated Change

* Update test.yml

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* test

* Automated Change

* testtt23

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* Automated Change

* added empting reference folders before autogen docs

* updates

* Automated Change

* update tests gitactions

* Automated Change

* up

* Automated Change

* Automated Change

* update pytest

* Automated Change

* tests

* Automated Change

* examples update

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* Update test.yml

* Update generate_sdk_markdown.py

* strip

* Automated Change

* Workflow : check test update

* Automated Change

* Automated Change

* Automated Change

* Update test.yml

* Automated Change

* Update test.yml

* Automated Change

* Automated Change

* up

* Automated Change

* Update generate_sdk_markdown.py

* Automated Change

* update workflows

* fix guides

* testing

* Update gh-pages.yml

* Update gh-pages.yml

Co-authored-by: tehcoderer <tehcoderer@users.noreply.github.com>
Co-authored-by: Jeroen Bouma <jer.bouma@gmail.com>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
Co-authored-by: Chavithra <Chavithra@users.noreply.github.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: jose-donato <jose-donato@users.noreply.github.com>
2022-11-25 17:19:08 -05:00

3.6 KiB
Vendored

title, description
title description
macro OpenBB SDK Function

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

macro

This functions groups the data queried from the EconDB database [Source: EconDB]

Source Code: [link]

openbb.economy.macro(parameters: list = None, countries: list = None, transform: str = "", start_date: str = "1900-01-01", end_date: Optional[str] = None, symbol: str = "")

Parameters

Name Type Description Default Optional
parameters list The type of data you wish to download. Available parameters can be accessed through economy.macro_parameters(). None True
countries list The selected country or countries. Available countries can be accessed through economy.macro_countries(). None True
transform str The selected transform. Available transforms can be accessed through get_macro_transform(). True
start_date str The starting date, format "YEAR-MONTH-DAY", i.e. 2010-12-31. 1900-01-01 True
end_date Optional[str] The end date, format "YEAR-MONTH-DAY", i.e. 2020-06-05. None True
symbol str In what currency you wish to convert all values. True

Returns

Type Description
Tuple[pd.DataFrame, Dict[Any, Dict[Any, Any]], str] A DataFrame with the requested macro data of all chosen countries,
A dictionary containing the units of each country's parameter (e.g. EUR),
A string denomination which can be Trillions, Billions, Millions, Thousands

Examples

from openbb_terminal.sdk import openbb
macro_df = openbb.economy.macro()

Show the received macro data about a company [Source: EconDB]

Source Code: [link]

openbb.economy.macro_chart(parameters: list = None, countries: list = None, transform: str = "", start_date: str = "1900-01-01", end_date: Optional[str] = None, symbol: str = "", raw: bool = False, external_axes: Optional[List[axes]] = None, export: str = "")

Parameters

Name Type Description Default Optional
parameters list The type of data you wish to display. Available parameters can be accessed through get_macro_parameters(). None True
countries list The selected country or countries. Available countries can be accessed through get_macro_countries(). None True
transform str select data transformation from:
'' - no transformation
'TPOP' - total percentage change on period,
'TOYA' - total percentage since 1 year ago,
'TUSD' - level USD,
'TPGP' - Percentage of GDP,
'TNOR' - Start = 100
True
start_date str The starting date, format "YEAR-MONTH-DAY", i.e. 2010-12-31. 1900-01-01 True
end_date Optional[str] The end date, format "YEAR-MONTH-DAY", i.e. 2020-06-05. None True
symbol str In what currency you wish to convert all values. True
raw bool Whether to display the raw output. False True
external_axes Optional[List[plt.axes]] External axes to plot on None True
export str Export data to csv,json,xlsx or png,jpg,pdf,svg file True

Returns

Type Description
Plots the Series.