Just to share, if someone needs something similar:
The template:
columns: [
['x' #slurp
#for $record in $span($hour_delta=32).records
, ${record.dateTime.raw}000 #slurp
#end for
],
['$obs.label.outTemp' #slurp
#for $record in $span($hour_delta=32).records
#if $record.outTemp.has_data
, #echo '%.1f' % $record.outTemp.raw# #slurp
#else
, null #slurp
#end if
#end for
],
['$obs.label.dewpoint' #slurp
#for $record in $span($hour_delta=32).records
#if $record.dewpoint.has_data
, #echo '%.1f' % $record.dewpoint.raw# #slurp
#else
, null #slurp
#end if
#end for
],
['$obs.label.windchill' #slurp
#for $record in $span($hour_delta=32).records
#if $record.windchill.has_data
, #echo '%.1f' % $record.windchill.raw# #slurp
#else
, null #slurp
#end if
#end for
],
Output:
columns: [
['x' , 1522817700000 , 1522818000000 ,
1522818300000 , 1522818600000 , 1522818900000 , 1522819200000 , 152281$
['Température ext.' , 8.6 , 8.5 ,
8.5 , 8.5 , 8.3 , 8.3 , 8.3 $
['Point de rosée' , 8.6 , 8.5 ,
8.4 , 8.5 , 8.3 , 8.3 , 8.3 $
['Température ressentie' , null , null ,
null , null , null , null , null $
], /* end columns*/
it needs a bit of tuning of the spaces, but output is very clean and
comfortable to read :-)
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.