1,965
edits
m (→Standard sensors: added MonthRainfall) |
m (→Special tags: Added QueryDayFile) |
||
|
|}
'''Note''': See also the '''Davis''' table for <#StationFreeMemory> and <#StationRuntime>
=QueryDayFile=
This web tag deviates from the regular webtags in that is gives the possibility to actually query the whole dayfile on a per row and per column basis. The arguments which govern this query are different from the regular parameters which also play a role. For that reason ''QueryDayFile'' is classified as a ''chapter on its own''. It even may evolve to an even complexer query system for the dayfile (e.g. find a record for a specific date). This entry is based on the ''QueryDayFileWebTag.md''-file which you can find in the ''MXutils directory'' in the distribution.
The general form of the use of this web tag is:
<#QueryDayFile value=MinTemp function=min [where=>10] dateFrom=2023-01-01 [dateTo=2024-01-01] [resfunc=max] [showDate=y] [format="date_format"] [dp=N] [tc=y] [rc=y]>
The arguments are described below.
'''''NOTE:''' If there is an existing web tag for the value you require, please use that specific tag rather than this general query. The specific tag is likely be *much* more efficient.''
==The value parameter==
The value parameter is required and specifies which value from the dayfile you want (the column). It can take any of the following values (only one at a time):
'' HighGust, WindRun, HighAvgWind, LowTemp, HighTemp, AvgTemp, HighHeatIndex, HighAppTemp, LowAppTemp, LowWindChill, HighDewPoint, LowDewPoint, HighFeelsLike, LowFeelsLike, HighHumidex, LowPress, HighPress, HighRainRate, TotalRain, HighHourlyRain, HighRain24h, LowHumidity, HighHumidity, SunShineHours, HighSolar, HighUv, ET, HeatingDegreeDays, CoolingDegreeDays, ChillHours''
==The function parameter==
Required. The name of the function to apply to the value. The possible values are:
''min, max, avg, sum, count''.
==The where clause==
Required when using the ''count'' function. Criteria applied to the count. This is a comparison value, so for example you want to count days where the minimum temperature was below zero °C you would use where=<0. You can use the following comparison strings:
>, <, >=, <=, =
==The dateFrom field==
Required. The start date of the query.
It can be any date string that can be parsed by the "yyyy-MM-dd" format.<br>
OR<br>
It can be one of the following special values:
''ThisMonth, ThisYear, Month-[N], Year-[N], Month[N], Yearly''
#''ThisMonth'' and ''ThisYear'' are self explanatory.
#''Month-N'' and ''Year-N'' are used to specify the relative month or year. For example ''Month-1'' = the previous month to current.
#''MonthN'' is used to find values for any year for the specified month. N = 1 to 12.
#''Yearly'' groups the results by year
The value is found for dates >= dateFrom.
==The dateTo field==
Optional if dateFrom has one of the special values.
Required if dateFrom is a date string - format "yyyy-MM-dd"
The value is found for dates <= dateTo
==The result function field==
Result function.
Mandatory for grouped results, ie those using the date options: ''Month-[N], Year-[N], Month[N], Yearly''
Controls if the largest or smallest value for the grouped period is returned.
Must be one of the following:
''min, max''
==The showDate field==
Optional.
If omitted, then the web tag returns only the numeric value.
If present, the the web tag returns a pair of strings, the value itself, and the date-time it occurred in the format: [''"value","datetime_string"'']
The parameter showdate should not be used if the function is one of ''"avg", "sum", or "count"''. If specified for these functions it returns a datetime_string of "-".
==The format field==
Optional. The standard date formatting string used by all date-time web tags.
==The dp, tc and rc arguments==
''[dp=N] [tc=y] [rc=y]'' are regular parameters described in [[Webtags/Parameters|their proper page]].
[[Category:Cumulus_MX]]
| |||