Note
Click here to download the full example code
ASTM G-173ΒΆ
Reference terrestrial spectral irradiance profiles.

import pandas as pd
import matplotlib.pyplot as plt
url = 'https://www.nrel.gov/grid/solar-resource/assets/data/astmg173.xls'
df = pd.read_excel(url, sheet_name='SMARTS2', skiprows=1)
colmap = {
'Etr W*m-2*nm-1': 'Extraterrestrial',
'Global tilt W*m-2*nm-1': 'Global',
'Direct+circumsolar W*m-2*nm-1': 'Direct+circumsolar',
}
df = df.rename(columns=colmap).set_index('Wvlgth nm')
df.plot()
plt.xlabel('Wavelength [nm]')
plt.ylabel('Spectral Irradiance [W/m^2/nm]')
plt.show()
Total running time of the script: ( 0 minutes 1.368 seconds)