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

Annual data Summary (DAJ script) - show day-of-week

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

Moderator: daj

kapo
Posts: 246
Joined: Thu 03 Jan 2013 1:59 pm
Weather Station: Davis VP2
Operating System: Windows 10
Location: Vihtavuori, Laukaa, Finland

Re: Annual data Summary (DAJ script) - show day-of-week

Post by kapo »

mcrossley wrote: @kapo, that seems to be working OK :)

For your 'on this day' data, do you want the data from the same time on the past day as now? Is you web server in the same time-zone as your station?
Yes, it works o.k. Only problem is that I could not make langtrans to those month and daynames. I tried with that langtrans(' ') bu it did not work.. I just do not know how to get that langtrans to work in that page. I have managed to make that langrans to several pages, but not to this... I have to do english finnish and deutshe pages from that datasummary... But it is not at all big job..
And that other project, yes i want it to be in same date and same time as now, and it should automaticly run forward...I have that kind of table in my homepage now, made with Cumulus webtags, but those tags end in week backwards, but i want those table values to be at least : Month ago Three Months ago, Sixs Months ago, nine months ago and a year ago. And I have planned, that those values ​​are also compared with a graphic in a table. And both tables are all the time in my homepage. I suppose that this MySql is in same timezone, but I am not sure about that. How can I check it out, that it is sure in same timezone?

Thank You answering.

best regards
-kapo-
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: Annual data Summary (DAJ script) - show day-of-week

Post by beteljuice »

@everybody ...

... the beteljuice is still experimenting with a php version (using dayfile.txt).
Slowly getting rid of dross and adding tweaks, etc.

Current Work In Progress (Incomplete) Experiment

Now accepts any Units Of Measure as input, and allows any Units Of Measure output.
These are remembered by cookies, but if the viewer has disabled cookies the 'opted for' units will still be remembered as long as they don't 'leave' the page.

Like Marks version, there are now significant changes to the original.

Edit: Link changed
Last edited by beteljuice on Tue 21 Jan 2014 1:36 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12766
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 data Summary (DAJ script) - show day-of-week

Post by mcrossley »

Hi beteljuice, I was thinking of doing just that too! - I was going to re-use the SteelSeries gauges UoM cookie so that the settings would carry through from one page to another. I'll take a look at what you have done tomorrow.
kapo
Posts: 246
Joined: Thu 03 Jan 2013 1:59 pm
Weather Station: Davis VP2
Operating System: Windows 10
Location: Vihtavuori, Laukaa, Finland

Re: Annual data Summary (DAJ script) - show day-of-week

Post by kapo »

mcrossley wrote:
For your 'on this day' data, do you want the data from the same time on the past day as now? Is you web server in the same time-zone as your station?
I asked that from my webhotel host and he answered like that: "Works in the Finnish time zone, but of course, it is recommended
in the code to set the desired time zone, just in case." :)

best regards:

-kapo-
mikkimii
Posts: 42
Joined: Fri 23 Mar 2012 3:17 pm
Weather Station: Davis VP2
Operating System: Windows 7 x64 Pro
Location: Vilppula, Finland

Re: Annual data Summary (DAJ script) - show day-of-week

Post by mikkimii »

Thanks beteljuice and Mark for code :)

How I remove "rounding" in wind speeds? That's why because i use m/s wind units. I think it's somewhere here in code:

Code: Select all

} 
	if ($whatdata == 'windgust' || $whatdata == 'windspd' || $whatdata == 'windrun') {
	$data_arr[0] = round($data_arr[0])
But i don't figure how to do it :oops:
Br,
Mika
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: Annual data Summary (DAJ script) - show day-of-week

Post by beteljuice »

I don't really see the (decimal) point :lol:

If you really want to do it just commenting out the 'round' line should work:

Code: Select all

//  $data_arr[0] = round($data_arr[0])
Note to all NOT using C / mph / mm / hPa (mb) - your 'gradient' colours will NOT be in the expected range !

The beteljuice had to do quite a bit of fixing so that Experiment gives the same colours (and contrast text) in a 'like-for-like' way.

Edit: link changed
Last edited by beteljuice on Tue 21 Jan 2014 1:35 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Annual data Summary (DAJ script) - show day-of-week

Post by nitrx »

beteljuice wrote:I don't really see the (decimal) point :lol:

If you really want to do it just commenting out the 'round' line should work:

Code: Select all

//  $data_arr[0] = round($data_arr[0])
Note to all NOT using C / mph / mm / hPa (mb) - your 'gradient' colours will NOT be in the expected range !

The beteljuice had to do quite a bit of fixing so that Experiment gives the same colours (and contrast text) in a 'like-for-like' way.
Look promising ! I suggest you include seasons too ;)
User avatar
mikechristelow
Posts: 165
Joined: Wed 01 Feb 2012 9:33 pm
Weather Station: Watson W8681 (solar)
Operating System: Windows XP SP3
Location: Crewe, Cheshire
Contact:

Re: Annual data Summary (DAJ script) - show day-of-week

Post by mikechristelow »

:clap: :clap: :clap:

What started out as a relatively simple thought has turned into a really excellent result, whether using php or HTML/JavaScript.

