Records - Top10: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
(Initial edit)
 
m (HansR moved page Top10 to Records - Top10: So that all records pages fall under the R in the category)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
An interesting feature of any weather website is a Top 10 list of weather parameters like temperatures, pressure, wind speed etc... There existed some lists but they all required SQL, PHP or other techniques and beside that they display all parameters possible which is not a requirement. A top 10 should only display parameters which give a true impression to the viewer of the status of the weather and the possibilities and frequencies of extremes. As a result only 14 variables are in the top 10 list of CumulusUtils:
An interesting feature of any weather website is a Top 10 list of weather parameters like temperatures, pressure, wind speed etc... There existed some lists but they all required SQL, PHP or other techniques and beside that they display all parameters possible which is not a requirement. A top 10 should only display parameters which give a true impression to the viewer of the status of the weather and the possibilities and frequencies of extremes. As a result only 14 variables are in the top 10 list of CumulusUtils.

#Maximum Temperature
NOTE: This module is the first one written for CumulusUtils and has first been implemented in C.
#Minimum Temperature
#Minimum Humidity
#High Pressure
#Low Pressure
#Average Windspeed
#Maximum Gust
#Windrun per day
#Rain speed
#Rain per hour
#Rain per day
#Rain per month
#Longest dry period
#Longest wet period


== Operation ==
== Operation ==
Line 25: Line 13:


== Inifile parameters ==
== Inifile parameters ==

[Top10]
[Top10]
BackgroundColorHeader=#d0d0d0 (
BackgroundColorHeader=#d0d0d0 (specification of the background colour of the header for the columns)
BackgroundColorTable=#f0f0f0
BackgroundColorTable=#f0f0f0 (specification of the background colour of the table)
TextColorAccentTable=DarkOrange
TextColorAccentTable=DarkOrange (specification of the text colour is a record is recent - i.e. less than 30 days old)
TextColorHeader=Green
TextColorHeader=Green (specification of the text colour of the header for the columns)
NumberOfColumns=3 (specification of the number of columns displayed in a row)
NumberOfColumns=3

The values shown are the defaults used.


== Inner working ==
== Inner working ==
Line 39: Line 28:


A new table is created until all columns are displayed.
A new table is created until all columns are displayed.

[[Category:CumulusUtils]]

Latest revision as of 11:04, 27 March 2021

Introduction

An interesting feature of any weather website is a Top 10 list of weather parameters like temperatures, pressure, wind speed etc... There existed some lists but they all required SQL, PHP or other techniques and beside that they display all parameters possible which is not a requirement. A top 10 should only display parameters which give a true impression to the viewer of the status of the weather and the possibilities and frequencies of extremes. As a result only 14 variables are in the top 10 list of CumulusUtils.

NOTE: This module is the first one written for CumulusUtils and has first been implemented in C.

Operation

This module is included in the website. When needed as a single output the following command is given:

  utils/bin/cumulusutils.exe Top10

Output

The output is the file: top10Table.txt.

Inifile parameters

   [Top10]
   BackgroundColorHeader=#d0d0d0                       (specification of the background colour of the header for the columns)
   BackgroundColorTable=#f0f0f0                        (specification of the background colour of the table)
   TextColorAccentTable=DarkOrange                     (specification of the text colour is a record is recent - i.e. less than 30 days old)
   TextColorHeader=Green                               (specification of the text colour of the header for the columns)
   NumberOfColumns=3                                   (specification of the number of columns displayed in a row)

The values shown are the defaults used.

Inner working

For each variable the list is sorted and then the ten first entries on the list are taken using the standard C# Linq features. Only three variables which do not have have easy sortable characteristics are sorted through dedicated sorting routines: High Monthly Rain, Longest Dry Period and Longest Wet Period.

When the lists are complete a HTML table with the specified number of columns is created with the parameters from the inifile. The table is displayed at 100% of the viewport and the specified number of columns is evenly spaced over that width making use of the standard HTML algorithms for the width per column.

A new table is created until all columns are displayed.