Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
ClimateDataCalculation
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
Well, somewhere there must be wrong, could be a bug I made...
Zip and attach (or pm me) your rain database (rainData.db) and I will try to run a report on that one (there is no personal information in the database except the name of the tables you selected and the local rain levels)
Best regards
Zip and attach (or pm me) your rain database (rainData.db) and I will try to run a report on that one (there is no personal information in the database except the name of the tables you selected and the local rain levels)
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Yeah, right! You think I'm that dumb? You will use the info from the millimeters of rain against a meteorological database, so you can find out where my cabin is, and then you will put your brain controlling machines around it! I'm going to find my tin foil hat... Oh, sorry. Wrong forum. This is not the "teasing conspiracy nuts" forum, is it? OK, I'll just give you my rain database instead (and I'm sure my VISA number is encoded in there somewhere!). 
- Attachments
-
- rainData.zip
- (112.31 KiB) Downloaded 114 times
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
U R a funny guy, LOL
PS I can confirm that it looks as bad for me as well when I run the rain report so I now have something to investigate in detail. If you run the new Combo report and only select the rain part, it looks more normal I would say (even if the curve is rising)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Many people say that I'm funny, yeah. With one noteable exception: My 17 year old daughter consider me no funny, and very embarassing! Which tells me that I'm doing something right! 
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
I have experimented a bit with your data and various charting options and I have found that your data is actually correctly presented (the smoothing options was somehow distorting the picture so I have removed that in the line charting example below). Your data is changing very little when it changes, when it changes it is mostly 1 mm, in one reading 2 mm. Most of the time there is no change and those readings are most likely of no interest I guess.
So now the question how this could be best presented. The line chart (it is actually a line and not bars) is one example and the donut is another. I think the donut is not so bad because it gives a view where you can identify readings of various sizes (which is also true for the line chart...) but the pie chart has one more advantage, it only shows readings when the rain level has changed.
BR
So now the question how this could be best presented. The line chart (it is actually a line and not bars) is one example and the donut is another. I think the donut is not so bad because it gives a view where you can identify readings of various sizes (which is also true for the line chart...) but the pie chart has one more advantage, it only shows readings when the rain level has changed.
BR
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Well, that's a hard question. I must admit that I really like the line graph, when that's possible. I'm afraid the donut is a bit to confusing for my use (it must be readable both by me, my wife and my parents, who use the cabin four weeks every year). But maybe the line charting would work better with shorter and broader lines and a longer X axis? I have the Yr (Norwegian metereological institute) setup here. This would be ideal for a two day span. Never mind the other lines and symbols in the graph, just look at the rain bars, and don't mind that they are different color. That's because they are predictions, not statistics, so they show maximum and mininmum predicted rain.
Oh, another thing that I would very much like to have changed: On the combo graph there are temperature readings under the X axis and the temperature is on the Y axis. I would prefer to have the date/time on that axis, more like the single temperature graph. But with one change in them both (yeah, I know I'm being very demanding here, it's just that I think this would be nicer): I would like to have fewer dates/times on the axis (perhaps half as many) and only use the date (without the year) and the time without the seconds, so it isn't necessary to have them across like they are. So a better formating would be like this:
16.12. 09.50
But maybe the best and most clutter free would be to only show the date on date changes and only have the time on the rest of the X axis.
Oh, another thing that I would very much like to have changed: On the combo graph there are temperature readings under the X axis and the temperature is on the Y axis. I would prefer to have the date/time on that axis, more like the single temperature graph. But with one change in them both (yeah, I know I'm being very demanding here, it's just that I think this would be nicer): I would like to have fewer dates/times on the axis (perhaps half as many) and only use the date (without the year) and the time without the seconds, so it isn't necessary to have them across like they are. So a better formating would be like this:
16.12. 09.50
But maybe the best and most clutter free would be to only show the date on date changes and only have the time on the rest of the X axis.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
This is an updated version where I have tried a lot of various options in Google Charts. It is not perfect but it gives a better overview. Some words to the rain chart below:
- it includes bars only when the rain level has changed from previous reading
- I have added a small black bar when the date is changing giving some understanding how much it actually rained during a day
- sometimes you see the date & time value on the x-axis bur Google Charts is scaling the x-axis automatically and I have not figured out how to control it better
The separate temperature & humidity reports have been omitted since they are superseded by the combo report that can do the same.
Google Chart in itself is a new dimension to dive into and you could easily spend a life time in there. But that is out of topic for me. The time I have spent so far on this is now simply enough. I am not an expert on graphs and various libraries so I encourage other contributors to develop better graphs, maybe with other libraries. The source code will be enough to take this further. I will stick to minor modifications and bugfixes of the current version.
Best regards
- it includes bars only when the rain level has changed from previous reading
- I have added a small black bar when the date is changing giving some understanding how much it actually rained during a day
- sometimes you see the date & time value on the x-axis bur Google Charts is scaling the x-axis automatically and I have not figured out how to control it better
The separate temperature & humidity reports have been omitted since they are superseded by the combo report that can do the same.
Google Chart in itself is a new dimension to dive into and you could easily spend a life time in there. But that is out of topic for me. The time I have spent so far on this is now simply enough. I am not an expert on graphs and various libraries so I encourage other contributors to develop better graphs, maybe with other libraries. The source code will be enough to take this further. I will stick to minor modifications and bugfixes of the current version.
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Thanks, I liked that graph a lot more! But one question: Can it be editet to show all hours of the day, no matter if it has been raining or not? So it's just like the one I showed you from Norwegian meteorological institute Yr a few posts back? That would really make the rain part perfect for me.
I see that you have changed the temp to time and date in the combined report too, so thanks! The only thing missing there would be a similar setup as the Yr, with mostly time. Or maybe that's not possible with the Google graph choices?
And thanks for your work on this! I wish I could contribute, but I'm totally crap on coding, so I'm best uses as an alpha/beta tester.
I see that you have changed the temp to time and date in the combined report too, so thanks! The only thing missing there would be a similar setup as the Yr, with mostly time. Or maybe that's not possible with the Google graph choices?
And thanks for your work on this! I wish I could contribute, but I'm totally crap on coding, so I'm best uses as an alpha/beta tester.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
Hello, thanks for your support and understanding
An idea I got is to add a small black bar for change of hour instead change of date, that was rather easy to make. This is now how the new version is made. Only disadvantage I think is that bars are getting thinner due to automatic x-axis scaling, all depending on the selected range of data.
Best regards
I have a major problem with Google Charts (GC) that it scales the x-axis automatically, all readings are there but maybe not shown in the graph (you can see this by viewing the source of the html graph once it is created).Can it be editet to show all hours of the day
An idea I got is to add a small black bar for change of hour instead change of date, that was rather easy to make. This is now how the new version is made. Only disadvantage I think is that bars are getting thinner due to automatic x-axis scaling, all depending on the selected range of data.
I have changed the combo report for temp and humidity so that the first reading starts with full date & time, the consecutive readings between every full hour will only hold hours & minutes. Every change of hour also holds full date & time but due to the scaling problem mentioned, they are not always shown and highly dependent on the select range.The only thing missing there would be a similar setup as the Yr, with mostly time. Or maybe that's not possible with the Google graph choices?
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Thanks! I see what you mean about that automatic scaling, yes. Does the Y axis scale automatically as well, or is it possible to lock it at a certain range, like 5-25 degrees? The combo report got a bit of a weird effect on this, as you see in the attached image. I have no idea where those big jumps comes from, it looks very straigth.
If this is not a function in the Google Charts I guess this is as far as it's possible to get with them. It's closer to what I'd like too, so thank you again!
Maybe someday I'll learn to program in Highcharts, they may actually be more suited to this kind of calculation. The important thing is the database, after all!
If this is not a function in the Google Charts I guess this is as far as it's possible to get with them. It's closer to what I'd like too, so thank you again!
Re: ClimateDataCalculation
I have had a look at the Highcharts forum, and it seems like it has some nice, knowledgeable people. I will let you know if I get something from there. That should be possible since it's a standard SQLite database. If I get the code from there, is it easy to put that into the html creation that you have made?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
Yes, it does, it might be there is an option to avoid automatic scaling on both axis but I have not looked that deep into the myriads of available optionsDoes the Y axis scale automatically as well
Your temperature in your stua is only changing between 10-11 degrees so the thermostats seems to be working fine. In the chart everything is blown up due to the automatic scaling...those big jumps
I think you are right, either find another library better suited or learn more about all Goggle Charts options
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
OK, thanks! And yeah, the thermostats is no problem. It's just the scaling of the graphs that I would like to block completely. From what I googled up it should be possible by setting absolute minimum and maximum for the axis, I will try to play a bit with the data. Probably on a separat VM, since I no doubt will f*ck it up the first five times!

