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[, $fieldB ...] from $table $interval_expr [if $condition_expr]
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 |
---|
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)
Condition expression
A condition enables the filtering of the data in the given interval. The structure of a condition is the following:
$field $operator $value
$value
: the name of double field already shown previouslyoperator
: a binary boolean operator. The compatible ones are: >=, >, <, <=$value
: the numeric (double) value being compared with the field using the given boolean operator