I have a 5 day forecast showing one of the days as being partially cloudy and therefore should be the variable cloudy.std-sprite-partly-cloudy-day{…
However the .std-sprite2-partly-cloudy-night{… is what it seems to be set to. If I change the icon coordinates for .std-sprite2-partly-cloudy-night{… The icon changes.
All the days on the 5 Day Forecast should be only day time conditions, correct??
Isn’t that right? It’s showing you that Sunday evening/night will be cloudy (since you’re already part way through Sunday) and that the remainder of the week will be partially cloudy or sunny in the day?
It changes to the live data for the current day and the first of the 5 day forecast.
The data you have posted is only shown for super admins and is the current template represented as it would need to be for saving as a template file - not anything to do with the forecast data. I think we should hide that behind some “click to show” thingy.
Found an example of what I was trying to show the first time. It shows Tuesday, Wednesday, Saturday , and Monday as partially cloudy. But why is Thursday partially cloudy at night?
I wonder if it’s to do with when the maximum temperature is reached or something like that.
I know all we’re doing is showing what the Forecast API is returning to us, so I think probably it would need to be referred to the folks at Forecast for a definitive answer.
I am not sure where exactly to contact Forecast.io about this. I don’t seem to find a good place to ask anything. Everything I think would take me to somewhere to ask keeps bring me back to the Dark Sky Forecast IO Api page.
I would be glad to contribute the changes to the template, however it would need a new Icon set, as the one I am using is licensed. If someone is interested in making a new icon set that has three different sized icons, please contact me.
…the data returned is rendered as-is without us modifying the name of the weather condition
Are you sure this is also true for the 5 day forecast template that uses the png files? I may be completely wrong here in trying to put this together on how it works.
From what I can tell the names are re-defined. it looks like the Return Forecast returns something like this for the daily wicon: “Daily wicon wi-day-cloudy”. I am assuming that the day-cloudy part is what is getting passed along in the 5 day forecast template. In the template code I see that wi-day-cloudy is somehow translated to “.std-sprite-cloudy”. If I cut that down a bit “day-cloudy” translates to “cloudy”.
The only alteration to the information provided by forecast is to add another property called wicon (in addition to the icon property that already exists). That is done here:
You can see from that array how the original icons will remain set as they are from the forecast IO. The original icon strings are appended to the .st.sprite class tag in the template itself (not in the main code)
Someone is going to wack me if I keep responding to my own post.
I think my problem is my idea of what the information is, that is being returned. If I re-examine what forecast.io is sending back, it starts to become clear. I am seeing night icons because the description is telling me the main weather difference of the day and when. So if the clouds come in at night I see a weather icon on that day that corresponds with clouds and night. If the clouds come in during the day, I see clouds and day.
I think that I might need to write a different kind of 5 day, for me 7 day, template here. Question is how.
In response to my original question:
All the days on the 5 Day Forecast should be only day time conditions, correct??
I heard back from Jay at Forecast IO, here is a cut down version of the question and answer:
Hi Jay,
I have a seven day forecast, pretty simple one, however it is returning some night time icons. Is there an easy way to get just day time conditions and icons? Currently I am unable to figure out how to do that, as the general call to the api returns some descriptions and and icons for night. Would I need to query for a designated time for each day during the day to do this?
Hi Colin,
There is not, at present, any way to get a forecast for anything other than a full day: that is, there is no specific “daytime” forecast.
However, there’s a workaround. Our forecasts are pessimistic, returning the “most important” condition observed in a given period. The only nighttime icon we ever return is “partly-cloudy-night”; if you ever see that icon, it means that the weather is clear during the day. So, in that case, you can simply treat the weather as if you received a “clear-day” icon.
You could certainly write a conditional statement in the module that transposed those two states - if we were to include it in the main product we would have to have it as an option and have to word it so that it could be clearly understood.
Although you could argue that it would be clearer with the transposed states in place by default!