Page 1 of 1

Solved Weather34 monthly and yearly graphs

Posted: Wed Oct 14, 2020 12:57 pm
by Expalmi
Hello,

I have sucessfully setup the weather34 template on my website.

What I miss are monthly and yearly graphs. I do have the data on my meteobridge pro.
The hppt request is installed.

Do I have to do something else, maybe manually upload some data?

Thanks
Andreas

Solved Re: Weather34 monthly and yearly graphs

Posted: Thu Oct 15, 2020 4:10 pm
by Expalmi
till now, no way to upload and use older data with the template.

The charts will only contain data from the date template was installed.

Andreas

Re: Solved Weather34 monthly and yearly graphs

Posted: Tue Nov 03, 2020 12:12 pm
by Gyvate
You can do this, however it will need some manual work.

1. check the .csv files in the Weather34/weather34charts folder - see how they are built, which data in which sequence each line contains.
you will have to look at the daily, monthly and yearly files e.g. 2020.csv, then inside the respective directory/folder (here Weather34/weather34charts/2020) the files month.csv (month = January - December) e.g. October.csv and the daily files e.g. 1Oct2020 etc.

2. create an export from Meteobridge for each file (daily, monthly, yearly) with the respective data in the proper sequence per line

3. if you don't have a minute based daily export (as I do), you may need to create intermediary values - the daily files have entries every 10 minutes - as MB saves data in its database only in hourly steps, you may have to create interpolated 10 minute steps between the hourly values

4. for the monthly files you have one entry per day - obviously some daily average - they can be taken 1:1 from an MB export with daily breakdown
Be careful, there is an oddity with the first two entries in the .csv files for month transition - but you can experiment with it and see what it gives :)

5. create the respective .csv files in an editor or in Excel - manually or semi-manually

6. check the result on a local web server or just upload the files to your hosting site into the Weather34/wether34charts folder/directory
(make sure that there is a folder for every year) and check the results there.

I suggest you start with one month, create the year folder, and then a month.csv with a few DayMonYear.csv and see how it works - once you have built one month (with the transition to the next and from the previous month), you should have understood the structure and can then build your whole available history for the Eather34 template.

I needed to do this myself as my files for October 2020 got somehow corrupted the other day and the graphs were a mess from a certain date on.
So I had to repair (remove, replace, change) the entries. Now it works again perfectly.

Good luck.

Re: Solved Weather34 monthly and yearly graphs

Posted: Tue Nov 03, 2020 12:39 pm
by Expalmi
Hello Gyvate,

thank you for this detailed explanation.

I will give it a try a start with one month.

Andreas

Re: Solved Weather34 monthly and yearly graphs

Posted: Tue Nov 03, 2020 4:09 pm
by Gyvate
I should have added that the 2020.csv file (or 2019.csv, 2018.csv, 2021.csv) whose location is the weather34charts directory (not the directory with the year name !) is just the month.csv files from the respective year-folder merged into one file).
That becomes interesting/important when you have more than one year with data content available.

Re: Solved Weather34 monthly and yearly graphs

Posted: Tue Nov 10, 2020 2:12 am
by Gyvate
Hi Andreas,
the export script for the data from Meteobridge Pro is:
---------------
# modified Standard CSV template with data in metric units for daily weather34 export for monthly and yearly csv files
#
$# date, temperature[C] max, temperature[C] min, dew point[C] max,dew point[C] min,raintotal, max gust speed[m/s], max avg wind speed[m/s], avg temp out, max sealevel pressure[hPa], min sealevel pressure[hPa]
[D] [MM:],[th0temp-max.1:],[th0temp-min.1:],[th0dew-max.1:],[th0dew-min.1:],[rain0total-sum.1:],[wind0wind-max.1:],[wind0avgwind-max.1:],[th0temp-avg:],[thb0seapress-max.1:],[thb0seapress-min.1:]
------------------
in the Services--Events Tab choose a new event (Data export), event type (specific time - choose any, doesn't matter), time frame (current year or previous year) resolution (days), template - save that template above with a name of your choice and the extension .exp to the \\METEOBRIDGE\data\exports folder. You can run it just as Test, don't need to wait for the time chosen (you have sort of to trick the "structure") 8)

afterwards you have to load the export file into an editor and exchange the month number by month abbreviations:
" 01" to " Jan" etc.
Somehow MB didn't want to translate [MMM] into Jan, Feb, Mar etc. even though as per the template description in the Wiki it should do so. Therefore I exported the month number and later on replaced it by the 3-letter month acronym.
Then save the lines for one month to the respective month.csv file and add the day lines to the whole year lines in the 2020.csv (current year) or 2019.csv (previous year) files - these files are supposed to be in the ../Weather34/Weather34charts/ directory whereas the month.csv files are supposed to be in the ../Weather34/Weather34charts/2020 or ../Weather34/Weather34charts/2019 directory.

And, as far as I know, if you want to import data from 2019, you have to choose this in the setup of Weather34. Otherwise you won't get a button to select the previous year.

Re: Solved Weather34 monthly and yearly graphs

Posted: Tue Nov 10, 2020 9:15 am
by Expalmi
Hi Gyvate,

thanks for your information and help.

Until now I was really busy, keeping my business running, these "Covid days" are hard.
I did not have enough time to migrate the data.

I hope I can start the transformation the next days.

Your template will help.

Andreas

Re: Solved Weather34 monthly and yearly graphs

Posted: Mon Nov 16, 2020 11:03 am
by Gyvate
Hi Andreas,

I edited my last post adding a few more (hopefully useful) details.

Regarding my situation, much of my data were/are not yet in my Meteobridge database - I only have it since June, and I haven't found the time to import the data from my WH4000SE/WH2320E console, which I have since end March 2019, into the MB database. I moved it into meteotemplate already (see 1st web link in my signature), but that was a different import format which I had to create with a Visual Basic script, especially the date/time conversion.

For the Weather34 template I have meanwhile managed to go back to December 2019. It's aggregation work from 5 minute records into daily records which I do mainly manually with Excel to find and create the max/min values for Temp/Dew/rain/Avg-Wind/gust/avg Temp/pressure.

But it looks good now. (see 2nd link in my signature). 8) - Now I can add day by day the missing months until March 2019.

Good luck with your (exports and) imports. :)

By the way -
I'm using the W34 template 8.34 - higher versions do not work with my consoles/extra sensors as Brian (developer) has now limited that template only to users of Davis stations. But the 8.34 template is good enough for me.

the link to your template is ? (if you don't mind to share)