pmdarima.datasets.load_sunspots

pmdarima.datasets.load_sunspots(as_series=False, dtype=<class 'numpy.float64'>)[source][source]

Monthly Sunspot Numbers, 1749 - 1983

Monthly mean relative sunspot numbers from 1749 to 1983. Collected at Swiss Federal Observatory, Zurich until 1960, then Tokyo Astronomical Observatory.

Parameters:

as_series : bool, optional (default=False)

Whether to return a Pandas series. If True, the index will be set to the observed years/months. If False, will return a 1d numpy array.

dtype : type, optional (default=np.float64)

The type to return for the array. Default is np.float64, which is used throughout the package as the default type.

Returns:

rslt : array-like, shape=(n_samples,)

The sunspots dataset. There are 2820 observations.

Notes

This is monthly data, so m should be set to 12 when using in a seasonal context.

References

[R80]https://www.rdocumentation.org/packages/datasets/versions/3.6.1/topics/sunspots

Examples

>>> from pmdarima.datasets import load_sunspots
>>> load_sunspots()
array([58. , 62.6, 70. , ..., 55.8, 33.3, 33.4])
>>> load_sunspots(True).head()
Jan 1749    58.0
Feb 1749    62.6
Mar 1749    70.0
Apr 1749    55.7
May 1749    85.0
dtype: float64

Examples using pmdarima.datasets.load_sunspots