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

Yet Another Dayfile Reader (PHP)

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

Moderator: daj

User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

May I gently remind you all that in the very first post ...
the beteljuice wrote:Anyone can 'play', but the beteljuice will NOT be answering any 'general' enquiries along the lines of "How do I ..." and "I want ...".
... and my 'quota' of good guy helpfulness is pretty much stretched out at the moment.
Sutne wrote:Is it possible to add a column row and have the year totals as well
... most things are possible (although that seem seems a little bit overkill IMHO), If you remember whilst we were messing with modifying the code, that's what it did.)

If / when I do a redistribution, PM me and if I'm in a good mood / compos mentis I'll give you a 'patch' so you can have year averages AND totals (although totals might break the cell widths)

So spake the beteljuice

Any more want the year rain alternative option ???
Image
......................Imagine, what you will KNOW tomorrow !
berwickw
Posts: 4
Joined: Mon 22 Jul 2019 9:14 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7

Re: Yet Another Dayfile Reader (PHP)

Post by berwickw »

+1 for the new rainfall option :)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

@Sutne ...

All the beteljuices cogs weren't engaged when you enquired ..
Sutne wrote: Is it possible to add a column and have the year totals as well
There simply isn't room for another column in the existing layout, especially one that could contain a large number - doable, but sorry, you're on your own with that way.

The way the table is constructed the 'year' column value has been declared long before any maths are performed, so not easy to even create a 'mouse-over' year total value without a recode.

Getting the values is no great hardship - if you <view-source> http://beteljuice.co.uk/daytest/abasic7 ... a=rainfall you'll see ...

Code: Select all

<div id="tableData">
<!-- 2019 rainfall TOTAL > 469.8 -->
<!-- 2018 rainfall TOTAL > 829.2 -->
<!-- 2017 rainfall TOTAL > 747.4 -->
<!-- 2016 rainfall TOTAL > 714.2 -->
<!-- 2015 rainfall TOTAL > 664.4 -->
<!-- 2014 rainfall TOTAL > 749.2 -->
<!-- 2013 rainfall TOTAL > 972.8 -->
<!-- 2012 rainfall TOTAL > 689.2 -->
<!-- 2011 rainfall TOTAL > 943.4 -->
<!-- 2010 rainfall TOTAL > 717.8 -->
<!-- 2009 rainfall TOTAL > 829 -->
<!-- 2008 rainfall TOTAL > 218.2 -->
    <div id="table_container">
It's putting it somewhere 'useful' that is the problem :?
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
billy
Posts: 255
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi bullseye
Location: Gooseberry Hill, Western Australia

Re: Yet Another Dayfile Reader (PHP)

Post by billy »

I share with Phil the same desires for monthly rainfall totals in the year averages table and an indifference to daily averages. I had been contemplating doing something about if for a while and hadn't got around to it until a few days ago. I started modifying the dayfile reader and then when I got into some difficulty (with colouring cells) thought I had better check the forum :oops:.

So, in short, beteljuice, I support the request - hoping this might be like chucking a dog a bone ;). I will throw in a couple of other thoughts.

First, a running total for the current year immediately below the monthly totals in the daily summaries table would be really useful. There are two reasons for this: (a) here in southwest Western Australia we get most of our rain in winter (Perth has the wettest winter and the driest summer of any Australian capital city) and we seem to be at or near the forefront of climate change with respect to a reduction in annual rainfall (already down about 30% on the long term average) so there is a lot of focus on "how is our rainfall going this year?" A running total would make this easy to follow - at least for the current year. And (b) if it was also available in the seasonal table it would solve the "total column" issue. It would be too messy interleaved into the year average table.

Second, the averages in the year averages table include months with incomplete data sets. I was planning to exclude these - if I figured out the code!
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

billy wrote:Second, the averages in the year averages table include months with incomplete data sets. I was planning to exclude these
That would only make the year average figures more inaccurate.

They are actual averages ie. over the number of days where records exist rather than days in month.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
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: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

I was revisiting this and playing with doing a complete rewrite using SQL queries rather than making the SQL emulate a dayfile! But it raised a question... Are the seasonal figures correct?

Shouldn't 1st December 2018 be the start of Winter 2018, not 2019?
Winter 2018 being Dec 2018 -> Feb 2019.

