access to historical data
access to historical data
I wish this template future:
ask:
data?
time?
then display's:
10-3-2009 13 degrees 60% 1.2UV 1mm 4bft
or graph!
regards
Geert
http://www.hetweerinboskamp.nl
ask:
data?
time?
then display's:
10-3-2009 13 degrees 60% 1.2UV 1mm 4bft
or graph!
regards
Geert
http://www.hetweerinboskamp.nl
Re: access to historical data
I think this is already possible (if I understand your request correctly):
template (with comments in brackets at the end of each line):
[20090310000000_day1_th0_temp_0] degrees (returns average temp for sensor th0 in degrees celsius without decimals)
[20090310000000_day1_th0_hum_0]% (returns average humidity without decimals)
[20090310000000_day1_uv0_uvi_1] (returns uv index with 1 decimal)
[20090310000000_day1_rain0_total_0]mm (return total rain for 2009-03-10 in mm without decimals)
[20090310000000_day1_th0_temp_0_3.6]km/h (returns average windspeed in km/h)
Conversion from m/s to Bft cannot be done by Metoplug template mechanism as this is not a linear expression. I converted to km/h instead.
template (with comments in brackets at the end of each line):
[20090310000000_day1_th0_temp_0] degrees (returns average temp for sensor th0 in degrees celsius without decimals)
[20090310000000_day1_th0_hum_0]% (returns average humidity without decimals)
[20090310000000_day1_uv0_uvi_1] (returns uv index with 1 decimal)
[20090310000000_day1_rain0_total_0]mm (return total rain for 2009-03-10 in mm without decimals)
[20090310000000_day1_th0_temp_0_3.6]km/h (returns average windspeed in km/h)
Conversion from m/s to Bft cannot be done by Metoplug template mechanism as this is not a linear expression. I converted to km/h instead.
Re: access to historical data
You can also define a graph/table/csv for a certain day/week/month, which covers all the sensors you like.
When calling the URL to this graph or table simply add "&timeframe=20090310000000-20090310235959" at the end of the URL.
This will overwrite the time frame given in the graph definition. By that you can apply graph definitions to a time frame of your choice when calling the graph.
This is much more powerful than known from Meteohub. The main difference is that Meteohub computes graphs according to a fixed schedule and definition and does upload these to a homepage. Meteoplug offers a URL where the graph gets composed on demand when called. This allows to apply additional parameters to graph generation the moment the graph is requested.
When calling the URL to this graph or table simply add "&timeframe=20090310000000-20090310235959" at the end of the URL.
This will overwrite the time frame given in the graph definition. By that you can apply graph definitions to a time frame of your choice when calling the graph.
This is much more powerful than known from Meteohub. The main difference is that Meteohub computes graphs according to a fixed schedule and definition and does upload these to a homepage. Meteoplug offers a URL where the graph gets composed on demand when called. This allows to apply additional parameters to graph generation the moment the graph is requested.
-
- Posts: 69
- Joined: Tue Mar 16, 2010 12:05 pm
- Location: Isle of Skye
- Contact:
Re: access to historical data
If I've understood correctly, I think it would need something like a html page with a <form> to ask the question. Submitting the form would then need to call a cgi script which would compute the timeframe indicated by the <form> then return the output for a particular Meteoplug template for that time frame?admin wrote:I think this is already possible (if I understand your request correctly):
If the unique part of the Meteoplug URL was passed through from the <form> the script could probably be quite 'generic'.
Does that make sense?
David
Re: access to historical data
Yes, thats what i want!
I want a form to fill in the date and time. Then i want to return all data for that moment. And maybe some graphics.
Thats not possible at this moment!
I want a form to fill in the date and time. Then i want to return all data for that moment. And maybe some graphics.
Thats not possible at this moment!
Re: access to historical data
Meteoplug can generate data and graphs for a time frame you specify when calling the graph definition. That is 80% of the mileage
Remaining 20 percent is that you build a html page where you have some javasrcipt working that calls a Meteoplug URL according to
date selections made on some drop-down selections.
Maybe I can build something pre-configured for that purpose which spares the user some HTML programming and the need to have a home page at all to present some weather information. At the moment Meteoplug provides a lot of building blocks useful to design an individual weather home page, but an out-of-the-box solution without the need of bothering with HTML might also be worth some thoughts... thanks for inspiring me.
Remaining 20 percent is that you build a html page where you have some javasrcipt working that calls a Meteoplug URL according to
date selections made on some drop-down selections.
Maybe I can build something pre-configured for that purpose which spares the user some HTML programming and the need to have a home page at all to present some weather information. At the moment Meteoplug provides a lot of building blocks useful to design an individual weather home page, but an out-of-the-box solution without the need of bothering with HTML might also be worth some thoughts... thanks for inspiring me.
-
- Posts: 69
- Joined: Tue Mar 16, 2010 12:05 pm
- Location: Isle of Skye
- Contact:
Re: access to historical data
Do you mean something likeadmin wrote:Maybe I can build something pre-configured for that purpose which spares the user some HTML programming and the need to have a home page at all to present some weather information.
Code: Select all
...&timeframe=ask
PS. I just discovered that Meteoplug's 'relative' time notation works with ...&timeframe in URLS too, e.g.
Code: Select all
https://www.meteoplug.com/cgi-bin/meteochart.cgi?draw=....&timeframe=-2D--1D
David
Re: access to historical data
I added a new experimental feature that might do something like that.
It is explained in "Graphing" section of the forum.
Basically you select graphically a point in time, a time scale and a type of graph.
Meteoplug then presents your data with predefined chart definitions.
You can freely adapt this to your favorite graphs by copying dashboard file
"www.meteoplug.com/dashboard-1.html" to your Homepage, change according to
your needs and define a template replacement definition in Meteoplug like "__dashboard-1"
which makes use of your dashboard file. This should give extreme flexibility.
It is explained in "Graphing" section of the forum.
Basically you select graphically a point in time, a time scale and a type of graph.
Meteoplug then presents your data with predefined chart definitions.
You can freely adapt this to your favorite graphs by copying dashboard file
"www.meteoplug.com/dashboard-1.html" to your Homepage, change according to
your needs and define a template replacement definition in Meteoplug like "__dashboard-1"
which makes use of your dashboard file. This should give extreme flexibility.
Re: access to historical data
That looks very nice Boris!
I have another wish:
When i chose "temperature" i see a graph with temp, Hum and dew.
Is it possible to chose between these three? So only a graph with the temperature. Because most viewers on my website are only interested in the temperature (not dew and hum)
regards
Geert
I have another wish:
When i chose "temperature" i see a graph with temp, Hum and dew.
Is it possible to chose between these three? So only a graph with the temperature. Because most viewers on my website are only interested in the temperature (not dew and hum)
regards
Geert
Re: access to historical data
To change look and feel of the temperature graph, take the definition of "*t", change it (remove sid1 and sid2 lines) and save it as "*t".
This overwrites the default settings. To make defaults valid again, just delete graph definition "*t". This removes your local file and the general version of "*t" (which is is provided as a template for all users) will be used instead.
Lines can also be deselected interactively from a graph by clicking on the bullet of the corresponding line in the legend.
This overwrites the default settings. To make defaults valid again, just delete graph definition "*t". This removes your local file and the general version of "*t" (which is is provided as a template for all users) will be used instead.
Lines can also be deselected interactively from a graph by clicking on the bullet of the corresponding line in the legend.