Ejemplo n.º 1
0
 def test_daily(self):
     assert len(sunspot.daily().columns) == 8
Ejemplo n.º 2
0
"""
Importing sunspot data
======================

Importing and plotting sunspot number data.
"""

import heliopy.data.sunspot as sunspot
import matplotlib.pyplot as plt

###############################################################################
fig, ax = plt.subplots()

# Plotting Daily
data_daily = sunspot.daily()
print(data_daily.keys())
x_daily = data_daily['DecD']
y_daily = data_daily['Daily']
ax.plot(x_daily, y_daily, label='Daily')

# Plotting Monthly
data_monthly = sunspot.monthly()
print(data_monthly.keys())
x_monthly = data_monthly['DecD']
y_monthly = data_monthly['Monthly']
ax.plot(x_monthly, y_monthly, label='Monthly')

# Plotting Yearly
data_yearly = sunspot.yearly()
print(data_yearly.keys())
x_yearly = data_yearly['Y']