Well done Beteljuice and Mark for creating something very attractive and useful!
http://www.christelow.co.uk
“It's snowing still," said Eeyore gloomily.
"So it is."
"And freezing."
"Is it?"
"Yes," said Eeyore. "However," he said, brightening up a little, "we haven't had an earthquake lately.”

User avatar
joewith
Posts: 29
Joined: Fri 18 May 2012 4:33 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 Pro
Location: Aurora, Colorado, USA
Contact:

Re: Annual data Summary (DAJ script) - show day-of-week

Post by joewith »

beteljuice wrote: The beteljuice had to do quite a bit of fixing so that Experiment gives the same colours (and contrast text) in a 'like-for-like' way.
Are you planning on releasing your "Experiment" anytime soon? I have been following this thread with great anticipation so that I can incorporate it into my site.

Thanks!
User avatar
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: Annual data Summary (DAJ script) - show day-of-week

Post by N0BGS »

Joe:

Go here: http://www.kpw3.com/c.php?view=sce

and paste the code into your own page.

Then go here: http://www.kpw3.com/css/datasummary3.css

and use that code to create the css file.

You'll have to make sure that paths to dayfile.txt and the stylesheet (.css) are correct for your site, of course.

Finally, thank David, Mark and Beteljuice for another cool script!

HTH,

--Kurt
Blitzortung Station 1809
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 data Summary (DAJ script) - show day-of-week

Post by tjaliwalpa »

This is brilliant stuff you guys, well done :clap:

Once I get my new station setup in place I shall make use of your work.
Bob
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: Annual data Summary (DAJ script) - show day-of-week

Post by beteljuice »

@N0BGS - the beteljuice hasn't finished yet ! (... and perhaps never will do)
I am currently playing and my baby is significantly changed from that which has been 'published' earlier.
Although it is still more of a revamp than rebuild. (should have started from scratch really)

ATM - I am considering multi-language facility and seasonal table option ....
- the beteljuice won't take it much beyond that, and certainly won't be doing a JavaScript or mysql version !

Even the insomniac beteljuice can only juggle a finite number of balls in the air, and there are already several versions of this kind of breakdown, including a very good one for saratoga templates.

Plus for those using mysql, wait and see what Guru Mark comes up with ..
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
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: Annual data Summary (DAJ script) - show day-of-week

Post by N0BGS »

Oh, I know. No worries. The script I pointed Joe at on my site is the latest one from your site...at least as of last night.

I just enjoy hacking (or at least attempting to hack) the scripts that you guys who really understand PHP and JS create and modifying them for my own EVIL purposes! :twisted:

I also have the Wildwood weather daily summary running on my Saratoga-based site which is very similar to what you guys are working with here. I figure if I look at enough code I may actually begin to understand it some day.

Continue to appreciate your work.

--Kurt
Blitzortung Station 1809
User avatar
joewith
Posts: 29
Joined: Fri 18 May 2012 4:33 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 Pro
Location: Aurora, Colorado, USA
Contact:

Re: Annual data Summary (DAJ script) - show day-of-week

Post by joewith »

N0BGS wrote:Joe:

Go here: http://www.kpw3.com/c.php?view=sce

and paste the code into your own page.

Then go here: http://www.kpw3.com/css/datasummary3.css

and use that code to create the css file.

You'll have to make sure that paths to dayfile.txt and the stylesheet (.css) are correct for your site, of course.

Finally, thank David, Mark and Beteljuice for another cool script!

HTH,

--Kurt
Thanks Kurt I really appreciate it! ;) And of course many thanks to David, Mark and Beteljuice for all the work they have put into this page! :clap: :clap: :clap:

I have incorporated the code that was furnished by Kurt and have noticed a couple of things as I go through the code that I can't explain although it looks like it's been provided for or I just don't see how to do it :?: :oops: :

1) The shading for 'Baro Max', 'Baro Min', 'Sunshine' and 'UV Index' isn't happening.

2) I would like to change the displays for 'Wind Speed', 'Wind Gust', and 'Wind Run' to display 1 decimal place and for 'Baro Max' and 'Baro Min' to 3 decimal places which are how they are stored in my 'dayfile.txt'.

I think I finally figured this one out. Modified $wind_dec at about line 339 from 0 to 1 and $baro_dec at about line 377 '2 : 1' to '3 : 1'

3) The last thing I have noticed ( and fixed, I think :?: ) is the field# for 'Sunshine' about line 65 which is using field 42 which returned values in the hundreds. I really think the field# should actually be 24???

My page for my site is located here.

Thanks again Kurt for bailing me out. :clap: I had bits and pieces before, but believe me it wasn't pretty and I was floundering and not making any progress! :bash: At least now I have a decent foundation!
User avatar
mcrossley
Posts: 12766
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 data Summary (DAJ script) - show day-of-week

Post by mcrossley »

I still haven't incorporated the beteljuice latest updates, but in the interests of diversifying the scripts even further :bash: :lol: I have dealt with the thing I found really annoying about the original code - the fact that the whole page reloaded every time you changed the data or year selection. I have added a touch of Ajax to just reload the data table after the initial page load.

http://weather.wilmslowastro.com/datasummary.php

Edit1: I just noticed the table title is no longer updating. I'll have a look at that later...

Edit2: Fixed.
Post Reply