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] 

Notes

Current fields

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

FieldDescriptionType
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
wcWindchilldouble
hiHeat indexdouble
tTemperaturedouble
hHumiditydouble
bBarometerdouble

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
t.in.max.dtMaximum interior temperature (Date)datetime
t.in.min.dtMinimum interior temperature (Date)datetime
h.in.max.dtMaximum interior humidity (Date)datetime
h.in.min.dtMinimum 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
t.in.maxMaximum interior temperaturedouble
t.in.avgAverage interior temperaturedouble
t.in.minMinimum interior temperaturedouble
h.max.dtMaximum humidity (Date)datetime
h.min.dtMinimum humidity (Date)datetime
h.in.maxMaximum interior humiditydouble
h.in.avgAverage interior humiditydouble
h.in.minMinimum 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

Tables

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

Table
current
hourly
daily
monthly

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: