Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Top 10 Records Page
Moderator: daj
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Thanks David, you may want to change the number of decimal places on your annual rain records as I set them to integer for mm (and comment out the solar records)
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Top 10 Records Page
I have taken Mark's code and have my top_10.php working but noticed the highest Hours Sun are all at 9.9. I have checked the MySQL database and that is the highest recorded there, however the dayfile has quite a number with 10.0 and more. Is there something in the ImportCumulusFile that I need to change to have it import correctly? All the other imported data seems to be valid.
Paul
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
I'll takes look later Paul, it sounds like another case of a text vs. numeric sort. Odd that it is working on my page though.
-
- Posts: 252
- Joined: Fri 24 Jun 2011 5:57 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 10
- Location: Lamoine, Maine, USA
Re: Top 10 Records Page
Paul,
Check to see which version of the ImportCumulus file you are using; earlier version did not have the correct number of decimal places, which results in a limit of 9.9 and check your mysql table to make sure that field is set to decimal 3,1. Next recreate the table and that should fix the problem.
Kerry
Check to see which version of the ImportCumulus file you are using; earlier version did not have the correct number of decimal places, which results in a limit of 9.9 and check your mysql table to make sure that field is set to decimal 3,1. Next recreate the table and that should fix the problem.
Kerry
- JennyLeez
- Posts: 316
- Joined: Wed 16 Dec 2009 2:32 am
- Weather Station: La Crosse WS3083
- Operating System: Windows XP, Win7 & Win 10
- Location: Wairoa, Hawkes Bay. New Zealand.
- Contact:
Re: Top 10 Records Page
Hi Paul,PaulMy wrote:I have taken Mark's code and have my top_10.php working but noticed the highest Hours Sun are all at 9.9. I have checked the MySQL database and that is the highest recorded there, however the dayfile has quite a number with 10.0 and more. Is there something in the ImportCumulusFile that I need to change to have it import correctly? All the other imported data seems to be valid.
Paul
I was using version 1 of ImportCumulusFile and also had a column of 9.9 for sunshine hours. I altered the decimal to 3.1 as Kerry suggested but to no avail. I also had a column of zeros for the Low humidity
From reading some of the other posts I decided to leave version 1 intact as I did not want to muck up my historical highcharts. I created a second database and using ImportCumulusFile V2 (calling it ImportCumulsFilev2.php for want of something more original) updated that. Then just changed the database name, username, password to that database in the top10s script.
This has fixed both the sunshine hours and humidity values. Here is my attempt:
http://wairoa.net/weather/top10s.htm
Many many thanks Mark. I love this new page. Not only is the information interesting for readers but the colours are cool.
Cheers
Jenny
Wairoa, Hawkes Bay, New Zealand Weather Station:
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
http://wairoa.net/weather/index.htm
Cumulus Topsites:
http://cumulussites.net/
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Top 10 Records Page
I had downloaded an old version and now updated to v.2.4 and that works well. I have the Top_10 on my http://www.komokaweather.com Station Historical. Having a bit of an issue on the Saratoga templates site and still working on that.
Thanks Mark, Kerry and Jenny
Paul
Thanks Mark, Kerry and Jenny
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Top 10 Records Page
It seems that de database wil not been overwritten when a correction is made in the past I changed a record windgust in feb 2011 but the old value stayed in the database and my top10.php, I've changed it in the d manually ( I did upload the dayfile.txt and executed the import.php script..)
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Ron, rather than overwriting every time, the script imports new or missing entries, so you could delete that day in the table and run the import again - probably easier to do as you did and amend a single entry though.
Edit: That is not quite true, actually the script does try and import all the data each time, but as there is a unique key on the date the insert of any data that already exists silently fails, but that lookup and failure happens really quickly compared with inserting a new row. The net effect is the same, only missing and new entries are added to the table.
Edit: That is not quite true, actually the script does try and import all the data each time, but as there is a unique key on the date the insert of any data that already exists silently fails, but that lookup and failure happens really quickly compared with inserting a new row. The net effect is the same, only missing and new entries are added to the table.
Last edited by mcrossley on Sun 27 Oct 2013 5:12 pm, edited 1 time in total.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Top 10 Records Page
Aha , thanks for the explanation Mark
- rogerthn
- Posts: 516
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Top 10 Records Page
Many thanks Mark!
I do note have anything ready to be shown for the public yet but maybe my function dateUpdated could be useful for other?
Usage can be as below
I do note have anything ready to be shown for the public yet but maybe my function dateUpdated could be useful for other?
Code: Select all
// Get date of first or last update
function dateUpdated($what = "first") {
global $dayFileTableName;
if ( $what == "first" ) {
$query = "SELECT min(LogDate) FROM $dayFileTableName";
} else {
$query = "SELECT max(LogDate) FROM $dayFileTableName";
}
$result = mysql_query($query);
if (!$result) {
die('ERROR - Bad Select Statement (4) - ' . mysql_error());
}
$row = mysql_fetch_row($result);
return $row[0];
}
Code: Select all
Records began <?php echo dateUpdated("first"); ?>, last update <?php echo dateUpdated("last"); ?>.
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Thanks, I'm sure some people will find this useful.
- rogerthn
- Posts: 516
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Top 10 Records Page
Besides start and end date from DB I can now display top N records
e.g. http://minegen.myftp.org/weather/top10s.php?limit=15
Search for $limit in source and please note that needs to be replaced with
e.g. http://minegen.myftp.org/weather/top10s.php?limit=15
Search for $limit in source and please note that
Code: Select all
'LIMIT 10'
Code: Select all
"LIMIT $limit"
- N0BGS
- Posts: 205
- Joined: Sat 10 Nov 2012 2:26 am
- Weather Station: Davis Vantage Pro 2
- Operating System: Win10vm,VMWare ESXi 7.0
- Location: Hermon, Maine USA
- Contact:
Re: Top 10 Records Page
Interesting.
I'd like to be able to see your source code but the source link returns a blank page.
--Kurt
I'd like to be able to see your source code but the source link returns a blank page.
--Kurt
Blitzortung Station 1809
- rogerthn
- Posts: 516
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Top 10 Records Page
Strange that you get a blank page, maybe you are able to download http://minegen.myftp.org/weather/top10s.zip?N0BGS wrote:Interesting.
I'd like to be able to see your source code but the source link returns a blank page.
--Kurt
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Same here, response header = Content-Length: 0N0BGS wrote: the source link returns a blank page.
--Kurt