Page 1 of 2
Season Average Temps - worthy of webtags?
Posted: Sat 19 May 2012 1:31 pm
by RayProudfoot
The discussion about wettest and driest years reminded me of another set of records I currently calculate manually and reflect on my
Season Averages page. I made a decision that spring for example, would comprise the months of March, April and May rather than starting on the vernal equinox and ending on the summer solstice both of which are variable.
Is this something that others might find useful for their records? The problem that immediately comes to mind is what months comprise a season and the fact that the southern hemisphere's are the opposite of those in the north. And for tropical stations the four seasons don't really exist.
Is there any mileage (kilometerage?

) in Cumulus calculating season average temperatures or should I continue to calculate them manually?
Re: Season Average Temps - worthy of webtags?
Posted: Sat 19 May 2012 1:39 pm
by steve
I think it's a reasonable suggestion for an addition to Cumulus, yes; and I agree with your choice of seasons (for the UK, anyway). I wouldn't consider it high priority for adding to Cumulus, though, given that it's reasonably easy to calculate for yourself (as you do), compared to some of the other enhancements in the queue.
Re: Season Average Temps - worthy of webtags?
Posted: Sat 19 May 2012 1:51 pm
by RayProudfoot
Thanks Steve. Happy for it to go on the backburner until you're up-to-date.

Re: Season Average Temps - worthy of webtags?
Posted: Sat 19 May 2012 2:34 pm
by beteljuice
Those ARE the official northern hemisphere definitions ( a few exceptions)
http://en.wikipedia.org/wiki/Season#Reckoning
But I'm sure I came accross some country where Winter is only two months, and I think Summer was four ?
Re: Season Average Temps - worthy of webtags?
Posted: Sat 19 May 2012 2:42 pm
by RayProudfoot
beteljuice wrote:But I'm sure I came accross some country where Winter is only two months, and I think Summer was four ?
Can't be the UK then!

Given our rubbish weather this spring (end of March excepted) it's fair to say winter lasts 11 months, spring and autumn a couple of days and summer - 20 minutes next Wednesday!

Re: Season Average Temps - worthy of webtags?
Posted: Tue 12 Jun 2012 10:40 pm
by bigmac
Appreciate there is no web tag for this, but is there not a way of calculating these automatically from, say, the data summary page, rather than you doing it manually?
Thinking more about this, could those of us running a MySQL database actually generate our own "web tags" based on a template of calculations?
I don't have the technical know how to attempt this, but in my mind, a script could be created (that anyone could add to, so a kind of ongoing project) of any and every conceivable weather stat that you could want based on figures stored in the database. You then just call up the appropriate "web tag" from the script to be placed in your own web page. I suppose its a bit like the PHP web tags script, but only more so.
I've been thinking about this for a while, having seen some peoples websites that show all sorts of averages, but not having a clue how to do it.
Thoughts anyone, or am I talking out of my proverbial?
Re: Season Average Temps - worthy of webtags?
Posted: Tue 12 Jun 2012 11:07 pm
by beteljuice
Thinking more about this, could those of us running a MySQL database actually generate our own "web tags" based on a template of calculations?
There are already members using MySQL and / or php to process (a copy of) dayfile.txt - mainly to produce their own graphs, but also custom table data.
Re: Season Average Temps - worthy of webtags?
Posted: Wed 13 Jun 2012 11:20 am
by RayProudfoot
Bigmac,
I'm pretty sure the average temperature on the Data Summary page uses the same average temperature as my SQL below.
If you're already running a MySQL database then you have the capability of calculating the season average temperature already. I import the contents of dayfile.txt into an Access database to determine it.
Here is the SQL my Access query uses. Apologies if you already know this.
SELECT Avg(DayFile.AverageTemp) AS AvgOfAverageTemp
FROM DayFile
WHERE DayFile.Date Between [Start Date] And Date()-1;
This prompts the user for the start date and then calculates the average of the average temperature in Dayfile.txt for all entries from the user-defined start date up to yesterday. I only run it 4 times a year to show the final average temperature and then update my season average webpage. But there's nothing to prevent you from updating it each day through the course of a season.
I'm sure someone with advanced knowledge of SQL could programmatically determine the season start date from the current date. For example:-
If Date() > 01/03/2012 AND Date() < 02/06/2012 THEN SpringStartDate = 01/03/2012
ElseIf Date() > 01/06/2012 AND Date() < 02/09/2012 THEN SummerStartDate = 01/06/2012
ElseIf Date() > 01/09/2012 AND Date() < 02/12/2012 THEN AutumnStartDate = 01/09/2012
ElseIf Date() > 01/12/2012 AND Date() < 02/03/2013 THEN WinterStartDate = 01/12/2012
End If
You would have to programmatically determine the year element of Date().
I can't program in PHP but as that language is capable of making decisions and performing calculations I would have thought you could run the PHP equivalent of the above SQL and for it to show the result.
Hope that helps.
Re: Season Average Temps - worthy of webtags?
Posted: Wed 13 Jun 2012 11:45 am
by Charlie
RayProudfoot wrote:beteljuice wrote:But I'm sure I came accross some country where Winter is only two months, and I think Summer was four ?
Can't be the UK then!

