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
- If not specified, the table defaults to 'current'
- 'current' table accepts 'current fields', all the other tables accept 'summarized fields'
Current fields
Current fields contain raw data of the stations (less than 1 minute aggregates), and are only used with the current table
Field | Description | Type |
---|---|---|
rate.max.dt | Maximum rain rate (Date) | datetime |
wc.min.dt | Minimum windchill (Date) | datetime |
hi.max.dt | Maximum Heat Index (Date) | datetime |
rate.max | Maximum rain rate | double |
gust.dt | Maximum wind gust (Date) | datetime |
wc.min | Minimum windchill | double |
hi.max | Maximum Heat Index | double |
t.in | Interior temperature | double |
h.in | Interior humidity | double |
wind | Wind speed | double |
gust | Maximum wind gust | double |
rain | Total rain | double |
rate | Average rain rate | double |
dew | Dew point | double |
wc | Windchill | double |
hi | Heat index | double |
t | Temperature | double |
h | Humidity | double |
b | Barometer | double |
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:
Field | Description | Type |
---|---|---|
t.in.max.dt | Maximum interior temperature (Date) | datetime |
t.in.min.dt | Minimum interior temperature (Date) | datetime |
h.in.max.dt | Maximum interior humidity (Date) | datetime |
h.in.min.dt | Minimum interior humidity (Date) | datetime |
rate.max.dt | Maximum rain rate (Date) | datetime |
dew.max.dt | Maximum dewpoint (Date) | datetime |
dew.min.dt | Minimum dewpoint (Date) | datetime |
bar.max.dt | Maximum barometer (Date) | datetime |
bar.min.dt | Minimum barometer (Date) | datetime |
wc.min.dt | Minimum windchill (Date) | datetime |
hi.max.dt | Maximum heat index (Date) | datetime |
t.max.dt | Maximum temperature (Date) | datetime |
t.min.dt | Minimum temperature (Date) | datetime |
t.in.max | Maximum interior temperature | double |
t.in.avg | Average interior temperature | double |
t.in.min | Minimum interior temperature | double |
h.max.dt | Maximum humidity (Date) | datetime |
h.min.dt | Minimum humidity (Date) | datetime |
h.in.max | Maximum interior humidity | double |
h.in.avg | Average interior humidity | double |
h.in.min | Minimum interior humidity | double |
rate.max | Maximum rain rate | double |
dew.max | Maximum dewpoint | double |
dew.avg | Average dewpoint | double |
dew.min | Minimum dewpoint | double |
bar.max | Maximum barometer | double |
bar.avg | Average barometer | double |
bar.min | Minimum barometer | double |
gust.dt | Maximum wind gust (Date) | datetime |
t.ampl | Temperature amplitude (T.max-T.min) | double |
wc.avg | Average windchill | double |
wc.min | Minimum windchill | double |
hi.max | Maximum heat index | double |
hi.avg | Average heat index | double |
t.max | Maximum temperature | double |
t.avg | Average temperature | double |
t.min | Minimum temperature | double |
h.max | Maximum humidity | double |
h.avg | Average humidity | double |
h.min | Minimum humidity | double |
wind | Average wind speed | double |
gust | Maximum wind gust | double |
rain | Total rain | double |
rate | Average rain rate | double |
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:
last $NUMBER hours
last $NUMBER days
last $NUMBER weeks
last $NUMBER months
last year
last $NUMBER years
last winter
: last finished meteorological winter (3 months, from december to february)$month
: a full month using strings (january, february...) of the current year$month $year
: a full month using strings (january, february...) and full year (2024)
Grouping intervals
Data can be grouped by date, using the following values:
day
week
month
Aggregation functions
Once data has been grouped, fields should be aggregated used the following functions:
max
avg
min
Compare intervals
A chart can be duplicated and be compared with past dates. The valid intervals are:
$NUMBER years
$NUMBER weeks
$NUMBER hours
$NUMBER months
$NUMBER days