Page 1 of 6

Sun Plot

Posted: Mon 25 Jul 2016 1:05 pm
by mcrossley
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?

Re: Sun Plot

Posted: Mon 25 Jul 2016 1:09 pm
by steve
Me like :)

Re: Sun Plot

Posted: Mon 25 Jul 2016 1:46 pm
by PaulMy
Yes very nice Mark.

Could my B-L sunrecorder data work with that?

Paul

Re: Sun Plot

Posted: Mon 25 Jul 2016 1:52 pm
by mcrossley
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.

Re: Sun Plot

Posted: Mon 25 Jul 2016 7:21 pm
by mcrossley
Or more like this...?
sunplot.png
Live demo... [removed]

Re: Sun Plot

Posted: Tue 26 Jul 2016 2:01 am
by f4phlyer
Neat, great visual info

Re: Sun Plot

Posted: Tue 26 Jul 2016 6:28 am
by steve
mcrossley wrote:Or more like this...?
I prefer the first one. The green seems to distract from the more important detail.

Re: Sun Plot

Posted: Tue 26 Jul 2016 6:46 am
by mcrossley
I think I prefer the first one too, the shade of green needs a tweak in the second, I'll have a look later...

Re: Sun Plot

Posted: Tue 26 Jul 2016 9:01 am
by mcrossley
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

Re: Sun Plot

Posted: Tue 26 Jul 2016 8:14 pm
by Mapantz
I really like it! You always have imaginative ideas, but put them to good use. :)

Re: Sun Plot

Posted: Wed 27 Jul 2016 11:02 am
by weatherist34
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

Re: Sun Plot

Posted: Wed 27 Jul 2016 11:38 am
by mcrossley
Thanks everyone, I think the code side is just about done, now I need to find a space for it on my web site...

Re: Sun Plot

Posted: Wed 27 Jul 2016 9:40 pm
by mcrossley
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?

Re: Sun Plot

Posted: Wed 27 Jul 2016 10:26 pm
by Mapantz
100% - I am.

Does it plot the sunshine from our sql db?

Re: Sun Plot

Posted: Wed 27 Jul 2016 10:42 pm
by mcrossley
Mapantz wrote: Does it plot the sunshine from our sql db?
Yes it does.