IMPORTANT! The server may go down soon - possibly permanently. Please read the latest post in Announcements and News

I strongly advise all users using my server for their web site to make alternative arrangements.

Outgoing mail is disabled because of the malware on the server. No new forum registrations are currently possible, and mail to the forum administrator will not work.

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Sun Plot

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

Moderators: daj, TNETWeather

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

Sun Plot

Postby mcrossley » Mon Jul 25, 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 Jul 26, 2016 8:56 am, edited 1 time in total.

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

Re: Sun Plot

Postby steve » Mon Jul 25, 2016 1:09 pm

Me like :)
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

User avatar
PaulMy
Posts: 1681
Joined: Sun Sep 28, 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

Postby PaulMy » Mon Jul 25, 2016 1:46 pm

Yes very nice Mark.

Could my B-L sunrecorder data work with that?

Paul

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

Re: Sun Plot

Postby mcrossley » Mon Jul 25, 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: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Postby mcrossley » Mon Jul 25, 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 Jul 26, 2016 8:56 am, edited 1 time in total.

f4phlyer
Posts: 30
Joined: Sun Feb 13, 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

Postby f4phlyer » Tue Jul 26, 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: 26697
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Sun Plot

Postby steve » Tue Jul 26, 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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

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

Re: Sun Plot

Postby mcrossley » Tue Jul 26, 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: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Postby mcrossley » Tue Jul 26, 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 Jul 27, 2016 7:55 am, edited 1 time in total.

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

Re: Sun Plot

Postby Mapantz » Tue Jul 26, 2016 8:14 pm

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

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

Re: Sun Plot

Postby weatherist34 » Wed Jul 27, 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: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Postby mcrossley » Wed Jul 27, 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: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Sun Plot

Postby mcrossley » Wed Jul 27, 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 Jul 27, 2016 10:41 pm, edited 1 time in total.

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

Re: Sun Plot

Postby Mapantz » Wed Jul 27, 2016 10:26 pm

100% - I am.

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

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

Re: Sun Plot

Postby mcrossley » Wed Jul 27, 2016 10:42 pm

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

Yes it does.


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 7 guests