Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

Sun Plot

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

Moderator: daj

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Sun Plot

Post by mcrossley » Mon 25 Jul 2016 1:05 pm

I have been playing around creating a new sun graphic for my site. It shows the Sun's elevation through the day and plots when it has been sunny (answer: not very often this summer).

Here is a sample from today...
sunplot.png
And the current test link... [removed]
What do you think, promising?
You do not have the required permissions to view the files attached to this post.
Last edited by mcrossley on Tue 26 Jul 2016 8:56 am, edited 1 time in total.

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Sun Plot

Post by steve » Mon 25 Jul 2016 1:09 pm

Me like :)
Steve

User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Sun Plot

Post by PaulMy » Mon 25 Jul 2016 1:46 pm

Yes very nice Mark.

Could my B-L sunrecorder data work with that?

Paul

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Mon 25 Jul 2016 1:52 pm

Hi Paul, the script is self contained to plot the elevation, and uses my realtime MySQL table to plot the sun shine. So if your B-L sunshine is recorded by Cumulus into a table it would just work. You need minute by minute values for #IsSunny available from one source or another, if in a text file then you would need a parser.

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Mon 25 Jul 2016 7:21 pm

Or more like this...?
sunplot.png
Live demo... [removed]
You do not have the required permissions to view the files attached to this post.
Last edited by mcrossley on Tue 26 Jul 2016 8:56 am, edited 1 time in total.

f4phlyer
Posts: 30
Joined: Sun 13 Feb 2011 7:12 pm
Weather Station: Davis Vantage Pro 2
Operating System: RaspBerry Pi Win 10 OSx
Location: Gulf Breeze, Fl., USA
Contact:

Re: Sun Plot

Post by f4phlyer » Tue 26 Jul 2016 2:01 am

Neat, great visual info
Steve
The Squeaky Sands Inn
CumulusMX on Raspberry π 3
WeatherUnderground KFLGULFB1
http://www.squeakysands-inn.net/index.php

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Sun Plot

Post by steve » Tue 26 Jul 2016 6:28 am

mcrossley wrote:Or more like this...?
I prefer the first one. The green seems to distract from the more important detail.
Steve

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Tue 26 Jul 2016 6:46 am

I think I prefer the first one too, the shade of green needs a tweak in the second, I'll have a look later...

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Tue 26 Jul 2016 9:01 am

Right one script, but you can configure the look a little. Either by editing variables or supplying overrides.

No overrides gives the full caboodle....
Image

Or, change the size, switch off ground plot, switch off sunshine plot (?size-h=300&size-v=150&showSunshine=0&showGround=0)...
Image

Edit: I forgot, you can make the background transparent too with the over-ride "transparent=1"...
Image
Last edited by mcrossley on Wed 27 Jul 2016 7:55 am, edited 1 time in total.

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: Sun Plot

Post by Mapantz » Tue 26 Jul 2016 8:14 pm

I really like it! You always have imaginative ideas, but put them to good use. :)
Image
Image

weatherist34
Posts: 92
Joined: Wed 13 Apr 2016 11:09 am
Weather Station: Davis Vantage Pro2+Solar
Operating System: OSX High Sierra
Location: Istanbul
Contact:

Re: Sun Plot

Post by weatherist34 » Wed 27 Jul 2016 11:02 am

mcrossley wrote:Right one script, but you can configure the look a little. Either by editing variables or supplying overrides.

No overrides gives the full caboodle....
Image

Or, change the size, switch off ground plot, switch off sunshine plot (?size-h=300&size-v=150&showSunshine=0&showGround=0)...
Image

Edit: I forgot, you can make the background transparent too with the over-ride "transparent=1"...
Image
i think thats an awesome piece of coding

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Wed 27 Jul 2016 11:38 am

Thanks everyone, I think the code side is just about done, now I need to find a space for it on my web site...

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Wed 27 Jul 2016 9:40 pm

I've replaced the Sun 'pie chart' with this plot for now on my main page. What do you think?
Capture.PNG
EDIT: I have some 'responsive' scaling issues, I'll take a look at that tomorrow.

Any interest in me releasing this script?
You do not have the required permissions to view the files attached to this post.
Last edited by mcrossley on Wed 27 Jul 2016 10:41 pm, edited 1 time in total.

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: Sun Plot

Post by Mapantz » Wed 27 Jul 2016 10:26 pm

100% - I am.

Does it plot the sunshine from our sql db?
Image
Image

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Post by mcrossley » Wed 27 Jul 2016 10:42 pm

Mapantz wrote: Does it plot the sunshine from our sql db?
Yes it does.

Post Reply