Chart Data Query Language

The Data Query Language is a simple language to query summarized (hourly, daily...) meteorological data from stations. The structure of a query is:

$fieldA[, ...] [from $table] $interval_expr [compare $time_expr]

You can also group by date and aggregate fields

$agg_fn($fieldA)[, ...] [from $table] $interval_expr group by $group_interval [compare $cmp_interval] 


Current fields

Current fields contain raw data of the stations (less than 1 minute aggregates), and are only used with the current table

rate.max.dtMaximum rain rate (Date)datetime
wc.min.dtMinimum windchill (Date)datetime
hi.max.dtMaximum Heat Index (Date)datetime
rate.maxMaximum rain ratedouble
gust.dtMaximum wind gust (Date)datetime
wc.minMinimum windchilldouble
hi.maxMaximum Heat Indexdouble
t.inInterior temperaturedouble
h.inInterior humiditydouble
windWind speeddouble
gustMaximum wind gustdouble
rainTotal raindouble
rateAverage rain ratedouble
dewDew pointdouble
hiHeat indexdouble

Summarized fields

Summarized fields are directly related to data emitted by the station with a simple aggregation applied afterwards. The complete list of fields is:

FieldDescriptionType interior temperature (Date)datetime interior temperature (Date)datetime interior humidity (Date)datetime interior humidity (Date)datetime
rate.max.dtMaximum rain rate (Date)datetime
dew.max.dtMaximum dewpoint (Date)datetime
dew.min.dtMinimum dewpoint (Date)datetime
bar.max.dtMaximum barometer (Date)datetime
bar.min.dtMinimum barometer (Date)datetime
wc.min.dtMinimum windchill (Date)datetime
hi.max.dtMaximum heat index (Date)datetime
t.max.dtMaximum temperature (Date)datetime
t.min.dtMinimum temperature (Date)datetime interior temperaturedouble interior temperaturedouble interior temperaturedouble
h.max.dtMaximum humidity (Date)datetime
h.min.dtMinimum humidity (Date)datetime interior humiditydouble interior humiditydouble interior humiditydouble
rate.maxMaximum rain ratedouble
dew.maxMaximum dewpointdouble
dew.avgAverage dewpointdouble
dew.minMinimum dewpointdouble
bar.maxMaximum barometerdouble
bar.avgAverage barometerdouble
bar.minMinimum barometerdouble
gust.dtMaximum wind gust (Date)datetime
t.amplTemperature amplitude (T.max-T.min)double
wc.avgAverage windchilldouble
wc.minMinimum windchilldouble
hi.maxMaximum heat indexdouble
hi.avgAverage heat indexdouble
t.maxMaximum temperaturedouble
t.avgAverage temperaturedouble
t.minMinimum temperaturedouble
h.maxMaximum humiditydouble
h.avgAverage humiditydouble
h.minMinimum humiditydouble
windAverage wind speeddouble
gustMaximum wind gustdouble
rainTotal raindouble
rateAverage rain ratedouble


All the tables contain the same kind of information, but summarized into different date ranges:


Interval expression

An interval expression defines the range of time the data will be queried. There are several predefined intervals:

Grouping intervals

Data can be grouped by date, using the following values:

Aggregation functions

Once data has been grouped, fields should be aggregated used the following functions:

Compare intervals

A chart can be duplicated and be compared with past dates. The valid intervals are: