#!/usr/bin/env python2 # usage for data_data.py def usage(): print """ <html><body> <em> Usage: data_data.py?symbols=sym_1:sym_2:sym_3:...:sym_n&begin=start_timestamp&end=end_timestamp&interval=hh:mm:ss </em><br> <br> example invocation:<br> <br> <a href=\"data_data.py?begin=2003-03-27+14:05:57&end=2003-03-27+15:05:57&symbols=t:p:speed:dir\"> <code>data_data.py?begin=2003-03-27+14:05:57&end=2003-03-27+15:05:57&symbols=t:p:speed:dir</code></a><br> <br> if no end value provided, assume end = now. For example<br> (to use this, replace below timestamp with one nearer to the present date - else you'll get a lot of data):<br> <br> <code>data_data.py?begin=2003-03-27+14:05:57&symbols=t:p:speed:dir</code><br> <br> if no begin is provided, assume it is the same as end (return one value only). Example:<br> <br> <a href=\"data_data.py?end=2003-03-27+15:05:57&symbols=t:p:dewpoint:accum_precip\"> <code>data_data.py?end=2003-03-27+15:05:57&symbols=t:p:dewpoint:accum_precip</code></a><br> <br> thus, calling with no begin OR end gives the single most recent sample.<br> <br> <i>NEW as of 2006-07-26:</i> If no end is provided, but begin is of the form -hh:mm:ss, then the most recent hh hours, mm minutes and ss seconds of data are provided. <br> ------------- Other Options --------------------------<br> To separate the fields in the timestamp with spaces (useful for some automated scripts), append <code>altts=1</code> to the CGI parameter list as follows:<br> <br> <a href=\"data_data.py?begin=2003-04-08+23:05:57&end=2003-04-09+01:15:57&symbols=t:rp:dewpoint:accum_precip&altts=1\"> <code>data_data.py?begin=2003-04-08+23:05:57&end=2003-04-09+01:15:57&symbols=t:rp:dewpoint:accum_precip&altts=1</code></a><br> <br> <br> To separate the datafields with various characters (commas, spaces, etc) as opposed to constant-width column output, append <code>separator=,</code> (or <code>separator=+</code>, etc..) to the CGI parameter list as follows:<br> <br> <a href=\"data_data.py?begin=2003-04-08+23:05:57&end=2003-04-09+01:15:57&symbols=t:rp:dewpoint:accum_precip&separator=,\"> <code>data_data.py?begin=2003-04-08+23:05:57&end=2003-04-09+01:15:57&symbols=t:rp:dewpoint:accum_precip&separator=,</code></a><br> <br> <br> It's also possible to get data at intervals greater than five seconds. To do this, specify the interval time as one of<br> <ul> <li><code>interval=ss</code></li> <li><code>interval=mm:ss</code></li> <li><code>interval=hh:mm:ss</code></li> </ul><br> <br> <em>For correct operation, only specify intervals which are multiples of 5 seconds</em>. \ For example:</br> <br> <a href=\"data_data.py?begin=2003-03-27+14:05:57&end=2003-03-27+15:05:57&symbols=t:p:speed:dir&interval=1:00\"> <code>data_data.py?begin=2003-03-27+14:05:57&end=2003-03-27+15:05:57&symbols=t:p:speed:dir&interval=1:00</code></a><br> <br> will give you one sample every minute. <br> <br> <em> A list of requested symbols (click on symbol to get latest value):<br> </em> <br> ------------- Standard Parameters --------------------<br> * Temperature [deg C] ( <a href="data_data.py?symbols=temperature">temperature</a> or <a href="data_data.py?symbols=t">t</a>)<br> * Dew Point Temperature [deg C] ( <a href="data_data.py?symbols=dewpoint">dewpoint</a> or <a href="data_data.py?symbols=dew_point">dew_point</a> or <a href="data_data.py?symbols=td">td</a>)<br> * Wind Direction [degrees] ( <a href="data_data.py?symbols=direction">direction</a> or <a href="data_data.py?symbols=dir">dir</a>)<br> * Wind Speed [mps] ( <a href="data_data.py?symbols=speed">speed</a> or <a href="data_data.py?symbols=spd">spd</a>)<br> * Pressure [hPa] ( <a href="data_data.py?symbols=pressure">pressure</a> or <a href="data_data.py?symbols=pres">pres</a> or <a href="data_data.py?symbols=p">p</a>)<br> * Relative Humidity [percent] ( <a href="data_data.py?symbols=relative_humidity">relative_humidity</a> or <a href="data_data.py?symbols=rh">rh</a>)<br> * Precipitation [inches accumulated in last 5 seconds - thus not really useful] ( <a href="data_data.py?symbols=precipitation">precipitation</a> or <a href="data_data.py?symbols=precip">precip</a>)<br> * Accumlated Precipitation [inches accumulated since midnight] ( <a href="data_data.py?symbols=accumulated_precipitation">accumulated_precipitation</a> or <a href="data_data.py?symbols=accum_precip">accum_precip</a>)<br> * Solar radiation [W / m^2] ( <a href="data_data.py?symbols=average_solar_radiation_flux">average_solar_radiation_flux</a> or <a href="data_data.py?symbols=flux">flux</a>)<br> <br> ---------------- Other temperatures ---------------------<br> * Temperature at 6.3m [deg C] ( <a href="data_data.py?symbols=temperature_6.3m">temperature_6.3m</a> or <a href="data_data.py?symbols=t_6.3m">t_6.3m</a>)<br> * Temperature at 14.5m [deg C] ( <a href="data_data.py?symbols=temperature_14.5m">temperature_14.5m</a> or <a href="data_data.py?symbols=t_14.5m">t_14.5m</a>)<br> * Temperature at (unknown) [deg C] ( <a href="data_data.py?symbols=temperature_unknown">temperature_unknown</a> or <a href="data_data.py?symbols=t_unk">t_unk</a>)<br> <br> ---------------- Box Values --------------------<br> * Temperature of instrument box [deg C] ( <a href="data_data.py?symbols=box_temperature">box_temperature</a> or <a href="data_data.py?symbols=box_t">box_t</a>)<br> * pressure of the box [hPa] ( <a href="data_data.py?symbols=box_pressure">box_pressure</a> or <a href="data_data.py?symbols=box_p">box_p</a>)<br> * Temperature outside box [deg C] ( <a href="data_data.py?symbols=outside_box_t">outside_box_t</a>)<br> * Box Relative Humidity [percent] ( <a href="data_data.py?symbols=box_relative_humidity">box_relative_humidity</a> or <a href="data_data.py?symbols=box_rh">box_rh</a>)<br> <br> <br> </body></html> """