Simple Dashboard for Browsing your Weather Data
Simple Dashboard for Browsing your Weather Data
According to a request to provide a simple way of displaying data without the need to construct a web page for your own, I made a quick html/java script hack, which provides a very basic dashboard where you can select graphs for certain days.
You find the link to the dashboard for your data as follows:
1) login to meteoplug
2) goto "show charts"
3) select "__dashboard-1"
4) click onto the URL-link at the bottom border. This will open a browser window.
5) bookmark this URL, which is your entrry point for browsing through your data.
6) select a date from the calendar and have fun...
Here is an example URL where you can browse my weather data.
http://www.meteoplug.com/cgi-bin/meteoc ... 4559494640
This is still very basic. Please tell me what you think about it and in what direction you want it to further developed.
You find the link to the dashboard for your data as follows:
1) login to meteoplug
2) goto "show charts"
3) select "__dashboard-1"
4) click onto the URL-link at the bottom border. This will open a browser window.
5) bookmark this URL, which is your entrry point for browsing through your data.
6) select a date from the calendar and have fun...
Here is an example URL where you can browse my weather data.
http://www.meteoplug.com/cgi-bin/meteoc ... 4559494640
This is still very basic. Please tell me what you think about it and in what direction you want it to further developed.
Re: Simple Dashboard for Browsing your Weather Data
All this assumes that your primary outdoor sensor is "th0", wind is "wind0", rain is "rain0" and pressure comes from "thb0". As said it is very basic, so no configuration for this and other things (like language) so far.
-
- Posts: 69
- Joined: Tue Mar 16, 2010 12:05 pm
- Location: Isle of Skye
- Contact:
Re: Simple Dashboard for Browsing your Weather Data
If I've understood correctly part of this mechanism uses a new template variable drawtoken_ where [drawtoken_chartname] resolves to the hex number that identifies chart _chartname for the same Meteoplug (i.e. the one for which the template is being populated)?
So if a HTML template included
the resulting page would have a link that could call the rain0-1M-3y-1y chart for the same Meteoplug?
I just tested that code and it worked as I expected.
So if a HTML template included
Code: Select all
<a href="http://www.meteoplug.com/cgi-bin/meteochart.cgi?draw=[drawtoken_rain0-1M-3y-1y]" title="My Chart">Monthly rain over 3 years</a>
I just tested that code and it worked as I expected.
David
Re: Simple Dashboard for Browsing your Weather Data
Yes, that is correct. The whole thing behind drawtoken is, that all Meteoplug charts are identified by the user name and chart name when being called as a URL. As I don't want Meteoplug user and chart names visible to the public (this might be information useful to hack a Meteoplug user account) this information is hidden by a token that contains this information in an encoded manner. This token is what you see in the URL after the "draw=".
Dashboard allows for some selections of date, type of graph, etc and then just calls regular Meteoplug charts. In the example these charts are predefined for all users as "*t", "*p", etc. To call these charts from the Dashboard HTML code there must be a token generated according to the current user and selected chart. This computation of the token is done by "drawtoken" template replacement feature. As a result a [drawtoken_mytemp] variable definition will be converted to the token that makes chart "mytemp" accessible for the current user.
All this is just necessary to understand, if you want to build your own dashboard. This feature is very powerful, but not needed for normal graphing. So please don't be distracted when all this sounds complicated - you just need this in very advanced situations.
Dashboard allows for some selections of date, type of graph, etc and then just calls regular Meteoplug charts. In the example these charts are predefined for all users as "*t", "*p", etc. To call these charts from the Dashboard HTML code there must be a token generated according to the current user and selected chart. This computation of the token is done by "drawtoken" template replacement feature. As a result a [drawtoken_mytemp] variable definition will be converted to the token that makes chart "mytemp" accessible for the current user.
All this is just necessary to understand, if you want to build your own dashboard. This feature is very powerful, but not needed for normal graphing. So please don't be distracted when all this sounds complicated - you just need this in very advanced situations.
-
- Posts: 69
- Joined: Tue Mar 16, 2010 12:05 pm
- Location: Isle of Skye
- Contact:
Re: Simple Dashboard for Browsing your Weather Data
And even if a user would prefer a different temperature chart they can do that without any editing of the html; all they need to do is change the definition associated with _*t in their own Meteoplug account?admin wrote:This feature is very powerful, but not needed for normal graphing. So please don't be distracted when all this sounds complicated - you just need this in very advanced situations.
Neat.
David
Re: Simple Dashboard for Browsing your Weather Data
As the chart definitions that start with "_" are predefined and a user cannot create charts beginning with "_" this will not be possible at the moment.all they need to do is change the definition associated with _*t in their own Meteoplug account?
-
- Posts: 69
- Joined: Tue Mar 16, 2010 12:05 pm
- Location: Isle of Skye
- Contact:
Re: Simple Dashboard for Browsing your Weather Data
Ah. I'd noticed that the "_" disappeared in the "Save As" name when looking at a predefined definition, but I hadn't noticed that it could not be edited back in...admin wrote:As the chart definitions that start with "_" are predefined and a user cannot create charts beginning with "_" this will not be possible at the moment.
David
Re: Simple Dashboard for Browsing your Weather Data
As I like your idea of "overloading" chart definitions used in Dashboard, I changed the charts to be called from dashboard in a way, that they no longer start with "_". "_*t" has moved to "*t", etc.
Now you can give a local definition for "*t" that overrides the pre-defined setting. When you delete your individual "*p" definition the pre-defined one comes back to life. Pre-defined chart definitions cannot be deleted.
Now you can give a local definition for "*t" that overrides the pre-defined setting. When you delete your individual "*p" definition the pre-defined one comes back to life. Pre-defined chart definitions cannot be deleted.
Re: Simple Dashboard for Browsing your Weather Data
I added an "all in one" view for key weather data to the dashboard. This makes use of new Meteoplug feature which allows putting multiple flash graph definitions into one chart.
http://www.meteoplug.com/cgi-bin/meteoc ... a2bcb2bbbf
Definition is of that chat is reasonable complex
http://www.meteoplug.com/cgi-bin/meteoc ... a2bcb2bbbf
Definition is of that chat is reasonable complex
Code: Select all
timeframe=-3M
zoom=MAX
res=day1
gtitle0=Temperature
gheight0=150 gwidth0=700 glunit0=°C gtype0=line
sid0_0=th0 ssmooth0_0=1 sname0_0=Temp scolor0_0=880000 sfill0_0=10 ssel0_0=temp
sid0_1=th0 ssmooth0_1=1 sname0_1=Temp_Max scolor0_1=FF0000 sline0_1=40 ssel0_1=tempmax
sid0_2=th0 ssmooth0_2=1 sname0_2=Temp_Min scolor0_2=8800FF sline0_2=40 ssel0_2=tempmin
gtitle1=Pressure
gheight1=150 gwidth1=700 glunit1=hPa gtype1=line
sid1_0=thb0 ssmooth1_0=1 sname1_0=Press scolor1_0=008800 sfill1_0=10 ssel1_0=seapress
sid1_1=thb0 ssmooth1_1=1 sname1_1=Press_Max scolor1_1=00FF00 sline1_1=40 ssel1_1=seapressmax
sid1_2=thb0 ssmooth1_2=1 sname1_2=Press_Min scolor1_2=0088FF sline1_2=40 ssel1_2=seapressmin
gtitle2=Rain
gheight2=100 gwidth2=700 glunit2=mm gtype2=bar
sid2_0=rain0 scolor2_0=AADDFF sfill2_0=70 sline2_0=100 sname2_0=Rain_Fall ssel2_0=total
gtitle3=Wind
gheight3=150 gwidth3=700 glunit3=km/h gtype3=line
sid3_0=wind0 ssmooth3_0=1 sname3_0=Wind scolor3_0=000088 sfill3_0=10 ssel3_0=wind
sid3_1=wind0 ssmooth3_1=1 sname3_1=Gust_Max scolor3_1=0000FF sfill3_1=10 sline3_1=80 ssel3_1=gustmax
Re: Simple Dashboard for Browsing your Weather Data
I also added this advanced example to the gallery in the wiki in the "hardcore" section