2018-08-30 23:04:52 +04:00
|
|
|
"""
|
|
|
|
Monthly sunspot numbers from 1749 to May 2016
|
|
|
|
|
|
|
|
Source: https://www.esrl.noaa.gov/psd/gcos_wgsp/Timeseries/SUNSPOT/
|
|
|
|
"""
|
|
|
|
|
2018-03-06 23:08:14 +04:00
|
|
|
from pyFTS.data import common
|
2018-02-27 19:56:05 +04:00
|
|
|
import pandas as pd
|
|
|
|
import numpy as np
|
|
|
|
|
2021-08-16 22:01:37 +04:00
|
|
|
def get_data() -> np.ndarray:
|
2018-04-14 17:22:02 +04:00
|
|
|
"""
|
|
|
|
Get a simple univariate time series data.
|
2018-08-30 09:05:29 +04:00
|
|
|
|
2018-04-14 17:22:02 +04:00
|
|
|
:return: numpy array
|
|
|
|
"""
|
2018-03-06 23:08:14 +04:00
|
|
|
dat = get_dataframe()
|
2018-02-27 19:56:05 +04:00
|
|
|
dat = np.array(dat["SUNACTIVITY"])
|
|
|
|
return dat
|
2018-03-06 23:08:14 +04:00
|
|
|
|
2021-08-16 22:01:37 +04:00
|
|
|
def get_dataframe() -> pd.DataFrame:
|
2018-04-14 17:22:02 +04:00
|
|
|
"""
|
|
|
|
Get the complete multivariate time series data.
|
2018-08-30 09:05:29 +04:00
|
|
|
|
2018-04-14 17:22:02 +04:00
|
|
|
:return: Pandas DataFrame
|
|
|
|
"""
|
2018-03-07 02:47:14 +04:00
|
|
|
dat = common.get_dataframe('sunspots.csv',
|
2018-03-06 23:08:14 +04:00
|
|
|
'https://github.com/petroniocandido/pyFTS/raw/8f20f3634aa6a8f58083bdcd1bbf93795e6ed767/pyFTS/data/sunspots.csv',
|
|
|
|
sep=",")
|
|
|
|
return dat
|
|
|
|
|