Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Annual Extremes - Year-by-year

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
tjaliwalpa
Posts: 293
Joined: Sun 18 Apr 2010 9:47 am
Weather Station: Davis VP2
Operating System: Linux Lite Ubuntu 16.04
Location: Karoonda, SA
Contact:

Annual Extremes - Year-by-year

Post by tjaliwalpa »

I've decided to include annual records or extremes on my website. My service provider web server that I use does not use PHP. I know there are webtags for extremes during the current year, but I can see anyway of extracting extremes using webtags for each year in the same way that the monthlyrecord.htm does using the ByMonth webtags with the mon=? In the webtag.

It would be great if the tags such as <#YearTempH> had a variable similar to the ByMonth tags.

Am I barking up the wrong tree? Is there another solution? I could of course take the dayfile and put it in Excel and extract the extremes, but I was looking at a method that could be used on any Cumulus website and would not need the data to be hard coded into the webpage.

I want to produce a records page that is similar to the monthlyrecord page. I've started it but have come to a halt.

http://members.aussiebroadband.com.au/m ... record.htm
Bob
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Annual Extremes - Year-by-year

Post by mcrossley »

No simple way that I can think of without PHP (and a database would make it even easier). Without any processing on your server you would have to automate on your weather computer (you could install PHP on there, which would mke the code largely reusable by others) and (re-)generate the page once a day after the end of day processing.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Annual Extremes - Year-by-year

Post by steve »

tjaliwalpa wrote:It would be great if the tags such as <#YearTempH> had a variable similar to the ByMonth tags.
Yes, I agree, but at the moment that's not easy to do, as the data isn't stored anywhere. The code for the web tags in Cumulus would have to trawl through dayfile.txt for each web tag, and that's very inefficient, particularly as the data for previous years never changes. At some point I will look into storing the data in Cumulus in some form that it's easier to get into web tags, an SQL database or simply a 'flat' table.

I think that as the data for previous years does never change, the simplest, most practical solution at the moment is to do as you suggest and hard code the data - you would only have to do it once.
Steve
tjaliwalpa
Posts: 293
Joined: Sun 18 Apr 2010 9:47 am
Weather Station: Davis VP2
Operating System: Linux Lite Ubuntu 16.04
Location: Karoonda, SA
Contact:

Re: Annual Extremes - Year-by-year

Post by tjaliwalpa »

Thanks Steve and mcrossley,

I'm not familiar with PHP so will probably not venture there yet.

Steve, as you suggest and as I first thought, hard coding the data is probably easiest and is only a once off task for me. All time data is easily done with Cumulus web tags as is the current year. It's just a matter of inserting the previous year's data after New Year as the current year tags will continue.

On another slightly related topic, I changed the tags in the monthlyrecord.htm so that the current month comes up as default in the table, including the label at the top of the table. The default is for January to display. I've just used the standard ByMonth... tags without a mon=?
Bob
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Annual Extremes - Year-by-year

Post by steve »

tjaliwalpa wrote:On another slightly related topic, I changed the tags in the monthlyrecord.htm so that the current month comes up as default in the table, including the label at the top of the table. The default is for January to display. I've just used the standard ByMonth... tags without a mon=?
Yes, the default is to use the current month.

An alternative method, just requiring one extra line, would be as described in this recent thread: https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=11508
Steve
tjaliwalpa
Posts: 293
Joined: Sun 18 Apr 2010 9:47 am
Weather Station: Davis VP2
Operating System: Linux Lite Ubuntu 16.04
Location: Karoonda, SA
Contact:

Re: Annual Extremes - Year-by-year

Post by tjaliwalpa »

I've now completed the two pages on my web site for monthly extremes (nothing new here) and for yearly extremes (an adaptation of records.htm), showing by default All Time extremes and year by year extremes. The year by year data is hard coded but the All Time and current year use cumulus <#webtags>. It will require a little work every New Year but I'm happy with the result.

http://members.aussiebroadband.com.au/m ... record.htm
http://members.aussiebroadband.com.au/m ... record.htm
Bob
hills
Posts: 692
Joined: Sat 26 Dec 2009 8:52 am
Weather Station: Fine Offset WH1091
Operating System: Raspbian Buster
Location: Crafers, South Australia
Contact:

Re: Annual Extremes - Year-by-year

Post by hills »

Nice work Bob! :clap:
Post Reply