Update USD Liquidity Example Notebook for V4 (#5902)

* Update USD Liquidity Example Notebook for V4

* delete some v3 text in the copperToGold

* Update README.md

* findSymbols preview image

* Google Colab preview image

* financialStatements preview

* content tsx file

* ### title

* convert tsx to json

* indent size

* double quote keys.json

* trailing commas

* Update content.json

* patch

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
Danglewood
2024-02-13 09:48:52 -08:00
committed by GitHub
parent 6648f51ab5
commit 2516cfbc72
9 changed files with 10498 additions and 451 deletions

11
examples/README.md vendored
View File

@@ -56,3 +56,14 @@ This notebook shows you how you can use OpenbB Platform as functions in an LLM b
- Convert all OpenBB Platform functions to LLM tools
- Build a basic Langchain agent that can utilize function calling
- Run the agent
### usdLiquidityIndex
This notebook demonstrates how to query the Federal Reserve Economic Database and recreate the USD Liquidity Index.
- Search FRED for series IDs.
- Load multiple series as a single call.
- Unpacking the data response from the FRED query.
- Perform arithmetic operations on a DataFrame.
- Normalization methods for a series or DataFrame.
- Simple processes for creating charts.

44
examples/content.json vendored Normal file
View File

@@ -0,0 +1,44 @@
[
{
"title": "Install in Google Colab",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/googleColab.ipynb",
"img":"https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/examples/googleColab.webp",
"description":
"Install the OpenBB Platform in Google Colab and get started pulling data and creating visualizations."
},
{
"title": "Find Symbols",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/findSymbols.ipynb",
"img": "https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/examples/findSymbols.webp",
"description":
"An introduction to discovering, finding, screening, and searching symbols using different sources."
},
{
"title": "Load Historical Price Data",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/loadHistoricalPriceData.ipynb",
"img": "https://my.openbb.co/assets/images/sdk/examples/loadHistoricalPriceData.webp",
"description":
"Loading data with different intervals and sources, ticker symbology, load data from other asset classes, load multiple tickers in one go, draw lines on plotly."
},
{
"title": "Copper To Gold Ratio",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/copperToGoldRatio.ipynb",
"img": "https://my.openbb.co/assets/images/sdk/examples/copperToGoldRatio.webp",
"description":
"Calculate copper to gold ratio, load front-month future prices, 10-year constant maturity vs treasury bill, basic dataframe operations, plotting on 2 y-axis."
},
{
"title": "USD Liquidity Index",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/usdLiquidityIndex.ipynb",
"img": "https://my.openbb.co/assets/images/sdk/examples/usdLiquidityIndex.webp",
"description":
"Query the Federal Reserve Economic Database and recreate the USD Liquidity Index, load multiple data series, basic operations on a dataframe, normalization methods, and creating custom chart."
},
{
"title": "Financial Statements",
"url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/financialStatements.ipynb",
"img": "https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/examples/financialStatements.webp",
"description":
"Get started with financial statements in the OpenBB Platform. This notebook compares the data from different providers and demonstrates how to access items within the three main financial statements - balance, cash, and income."
}
]

File diff suppressed because it is too large Load Diff

BIN
examples/financialStatements.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
examples/findSymbols.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
examples/googleColab.webp vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

10206
examples/usdLiquidityIndex.ipynb vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -69,7 +69,6 @@ class DueDiligenceController(CryptoBaseController):
"change",
"nonzero",
"eb",
"funot",
"desc",
]
@@ -195,7 +194,6 @@ class DueDiligenceController(CryptoBaseController):
mt.add_cmd("ps")
mt.add_cmd("mcapdom")
mt.add_cmd("mt")
mt.add_cmd("funot")
mt.add_info("_contributors_")
mt.add_cmd("team")
@@ -1858,48 +1856,6 @@ class DueDiligenceController(CryptoBaseController):
region=ns_parser.region,
)
@log_start_end(log=logger)
def call_funot(self, other_args):
"""Process fun command"""
parser = argparse.ArgumentParser(
prog="funot",
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description="""Display fundamental metric over time [Source: Token Terminal]""",
)
parser.add_argument(
"-m",
"--metric",
default="",
choices=tokenterminal_model.METRICS,
dest="metric",
help="Choose metric of interest",
)
parser.add_argument(
"-p",
"--project",
required="-h" not in other_args,
choices=tokenterminal_model.get_project_ids(),
dest="project",
help="Choose project of interest",
)
if other_args and other_args[0][0] != "-":
other_args.insert(0, "-p")
ns_parser = self.parse_known_args_and_warn(
parser, other_args, EXPORT_BOTH_RAW_DATA_AND_FIGURES
)
if ns_parser:
tokenterminal_view.display_fundamental_metric_from_project_over_time(
metric=ns_parser.metric,
project=ns_parser.project,
export=ns_parser.export,
sheet_name=(
" ".join(ns_parser.sheet_name) if ns_parser.sheet_name else None
),
)
@log_start_end(log=logger)
def call_desc(self, other_args):
"""Process desc command"""

View File

@@ -192,9 +192,7 @@ def get_project_ids() -> List[str]:
# check if its a dict - which would be a successful api call -
# might need to add error checking here later if they messed up the API key though.
if isinstance(PROJECTS_DATA, dict):
return [project["project_id"] for project in PROJECTS_DATA]
return PROJECTS_DATA
return ["none"]
@log_start_end(log=logger)