If so all the Decembers in the seasonal table are associated with the wrong year? Indeed the whole winters are!
User avatar
PaulMy
Posts: 3831
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: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

Good point Mark,
For winter 2019 season temperature could be fine from December through February 2019-2020. However, from a snowfall perspective winter season 2019 December-2020 February would miss out November snow fall and also the occasional October and also March and April BUT then snowfall is not data that is included the the script... http://www.komokaweather.com/weather/be ... maryCU.php and click to Seasonal

This is likely not official: http://www.calendarpedia.com/when-is/winter.html

For other script examples:
http://www.komokaweather.com/komokaweat ... freeze.php
http://www.komokaweather.com/komokaweat ... detail.php and click on Seasonal summary
http://www.komokaweather.com/komokaweat ... windex.php

Enjoy,
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
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

Shouldn't 1st December 2018 be the start of Winter 2018, not 2019?
Winter 2018 being Dec 2018 -> Feb 2019.

If so all the Decembers in the seasonal table are associated with the wrong year? Indeed the whole winters are!
B*GGER :bash:

I really don't think I'm upto a rewrite at the moment - silly it's taken so long to be picked up ...
Image
......................Imagine, what you will KNOW tomorrow !
drat
Posts: 12
Joined: Mon 29 Jun 2009 1:45 am
Weather Station: VP2

Re: Yet Another Dayfile Reader (PHP)

Post by drat »

Hi,

Just wanted to say "thank you" to Beteljuice, Mark and any others who developed this script. It's really helped me to find and fix some pretty severe errors in my dayfile. Thanks again!

Paul


http://weather.pmhahn.com
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Warning ... DANGER Will Robinson !

Post by beteljuice »

Dear all ...

As you can see from the previous posts the seasonal page has been WRONG for the last five years !


Actually the Dec / Jan / Feb data was correct, just technically associated with the wrong year :?
In other words eg. (Northern) Winter 2018 was really Winter 2017 :shock:

This will mean a change to the layout to help with readability / logic, but may initially be confusing because the 'year' starts with March.

To see what this means compare WRONG against CORRECT

Perhaps I should make (header) Jan, Feb colour red or blue rather than light gray ? (Let me know)

So as I've got to do a new release I'll change the 'year' rainfall and evt Month 'daily' averages to totals, with the overall (totals) month averages at the bottom LIKE THIS

Anybody unhappy with the changes :( - let me know ASAP

the beteljuice :bash:
Last edited by beteljuice on Sun 28 Jul 2019 9:41 pm, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
PaulMy
Posts: 3831
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: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

The testers :bash: :bash: :bash: :bash:

Looking good on that LIKE THIS link.

Enjoy,
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
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

Dear Enjoy Paul ..

The Users :bash: :bash: :bash:

Your Jan 1st EVT figure is actually a large negative value (discussed elsewhere) and is screwing up the averages / totals :P
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
PaulMy
Posts: 3831
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: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

Hopefully fixed.

Enjoy,
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
Image
Mapantz
Posts: 1809
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

Incredible - That's the sort of thing even I would pick up on... :lol:

Despite the problem, it's nice to see older scripts being worked on with minor adjustments etc. :)
Image
User avatar
billy
Posts: 255
Joined: Mon 30 Nov 2015 10:54 am
Weather Station: WLL / Davis VP2+
Operating System: RPi bullseye
Location: Gooseberry Hill, Western Australia

Re: Yet Another Dayfile Reader (PHP)

Post by billy »

beteljuice wrote: Sat 27 Jul 2019 8:41 am That would only make the year average figures more inaccurate.

They are actual averages ie. over the number of days where records exist rather than days in month.
Thanks for pointing that out - mine doesn't do that so I have introduced a glitch somewhere :groan:
When using monthly totals in the yearly summary table (rather than daily averages), I guess a monthly value with some missing days could be weighted by the proportion of days missing.

I modified my code to display running averages in the monthly summary table. It turned out to be quite simple to implement - once I understood the code a little better. I am happy to post the few steps involved but suspect I am the only person who is interested in this. The cell colouring needs tidying up, which I will do if my understanding of the code gets to the next level ;)

Annotation 2019-07-29 095945.png
You do not have the required permissions to view the files attached to this post.
Post Reply