Files
OpenBB/openbb_terminal/forecast/forecast.ipynb
Jeroen Bouma 6b4f0ad6da Add new functionality to measure country performance (#4514)
* Add in new country parameters

* Add in tests corresponding to the new commands

* Update SDK and some more robustness

* Update tests

* Update tests

* Revenue and spending didnt work, then saw spending has many more options

* Small bug

* Update tests and overall improvements

* Forgot to add ccpi

* Make more efficient

* Update tests

* Fix IDX issue within real gdp

* Add quarterly flag to fgdp

* Add integration tests

* Update tests

* Fix SDK and related bugs and fix CPI for SDK

* Zzzz tests

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2023-03-20 15:21:58 +00:00

90 lines
2.0 KiB
Plaintext
Vendored

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "a3abc620-1a2c-4c6d-a273-b30ce74a58c9",
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime, timedelta\n",
"from openbb_terminal import api\n",
"import os\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib_inline.backend_inline\n",
"import ipywidgets as widgets\n",
"import plotly.graph_objs as go\n",
"from IPython.display import display\n",
"\n",
"%matplotlib inline\n",
"matplotlib_inline.backend_inline.set_matplotlib_formats(\"svg\")\n",
"api.theme.apply_style()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2bad2400-6f8a-4a8a-8161-5e319ae13ba8",
"metadata": {},
"outputs": [],
"source": [
"df = api.forecast.load(\"weather.csv\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5eb728df-76e3-4cf2-901b-7275b7ce8f4c",
"metadata": {},
"outputs": [],
"source": [
"df = api.forecast.ema(df, target_column=\"MaxTemp\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "261d1eb2-7a0b-4358-8aa5-c1bae1237dab",
"metadata": {},
"outputs": [],
"source": [
"api.forecast.expo(df, target_column=\"MaxTemp\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0c1d1945-f819-442a-a8e6-66822681b901",
"metadata": {},
"outputs": [],
"source": [
"api.forecast.brnn(\n",
" df, target_column=\"MaxTemp\", past_covariates=\"MinTemp,Rainfall,Evaporation\"\n",
")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}