-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: ClimateDataCalculation
@Mastiff
I made a sample using Highcharts that could be of interest to test. I have also made an experimental solution for a dynamic update of the x-axis, it is trying to adopt the scale to the actual number of readings in the chart. I have only worked with the rain report template (the combo is still unchanged and pending for upgrade later)
The good news is that I think Highcharts is better suited for this purpose, it is actually really nice. The bad news...I have not found any
What you have to do:
1) rename the old 'CreateHtml.py' file and put in the attached one instead 2) download & unzip Highcharts free version to a directory of your choice
3) restart EG and define or edit a Rain report configuration action (it is important that the report is being saved to the HighCharts folder
4) run the action and a report will be generated
5) open the report with a browser
Once you have the report in your browser, try to zoom & pan, it works very well
Best regards
I made a sample using Highcharts that could be of interest to test. I have also made an experimental solution for a dynamic update of the x-axis, it is trying to adopt the scale to the actual number of readings in the chart. I have only worked with the rain report template (the combo is still unchanged and pending for upgrade later)
The good news is that I think Highcharts is better suited for this purpose, it is actually really nice. The bad news...I have not found any
What you have to do:
1) rename the old 'CreateHtml.py' file and put in the attached one instead 2) download & unzip Highcharts free version to a directory of your choice
3) restart EG and define or edit a Rain report configuration action (it is important that the report is being saved to the HighCharts folder
4) run the action and a report will be generated
5) open the report with a browser
Once you have the report in your browser, try to zoom & pan, it works very well
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: ClimateDataCalculation
Fantastic!
I'm so sorry I didn't see this until now!
Even more so since I have a hysterical work day tomorrow getting ready for being off the rest of the week (running your own company can be a bitch at times, but I still like it). So I won't be able to check this out until Wednesday. But I will do that then, and I already see that this is probably a lot like what I was hoping for!
Thank you very much for your extra effort!!!!