Full list of Webtags: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
m (→‎Special tags: Added QueryDayFile)
 
==The function parameter==
Not used for the date selector ''ThisDay''.
Required. The name of the function to apply to the value. The possible values are:
 
Required for all other date selectors. The name of the function to apply to the value. Thewithin possibleeach values are:period.
 
The possible functionstrings are:
''min, max, avg, sum, count''.
 
==The where clause==
Required if function = count.
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:
 
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:
 
You can use the following comparison strings:
 
>, <, >=, <=, =
OR<br>
It can be one of the following special values:
''ThisDay, ThisMonth, ThisYear, Day-[N], Month-[N], Year-[N], Month[N] Day[MMDD], Yearly''
 
#''ThisDay'', ''ThisMonth'', and ''ThisYear'' are hopefully self explanatory.
#''Day-N'', ''Month-N'' and ''Year-N'' are used to specify the relative day, month or year. For example ''Month-1'' = the previous month to current, ''Day-1'' = yesterday.
#''DayMMDD'' is used to specify a month and day to return an "on this day" value. MM = 1 to 12, DD = 1 to 31. For example ''Day0421'' shows results for the 4th April every year
#''MonthN'' is used to find values for any year for the specified month. N = 1 to 12.
#''Yearly'' groups the results by year
Result function.
 
Mandatory for grouped results, ie those using the date options: ''ThisDay, Day[MMDD], Month-[N], Year-[N], Month[N], Yearly''
 
Controls if the largest or smallest value for the grouped period is returned.
==The dp, tc and rc arguments==
''[dp=N] [tc=y] [rc=y]'' are regular parameters described in [[Webtags/Parameters|their proper page]].
 
==Examples==
## Examples
The maximum sun hours in a day this year and the date on which it occurred:
 
`<#QueryDayFile value=SunShineHours function=max from=ThisYear showDate=y dp=2 format="dd-MM-yyyy">`
 
returns: `["12.32","26-07-2024"]`
 
The total sun hours last year:
 
<#QueryDayFile value=SunShineHours function=sum from=Year-1 dp=2>
 
returns: 1287.22
 
Highest sun hours in any year, and the year it occurred:
 
<#QueryDayFile value=SunShineHours function=sum from=Yearly resFunc=max dp=2 showDate=y format=yyyy>
 
returns: ["1405.9","2018"]
 
The total evapotranspiration last month:
 
<#QueryDayFile value=ET> function=sum from=Month-1 dp=2>
 
returns: 23.56
 
The average maximum UV-I in April & May 2024:
 
<#QueryDayFile value=HighUv function=avg from=2024-04-01 to=2024-06-01>
 
returns: 4.5
 
The lowest minimum temperature that has occurred in any December (*NOTE: in reality there is standard web tag for this <#ByMonthTempL>*):
 
<#QueryDayFile value=LowTemp function=min from=Month12 resFunc=min showDate=y>
 
returns: ["-12.5","20/12/2010 07:17"]
 
The highest minimum temperature that has occurred in any December (*NOTE: in reality there is standard web tag for this <#ByMonthMinTempH>*):
 
<#QueryDayFile value=LowTemp function=max from=Month12 resFunc=max showDate=y>
 
returns: ["12.1","19/12/2015 00:36"]
 
The lowest minimum temperature that has occurred on this day
 
<#QueryDayFile value=LowTemp resFunc=min from=ThisDay showDate=y>
 
returns: ["5.2","05/10/2014 00:21"]
 
The lowest minimum temperature that has occurred on this day (yesterdays date)
 
<#QueryDayFile value=LowTemp resFunc=min from=Day-1 showDate=y>
 
returns: ["4.5","04/10/2010 08:07"]
 
The lowest minimum temperature that has occurred on this specified day
 
<#QueryDayFile value=LowTemp resFunc=min from=Day0421 showDate=y>
 
returns: ["-1.8","21/04/2010 05:47"]
 
[[Category:Cumulus_MX]]

Navigation menu