ZeevG/python-forcast.io — pull request #19 by jetheurer (2014-07-02 21:15:35+00:00)
Title: added an option to view forecastio irradiance data

Forecast.io has a beta option to view irradiance data. I'd like be able to use this, so I added the parameter solar to the method: forecastio.api.load_forecast

The way to view this data would be:

import forecastio
from forecastio.utils import PropertyUnavailable
forecast = forecastio.load_forecast('%^&!@*#(@&#@()*$#',37.8267,-122.423, solar=True)
byHour = forecast.hourly()
for hourlyData in byHour.data:
try:
print hourlyData.time, hourlyData.solar
except PropertyUnavailable: pass

This irradiance data is only available during daylight hours, which is why you we need to skip occasionally.