Fixing Forecast SDK with data from other menus (#3554)

* minor check incase using sdk

* fixes combine

* datetime formating

* Update forecast.md

* fix testing
This commit is contained in:
martinb-bb
2022-11-24 11:59:10 -05:00
committed by GitHub
parent 222cceb1f3
commit 7c57fb71c5
3 changed files with 50 additions and 3 deletions

View File

@@ -64,12 +64,28 @@ help(openbb.forecast)
## Examples
### combine
​
Combine columns from different datasets
​
```python
spy = openbb.stocks.load("spy")
aapl = openbb.stocks.load("aapl")
# merge the data
combined_df = openbb.forecast.combine(spy,aapl, dataset="aapl", column= "Close")
openbb.forecast.show(combined_df)
```
<img width="507" alt="image" src="https://user-images.githubusercontent.com/105685594/203791078-181431cb-99bf-4d26-bfff-b4cf34b5dee2.png">
![Combine View](https://user-images.githubusercontent.com/105685594/203791078-181431cb-99bf-4d26-bfff-b4cf34b5dee2.png)
### corr
​
Shows a correlation matrix between columns in dataset
​
```python
df = pd.read_csv(ANDREW_REPLACE)
df = openbb.stocks.load("aapl")
openbb.forecast.corr_chart(df)
```
![Corr View](https://user-images.githubusercontent.com/72827203/202424217-b549b6e7-b121-4273-a7d9-b478e89cd65a.png)
@@ -80,7 +96,7 @@ openbb.forecast.corr_chart(df)
This command allows you to see seasonality patterns in your data
```python
df = pd.read_csv(ANDREW_REPLACE)
df = openbb.stocks.load("aapl")
openbb.forecast.season_chart(df)
```
​
@@ -92,7 +108,7 @@ openbb.forecast.season_chart(df)
Predicts the future value of time series data using exponential smoothing
​
```python
df = pd.read_csv(ANDREW_REPLACE)
df = openbb.stocks.load("aapl")
openbb.forecast.expo_chart(df)
```
​