Given our rubbish weather this spring (end of March excepted) it's fair to say winter lasts 11 months, spring and autumn a couple of days and summer - 20 minutes next Wednesday!

Here in Canada, Summer is sometimes defined as 2 weeks of poor sledding.

Re: Season Average Temps - worthy of webtags?
Posted: Thu 14 Jun 2012 10:53 am
by bigmac
There are already members using MySQL and / or php to process (a copy of) dayfile.txt - mainly to produce their own graphs, but also custom table data.
RayProudfoot wrote:I can't program in PHP but as that language is capable of making decisions and performing calculations I would have thought you could run the PHP equivalent of the above SQL and for it to show the result.
That's why I was suggesting this. I also don't have the knowledge (although I always try and learn) and I know there are many others on here who equally don't have the skills but who like to implement these kinds of things.
That was why I suggested an on-going collabarative project that anyone can add their bit to, when they work out a particular calculation for a given data set for any webtags that don't exist.
As an example, in a previous post I was talking about indicating what the wettest and driest years were, obviously Ray's request here as well, but I know there have also been many other requests for other webtags that Steve hasn't (yet) implemented.
Can anyone suggest a good beginners guide to performing queries of MySQL databases in PHP (or HTML) to give me a start on this?
Re: Season Average Temps - worthy of webtags?
Posted: Thu 14 Jun 2012 12:52 pm
by RayProudfoot
bigmac wrote:That's why I was suggesting this. I also don't have the knowledge (although I always try and learn) and I know there are many others on here who equally don't have the skills but who like to implement these kinds of things.
That was why I suggested an on-going collabarative project that anyone can add their bit to, when they work out a particular calculation for a given data set for any webtags that don't exist.
As an example, in a previous post I was talking about indicating what the wettest and driest years were, obviously Ray's request here as well, but I know there have also been many other requests for other webtags that Steve hasn't (yet) implemented.
Can anyone suggest a good beginners guide to performing queries of MySQL databases in PHP (or HTML) to give me a start on this?
Google is your friend in situations like this. I 'googled' "MySQL queries" and it returned several hits which might help you. But the 'bible' for learning HTML and other web-based skills should always be
www.w3schools.com and in particular
http://www.w3schools.com/sql/default.asp for a SQL Tutorial.
I agree sharing snippets of code would be a good idea. Cumulus does have a Wiki section. That might be a good starting point for those wanting to share things with others.
Good luck with your project. One day I too want to learn SQL for online databases.
Re: Season Average Temps - worthy of webtags?
Posted: Thu 14 Jun 2012 1:03 pm
by gemini06720
RayProudfoot wrote:Cumulus does have a Wiki section. That might be a good starting point for those wanting to share things with others.
Ray, contrarily to your proposal, the WIKI in its design (I have been trying to modify a few of those package WIKI on my development computer) does not lend itself for a tutorial repository - I find the WIKI packages too limited, lacking interactivity.
Re: Season Average Temps - worthy of webtags?
Posted: Thu 14 Jun 2012 1:19 pm
by RayProudfoot
gemini06720 wrote:Ray, contrarily to your proposal, the WIKI in its design (I have been trying to modify a few of those package WIKI on my development computer) does not lend itself for a tutorial repository - I find the WIKI packages too limited, lacking interactivity.
How strange Raymondo. There is a section marked 'Articles' in the Cumulus Wiki and once you have applied for a User Account I would have thought everything would be in place for you to create a suitable document. It appears the account is quite separate from your Cumulus one though. Have you tried that route?
Re: Season Average Temps - worthy of webtags?
Posted: Thu 14 Jun 2012 2:42 pm
by beteljuice
I believe Ray is putting the emphasis on
Interactive, as exemplified by the W3 link he gave.
This allows you to play a little before you truly screw up your own server

Re: Season Average Temps - worthy of webtags?
Posted: Fri 15 Jun 2012 7:57 am
by gemini06720
beteljuice, thank you for pointing out the key words: lacking interactivity - I have found that lack on interactivity all WIKI packages I have tried so far!
Ray (the other Ray), a WIKI is 'stiff', one sided - someone puts information in the WIKI; one searches for information in a WIKI and usually cannot find the appropriate information as the search facilities (engine) are quite limited and the general organization of the WIKI (menus and all) way too restrictive in my views; one then simply gives up looking for information in a WIKI.
In the past, I have entered and/or modified articles in the WIKI - updating an article is somewhat of a pain.
Fortunately, I know the organization of the Cumulus WIKI pretty well and can find my way almost everywhere. But, a few weeks ago, as I could not remember for sure if a certain information I had read about was in the WIKI or not, I searched the WIKI - unfortunately, I never found what I was looking for. The other day, as I was comparing pages from the WIKI with those I had saved on my computer (as PDF files), I found the information I had been looking for ... except the search engine of the WIKI never found it.
The Cumulus WIKI is not alone - the Weather Display WIKI is as bad in providing useful information unless one knows where to look for that information, which really defeat the concept of a storage area where information is easily and readily available...
I have not yet found a good replacement for the WIKI ... Other than having some areas of a forum which are locked (areas where the tutorials are posted), with additional areas which are hidden and with limited access (areas where knowledgeable people can post suggestions and modifications to the tutorials), and finally, open areas where users can ask for assistance but only if they have taken the time to completely read the tutorial.