Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Climatology for a given day
Moderator: daj
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Climatology for a given day
Hi,
I like to extract the min/max/avg temperature and other values for a particular day for all years from my database.
Could someone give me some guidance for the SQL statement i have to use to achieve it ?
Thanks
I like to extract the min/max/avg temperature and other values for a particular day for all years from my database.
Could someone give me some guidance for the SQL statement i have to use to achieve it ?
Thanks
-
- Posts: 252
- Joined: Fri 24 Jun 2011 5:57 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 10
- Location: Lamoine, Maine, USA
Re: Climatology for a given day
Is this what your are looking for?
SELECT year(logdate) as year, month(logdate) as month, day(logdate) as day, maxtemp, tmaxtemp, mintemp, tmintemp, round(avgtemp,1) as avgtemp, lowwindchill, tlowwindchill, highheatind, thighheatind, highhum, thighhum, lowhum, tlowhum, highdewpoint, thighdewpoint, lowdewpoint, tlowdewpoint, totrainfall, maxrainrate, tmaxrr, highhourrain, thighhourrain, highwindgust, thwindg, highavgwspeed, thavgwspeed, totwindrun, maxpress, tmaxpress, minpress, tminpress FROM dayfile WHERE day(logdate)=day(now()) and month(logdate)=month(now()) ORDER BY year(logdate) DESC
Kerry
SELECT year(logdate) as year, month(logdate) as month, day(logdate) as day, maxtemp, tmaxtemp, mintemp, tmintemp, round(avgtemp,1) as avgtemp, lowwindchill, tlowwindchill, highheatind, thighheatind, highhum, thighhum, lowhum, tlowhum, highdewpoint, thighdewpoint, lowdewpoint, tlowdewpoint, totrainfall, maxrainrate, tmaxrr, highhourrain, thighhourrain, highwindgust, thwindg, highavgwspeed, thavgwspeed, totwindrun, maxpress, tmaxpress, minpress, tminpress FROM dayfile WHERE day(logdate)=day(now()) and month(logdate)=month(now()) ORDER BY year(logdate) DESC
Kerry
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Climatology for a given day
That's it
Many thanks
Now i have to put that in a table or in graphics
Many thanks
Now i have to put that in a table or in graphics
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Climatology for a given day
This is what I got for now : http://meteo.laurentmey.fr/histograph/climato.php
I like to change the green columns to 'red-blue' like that : from here : http://www.infoclimat.fr/climatologie/g ... 07197.html
I guess this is a' highcharts' graph but i'm not able to find how to make this kind of gradient color in a 'columnrange'.
Any help would be welcome !
I like to change the green columns to 'red-blue' like that : from here : http://www.infoclimat.fr/climatologie/g ... 07197.html
I guess this is a' highcharts' graph but i'm not able to find how to make this kind of gradient color in a 'columnrange'.
Any help would be welcome !
You do not have the required permissions to view the files attached to this post.
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: Climatology for a given day
Laulau
I saw your page:
http://meteo.laurentmey.fr/histograph/climato.php
I thought it was very good.
Is it possible to know the code?
Cheers
I saw your page:
http://meteo.laurentmey.fr/histograph/climato.php
I thought it was very good.
Is it possible to know the code?
Cheers
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Climatology for a given day
The PHP code of the page and climato.js are directly visible :right click and view code source.
For the PHP files to read the SQL database add ?view=sce after the php filename ex :historicDayTemp.php?view=sce
For the PHP files to read the SQL database add ?view=sce after the php filename ex :historicDayTemp.php?view=sce
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: Climatology for a given day
The problem that I have in "climato.php" is the code for these two lines:
<div data-Highcharts-chart = "1" id = "containerM" ........
<div data-Highcharts-chart = "1" id = "container" ........
<div data-Highcharts-chart = "1" id = "containerM" ........
<div data-Highcharts-chart = "1" id = "container" ........
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Climatology for a given day
Look at climato.php again; i changed it, but it is certainly not very good HTML code.
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Climatology for a given day
There are no data returned by the php file that read the SQL data base http://kocher.es/cumulusMX/climato/hist ... d=16&mm=10
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: Climatology for a given day
My mistake was in the name of the table:
"dayfile" no "Dayfile"
Thank you very much Laulau
http://kocher.es/cumulusMX/climato/climato.php
http://kocher.es/climograph2.php
Saludos desde San Sebastian, Spain
"dayfile" no "Dayfile"
Thank you very much Laulau
http://kocher.es/cumulusMX/climato/climato.php
http://kocher.es/climograph2.php
Saludos desde San Sebastian, Spain
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: Climatology for a given day
laulau wrote:This is what I got for now : http://meteo.laurentmey.fr/histograph/climato.php
I like to change the green columns to 'red-blue' like that : from here : http://www.infoclimat.fr/climatologie/g ... 07197.html
I guess this is a' highcharts' graph but i'm not able to find how to make this kind of gradient color in a 'columnrange'.
Any help would be welcome !
The solution is this: in "climato.js"
Code: Select all
series : [
{
name : 'Min-Max',
type: 'columnrange',
color: {
linearGradient: { x1: 0, x2: 0, y1: 1, y1: 1.5 },
stops: [
[0, 'rgba(19, 114, 248, .9)'],
[1, 'rgba(242, 70, 36, .9)']
]
}
},
{
name : 'Media',
type: "spline",
color : 'lime'
}
]
};
You can change the colors to your liking
http://kocher.es/climograph2.php
Saludos desde San sebastian
Last edited by kocher on Fri 27 Jan 2017 10:03 am, edited 1 time in total.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Climatology for a given day
Shouldn't
linearGradient: { x1: 0, x2: 0, y1: 1, y1: 1.5 },
be ...
linearGradient: { x1: 0, x2: 0, y1: 1, y2: 1.5 },
linearGradient: { x1: 0, x2: 0, y1: 1, y1: 1.5 },
be ...
linearGradient: { x1: 0, x2: 0, y1: 1, y2: 1.5 },
......................Imagine, what you will KNOW tomorrow !