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
Yet Another Dayfile Reader (PHP)
Moderator: daj
- 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: Yet Another Dayfile Reader (PHP)
@phil23
First of all, be sure of what it is you actually want.
In your post you suggest that the min / max was shown in the Seasonal table.
NO - that is why they are labled HI / Lo
eg. Temp Max > lo is the lowest MAXIMUM temperature and so on ...
I get the impression that you would like to add to the 'year' table true Max / Min (Avg ?) (to be displayed if either Max OR Min is requested for a specified dataset)
It would of course be possible to create new tables / buttons for just that info.
Either way where Max / Min values are separate data this involves using the 'computed' example as you want work with TWO different sets of data (for whatever specific data 'type').
Where a dataset only has one possible value, then you need to calculate the max / min values.
.. although for each dataset the code / reasoning is already there somewhere.
For most of the data 'types' you've just posted the Min is always going to be 0 (zero)
First of all, be sure of what it is you actually want.
In your post you suggest that the min / max was shown in the Seasonal table.
NO - that is why they are labled HI / Lo
eg. Temp Max > lo is the lowest MAXIMUM temperature and so on ...
I get the impression that you would like to add to the 'year' table true Max / Min (Avg ?) (to be displayed if either Max OR Min is requested for a specified dataset)
It would of course be possible to create new tables / buttons for just that info.
Either way where Max / Min values are separate data this involves using the 'computed' example as you want work with TWO different sets of data (for whatever specific data 'type').
Where a dataset only has one possible value, then you need to calculate the max / min values.
.. although for each dataset the code / reasoning is already there somewhere.
For most of the data 'types' you've just posted the Min is always going to be 0 (zero)
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
I do tend to think out loud & then waffle on a bit....beteljuice wrote: ↑Thu 08 Aug 2019 10:51 pm @phil23
First of all, be sure of what it is you actually want.....
I get the impression that you would like to add to the 'year' table true Max / Min (Avg ?)
(to be displayed if either Max OR Min is requested for a specified dataset)
Then put it in posts before completely engaging my brain.
Best explaination is on the daily minimums table for example,
after the yearly averages block at the bottom.
A similar table that list the lowest temp for each month/year.
For say the Maximums table it would show the highest for each month/year.
Anyway I do credit myself with have the ability to have stupid ideas at times & after consideration realise I should have given myself a slap on the back of the head....
Cheers.
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
- 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: Yet Another Dayfile Reader (PHP)
Thank you for clarifying.... after the yearly averages block at the bottom.
A similar table that list the lowest temp for each month/year.
Yes that is feasible - the values are easily gleaned from the arrays already constructed to work out the averages (and don't forget the 'yearly' table is an option).
If you decide that eg. temp (Min or Max) extremes are a 'must have' then while the yearly averages are being constructed you would at the same time create / build your extremes 'table' as a separate $var.
Then .. stitch it in near the end of $tableLayout
I'm not sure how it would 'sit' in a page with many years of data, and of course those extremes are shown in the Seasonal view ...
.. but on your site with your data you can do what you want
......................Imagine, what you will KNOW tomorrow !
- meteosangonera
- Posts: 52
- Joined: Thu 07 Jun 2018 2:17 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Contact:
Re: Yet Another Dayfile Reader (PHP)
I have a serie of data from 1940 to 2019, the date field has the following format: "DD/MM/YYYY"
I can make two tables, the first from 1942 to 1999 and another from 2000 to 2019, but the interesting thing would be to have all the data in the same table.
Can you help me?
Thank you.
I can make two tables, the first from 1942 to 1999 and another from 2000 to 2019, but the interesting thing would be to have all the data in the same table.
Can you help me?
Thank you.
- 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: Yet Another Dayfile Reader (PHP)
What has this to do with dayfile.txt ?
If your data can be converted to dayfile.txt format - then it should work.
Edit: (after I've had some medication) Hmm ... not properly, I see your problem.
If your data can be converted to dayfile.txt format - then it should work.
Edit: (after I've had some medication) Hmm ... not properly, I see your problem.
Last edited by beteljuice on Sat 17 Aug 2019 10:05 pm, edited 2 times in total.
......................Imagine, what you will KNOW tomorrow !
- meteosangonera
- Posts: 52
- Joined: Thu 07 Jun 2018 2:17 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Contact:
Re: Yet Another Dayfile Reader (PHP)
I can convert all the data, except the date field, due to the data begins in 1940 and not in 2000.beteljuice wrote: ↑Fri 16 Aug 2019 9:18 pm What has this to do with dayfile.txt ?
If your data can be converted to dayfile.txt format - then it should work.
Therefore I need the date field to have the format DD/MM/YYYY instead of DD/MM/YY in order to make a difference between the 1900s and 2000s.
For example, in 2040, I will have the data repeated as for both 1940 and 2040 the first row will begin: 01/01/40.
-
- Posts: 214
- Joined: Tue 24 Nov 2015 11:30 pm
- Weather Station: Fine Offset & Davis Vantage Vue
- Operating System: Windows 10; Raspbian Buster
- Location: Switzerland
Re: Yet Another Dayfile Reader (PHP)
If what you want is everything in one file, a pretty awful but quick and dirty fix would be to add 60 years onto all your dates so that 1940 displays as 2000 and 2010 as 2070.
Alternatively, you can get them in one file with the correct last 2 digits (but in the wrong order) if you left-truncate the century from the year to delete the '19'. Then you'd have 2000-2019 appearing as dd-mm-00 to dd-mm-19, and 1940-1999 appearing as dd-mm-40 to dd-mm-99.
As I said - quick - dirty - functional. Depends if that's good enough!
Excel can do either the 'add 60 years' or 'left truncate the century from the year'
Alternatively, you can get them in one file with the correct last 2 digits (but in the wrong order) if you left-truncate the century from the year to delete the '19'. Then you'd have 2000-2019 appearing as dd-mm-00 to dd-mm-19, and 1940-1999 appearing as dd-mm-40 to dd-mm-99.
As I said - quick - dirty - functional. Depends if that's good enough!
Excel can do either the 'add 60 years' or 'left truncate the century from the year'
- 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: Yet Another Dayfile Reader (PHP)
Ah yes - I forgot about Cumulus just doing the last two year digits, and of course you want ongoing updates to dayfile.txt.Therefore I need the date field to have the format DD/MM/YYYY instead of DD/MM/YY in order to make a difference between the 1900s and 2000s.
For example, in 2040, I will have the data repeated as for both 1940 and 2040 the first row will begin: 01/01/40.
I will ponder at my leisure .... (Other irons in the fire ATM)
......................Imagine, what you will KNOW tomorrow !
- meteosangonera
- Posts: 52
- Joined: Thu 07 Jun 2018 2:17 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Thanks for you idea, but I think it would be confusing for the users of my website. For the time being I will make two different tables, one until 1999 and another from 2000, Waiting to find another solution.ExperiMentor wrote: ↑Sat 17 Aug 2019 9:48 pm If what you want is everything in one file, a pretty awful but quick and dirty fix would be to add 60 years onto all your dates so that 1940 displays as 2000 and 2010 as 2070.
Alternatively, you can get them in one file with the correct last 2 digits (but in the wrong order) if you left-truncate the century from the year to delete the '19'. Then you'd have 2000-2019 appearing as dd-mm-00 to dd-mm-19, and 1940-1999 appearing as dd-mm-40 to dd-mm-99.
As I said - quick - dirty - functional. Depends if that's good enough!
Excel can do either the 'add 60 years' or 'left truncate the century from the year'
- meteosangonera
- Posts: 52
- Joined: Thu 07 Jun 2018 2:17 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Contact:
Re: Yet Another Dayfile Reader (PHP)
For the time being I will make two different tables, one until 1999 and another from 2000, Waiting to find another solution.beteljuice wrote: ↑Sat 17 Aug 2019 10:03 pmAh yes - I forgot about Cumulus just doing the last two year digits, and of course you want ongoing updates to dayfile.txt.Therefore I need the date field to have the format DD/MM/YYYY instead of DD/MM/YY in order to make a difference between the 1900s and 2000s.
For example, in 2040, I will have the data repeated as for both 1940 and 2040 the first row will begin: 01/01/40.
I will ponder at my leisure .... (Other irons in the fire ATM)
Can I adapt your script so that it does not add "20" to the date but "19"?
Thanks
- 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: Yet Another Dayfile Reader (PHP)
... but of course - It's yours to tweak as you see fit. (might be better to remove the 'add' and '20' checks altogether and keep your full year)Can I adapt your script so that it does not add "20" to the date but "19"?
There are about 15 entries to change, starting at approx. line #1807
... but I may have a better way in mind, ...... when I have the time !
......................Imagine, what you will KNOW tomorrow !
- meteosangonera
- Posts: 52
- Joined: Thu 07 Jun 2018 2:17 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 10
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Here you can see the result http://www.meteosangonera.es/datosdiariosalcantarilla/beteljuice wrote: ↑Sun 18 Aug 2019 9:27 am... but of course - It's yours to tweak as you see fit. (might be better to remove the 'add' and '20' checks altogether and keep your full year)Can I adapt your script so that it does not add "20" to the date but "19"?
There are about 15 entries to change, starting at approx. line #1807
... but I may have a better way in mind, ...... when I have the time !
I think it looked good. I'll be keeping an eye out for possible script updates.
You do a great job. I wish I knew how to do this kind of thing.
- 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: Yet Another Dayfile Reader (PHP)
Works well
Second thoughts, probably better to keep the 1900 / 2000 separate as the 'yearly' parts of the table would be very long.
Second thoughts, probably better to keep the 1900 / 2000 separate as the 'yearly' parts of the table would be very long.
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Re: Yet Another Dayfile Reader (PHP)
You must be getting bored?
Maybe someone needs to suggest a new twist to this thread to keep you occupied!
:Now: :Today/Yesterday:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
- 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: Yet Another Dayfile Reader (PHP)
@phil
the beteljuice is always tweaking / repairing / creating something - mostly because it's 'there' and sometimes because it just ain't quite right.
(one of my In Progress 'put right / improve' projects) one of many
the beteljuice is always tweaking / repairing / creating something - mostly because it's 'there' and sometimes because it just ain't quite right.
(one of my In Progress 'put right / improve' projects) one of many
......................Imagine, what you will KNOW tomorrow !