Well, I’d suggest you pick up and move 55 miles, but that’s probably unlikely.
Man, this stinks… I have such an awesome idea in the works, but my creative juices are in limbo until I can find access to free historical weather data…
Based on my search, it looks like TWC has (or had) an almanac section in their api but we are not getting it in WebCoRE. (https://twcservice.mybluemix.net/rest-api/)
They have tools to test it but I couldn’t get it to work. Not sure if it is still supported or not.
I will take a look tomorrow. Thanks for the link!
Uggg… I have tried dozens of variations, but no luck with that mybluemix link.
I get blanks, nulls or “error”: “no response from server”
Thanks for the info though… I am not giving up on this idea…
I am seriously considering creating my own API for historical weather data in my location…
Although, if I go this route, then unfortunately I will not be able to publicly share my piston.
Well, I finally took the time to create my own API listing my city’s record/average Highs and Lows.
I think I broke my record on this one… It is displaying at least 12 dataPoints in a single gauge…
(not counting the hover text)
Essentially, this compares the current temp to the daily high/low… and that is compared to the average high/low… and all of that is kept within the bounds of the record high/low.
If I ever find a free API that lists historical data, I will share this baby in a new thread.
(there are many elements to it that I do not want to reveal yet)
Interesting… Each dayLength is shorter than the last, and yet, we have not even begun the hottest two months of the year.
This image shows data for the entire year:
(The yellow spike is a single fake data point pointing to today)
The annual variation is much like the daily variation. The hottest part of the day is never at noon but a little before sunset and the coolest part of the night is a little before sunrise. This long days build up heat in the ground which keeps warming the days up long after the days begin to shorten. It is quite an interesting phenomenon.
I am curious how you did this. Did you download all the records for the year and store them somewhere?
You have created another gauge for me to envy. I used to have only the day length gauges for like 6 months and now I have like 6 or 7. I am really enjoying this!
I like the accuracy of WUnderground, so I did it manually.
(one year = 1,830 dataPoints, stored on my RPi)
Step one took about 3 (tedious) hours (30s per day), but this way, I am not reliant on a monthly fee, or held at the whim of some other company who decides to change their API policy.
(I mean, how often do we have a day that breaks the old record?)
I am actually OK with these dataPoints being static for the most part. If we have a record breaking day, I can just update that single dataPoint for future reference.
Of course, if I find a free API (with historical data), it will be easy to insert in this.
… and trust me… you guys will want to see this final product!
(I may have surpassed myself)
For some reason, I found this phenomenon interesting as well…
It reminds me how the outer track on a raceway is a longer path than the inner one…
(although the imaginary blue lines are not quite as prominent in the Winter)
Note to self:
I think I prefer the record high & low to be stored in a 5 day average (blunt) instead of my earlier 3 day average (sharp).
I found one site (climatespy.com) that seems to have all the data for my area with a nice interactive graph but no access to the data in table form so too difficult to extract
I was thinking if I need to create my own API for this (whatever you are creating), I can use the google sheets interface to look up data by date. I just need to get all the data into a spreadsheet
I admit, I made more work for myself than necessary. I wanted to be able to visualize the data, so I typed it all into a spreadsheet first… But the real magic happens in my text.json file, which is stored on my RPi.
This lets me grab that data using minimal coding afterwards; for example here is today’s recordHigh:
There are online converters to go from spreadsheet to json, but none of them retained the structure that I needed, so I broke conventions by hand writing my local file.
Warning: This is a very boring task, so finding a free API would definitely be the preferred method.
Note to self:
My averageLow (orange line) varies 34 degrees throughout the year… which means I may convert this into a useful formula.
Something like ((Today’s averageLow - Dec averageLow) x 3) will equal a percentage from 0-100%.
(with 0% being one of the coldest days of the year, and 100% would typically be the hottest)
Similarly to how my dayLengthPercentage shows us where we are in the year with regards to sunlight… This new formula will tell us where we are within the year based on the expected temperature!
I could really see other pistons benefiting from having that number stored in a @global.
It’s been a while. Did you finish this gauge? I am curious about your scale. Do you have anything you can share?
Apologies if you already shared somewhere and I missed it.
“Finish” is such a strong word… LOL… but I am extremely happy with it’s current version.
(Last edited 3 days after this post.)
As far as sharing… Don’t forget I created custom code pointing to a custom API filled with data for my custom location… So sharing it would be pointless. (unless I am trying to show off my coding skills)
Even though this is my all time favorite gauge, (and in my top five pistons of all time), until someone finds a free API listing these 4 dataPoints:
- the average high & low for today’s date
- the historical (record) high & low, for today’s date
… this code will remain for clients only. (due to the hours of labor required)
… or in other words:
I hope you can understand…
I may be able to answer this one though… Can you re-word the question?
I noticed you posted an image of this gauge in this post
I am curious what the ranges (colors) represent in the gauge and would like to confirm the six numbers presented. Given the up and down arrow, I assume those are the min and max for the day although I wasn’t sure if maybe they were minimum and maximum highs or actual minimum and maximum record temperatures. Are the top three numbers averages? I know I could fill in whatever I like but just curious what you are using. Also curious about the scale only having 3 division with many minor tics but no labels. Seems like a lot of data in one gauge which is really nice. As you know from this post, I created my own record temperature API to draw from.
I am a bit tied up at the moment, but I will send you a message in about 12 hours.
Edit: Message sent