Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added an option to view forecastio irradiance data #19

Closed
wants to merge 6 commits into from
Closed

added an option to view forecastio irradiance data #19

wants to merge 6 commits into from

Conversation

jetheurer
Copy link

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.

@ZeevG
Copy link
Owner

ZeevG commented Jul 4, 2014

Thanks a lot for the contribution. At this stage, I am a bit hesitant to add support for beta feature of the API. My main concern would be the irradiance data is removed in future updates or the response data is changed in some way. This could be a problem if people build programs which rely on this data.

I couldn't find any information on the Forecast.io docs. Do you know if Forecast.io has any plans to officially document and support the irradiance data option?

Perhaps another option would be to allow a custom forecast url, this would mean the solar flag (and any other option) could be used manually?

@jetheurer
Copy link
Author

That sounds like a great idea! I will modify the code as such.

I'm not sure if Forecast.io has plans to officially support this, but I do know that you can request access by emailing them. They will provide documentation when they give you access.

@jetheurer
Copy link
Author

What do you think of this?

@ZeevG ZeevG added this to the v2 milestone Aug 18, 2014
@ZeevG
Copy link
Owner

ZeevG commented Sep 20, 2014

Thanks for the help @jetheurer.

I decided not to merge this branch. After looking at this and #18 I have decided to refactor the way API calls are initially made by moving this and the functionality in #18 to other functions.

This issue has been implemented in forecastio.manual() which is in version 1.3.0

It should make the forecastio.load_forecast() function much easier to deal with rather than cluttering it with lots of additional functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants