Page 1 of 1
Warmest/coldest/wettest/windiest etc since...
Posted: Sat 14 Mar 2015 1:44 pm
by mcrossley
Inspired by
this thread I thought, those would be really simple queries on the MySQL database...
First stab result...
http://weather.wilmslowastro.com/since.php
Re: XXX since...
Posted: Sat 14 Mar 2015 2:14 pm
by PaulMy
Looks very nice Mark.
Now to borrow the code and see what I can do
Paul
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Sat 14 Mar 2015 2:30 pm
by mcrossley
I have added the usual view=sce or view=src option.
This is a quick hack - the units are all hard coded for example.
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Sat 14 Mar 2015 4:24 pm
by mcrossley
I have just added, Warmest/coldest/wettest/windiest etc in <month> since...
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Sat 14 Mar 2015 10:37 pm
by sfws
Useful queries.
I quickly altered first to cover more standard today/yesterday rows and to output date in normal Cumulus format dd MMM yyyy.
Adjusting the 2nd month one is not so quick/simple for those using 9am roll-over where I guess need to take month from <#metdate>
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Sat 14 Mar 2015 11:15 pm
by mcrossley
Yes a 9am rollover does complicate many of these type of queries. The formatting needs some work too, for another day...
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Mon 23 Mar 2015 1:48 pm
by PaulMy
Mine can't match Mark's version but I have been learning a bit and came up with
http://www.komokaweather.com/weather/maxmin.php
It uses the Cumulus "realtime.txt" and "dayfile.txt" for the data. Today there is little difference between now and most recent past min or max, but it is interesting when the today temp or other data is the lowest or highest since several months ago.
I also have it for the Saratoga template set
http://www.komokaweather.ca/wxmaxmin.php but will likely split it to use an "include" file for the data extraction and php. Fun, and learning.
Enjoy,
Paul
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Mon 23 Mar 2015 1:55 pm
by mcrossley
sfws wrote:Useful queries.
I quickly altered first to cover more standard today/yesterday rows and to output date in normal Cumulus format dd MMM yyyy.
Adjusting the 2nd month one is not so quick/simple for those using 9am roll-over where I guess need to take month from <#metdate>
Thinking about this, all you need do is subtract 9 hours to current time in PHP for 'today', and subtract 33 hours from current for yesterdays date. Your dayfile will already have the correct 'met-date' logged against each entry.
Re: Warmest/coldest/wettest/windiest etc since...
Posted: Mon 23 Mar 2015 1:57 pm
by mcrossley
Those pages are coming along nicely Paul.