Records - Top10: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
(Initial edit)
 
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
 
#Minimum Temperature
NOTE: This module is the first one written for CumulusUtils and has first been implemented in C.
#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 ==

Revision as of 08:03, 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                       (
   BackgroundColorTable=#f0f0f0
   TextColorAccentTable=DarkOrange
   TextColorHeader=Green
   NumberOfColumns=3

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.