-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/history report #54
base: master
Are you sure you want to change the base?
Conversation
Bumps [node-sass](https://github.com/sass/node-sass) from 5.0.0 to 7.0.0. - [Release notes](https://github.com/sass/node-sass/releases) - [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md) - [Commits](sass/node-sass@v5.0.0...v7.0.0) --- updated-dependencies: - dependency-name: node-sass dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> (cherry picked from commit 31d9fd5)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] <[email protected]> (cherry picked from commit 39a1de7)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> (cherry picked from commit b27f8a0)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.11. - [Release notes](https://github.com/npm/node-tar/releases) - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v6.1.0...v6.1.11) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> (cherry picked from commit ac62267)
Example can be seen here |
Nice add on - how about wind? Average and max speeds? |
Hi @uktricky |
Looks good, I've just gotten around to looking this again, work always getting in the way! I've created a dev version of my current NeoWX-Material installation so I can have a play in dev before I risk breaking my live site. Might be a daft question but I am not an expert when using GitHub by any means! How do I get your history pages into my version? Would you mind sending me some guidance? Thanks in advance... |
How to get History Reports Extract ZIP file and copy these files
to folder Copy to then restart weewx and you should see the History Report after the next generation run |
@seehase Is this a render issue on Safari? Or a small bug? |
|
Yeah, it seems it like a resolution thing. I'm on a newer MacBook with pretty big resolution. If I shrink the browser window, it seems ok. |
Many thanks - I did find the files you'd changed and hacked around so got it working, had to amend the skin.conf as I'd changed the original from the original release. Thanks again for pulling this feature together be good to see it merged into the release version. Re. the other posts on this thread, I'm running on Safari also but again larger resolution. |
So I tried it a third time. This time I deleted the "old" neowx-material folder and used it from the uploaded zip file. Still the same issues. Rendering is off and just the first value got a css background. The rendering is on @seehase Site off too. So this does not seems a problem on my side directly. There is also a thread on the wetterstationsforum.info forum with a small manual bit with slightly other instructions. I also tried this, but without success. |
I know, it's because of the responsive design, and breakpoints for specific screen resolutions. |
…ot break anymore)
I fixed it somehow. not yet perfect but it does not break anymore just take the |
Feature/history report
Thank you @seehase for this improvement. My use of US units seems to be causing trouble, particularly with parsing rainfall data which is stored in the the non-integer #.## format. When I first merged your code and added the [HistoryReport] section to skins conf, I used #.## formatted values for minvalues and maxvalues under the [[rain]] subsection. For example:
When I ran wee_reports using those values, I received this error:
It seemed the code was not handling the floats, so I modified skins.conf to use integers for minvalues and maxvalues as a temporary workaround and ran wee_reports again. The config file modification addressed the original error, but this time I received a different error:
This second error seems to occur during the conversion to US units, and I have never received it before when generating reports. I presume my weewx database contains rain data stored in non-integer format, but I don't have the python knowledge to determine whether that is resulting in this error. I would also like to be able to use appropriate US non-integer units for minunits and maxunits in skins.conf. Can you help? |
HI @ferretstew To have min/max ranges in numeric you can take my latest version or just change this line neowx-material/bin/user/historygenerator.py Line 317 in bdf74c4
float value can be set in skin.conf like
for your problem with us-units, please send me your wewwx.conf and skin.conf, then I can have a look, It will take a while because I will be on vacation |
I made the recommended change to historygenerator.py and restarted weewx, but I still receive the second error mentioned in my last post ("tuple index out of range" on line 879 of units.py). I have attached a zipfile of my weewx.conf and skin.conf, modified to obscure passwords. I don't think I've modified skin.conf. Thank you! |
Hi ferretstew I think the problem is your configuration, it is a bit "mixed" you can take the attached skin.conf without any changes, only your weewx.conf should be adapted if you have a question please send me a mail to [email protected] |
Change min/max range to float
Adds winDir scatter plot as per issue neoground#57
This is the one I used (extension changed to txt): It's a shame there's not much activity, it's a great skin and the recent additions like this and the wind direction graph make it a fully loaded front end. |
…-min-color tables
merged Windir
Updated my PR and also added the new winDir feature |
Awesome! Glad my PR was useful. Enjoying the collaboration. :) |
@seehase per your request, here's my All-Time Records template for After the last "card" (UV, around line # 94), add the following (and tweak to your desire): <div class="card-body text-center">
<h3 class="h4-responsive $Extras.color-text"><i class="fa fa-list-alt" ></i> All-Time Records</h3>
<div class="card-body text-center">
<div class="card">
<table class="table text-left">
<tr>
<th colspan="3" class="text-center"><b>Temperatures</b></td>
</tr>
<tr>
<td>Highest:</td>
<td>$alltime.outTemp.max</td>
<td>$alltime.outTemp.maxtime</td>
</tr>
<tr>
<td>Lowest:</td>
<td>$alltime.outTemp.min</td>
<td>$alltime.outTemp.mintime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Heat Index</b></td>
</tr>
<tr>
<td>Highest:</td>
<td>$alltime.heatindex.max</td>
<td>$alltime.heatindex.maxtime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Wind Chill</b></td>
</tr>
<tr>
<td>Lowest:</td>
<td>$alltime.windchill.min</td>
<td>$alltime.windchill.mintime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Dewpoint</b></td>
</tr>
<tr>
<td>Highest:</td>
<td>$alltime.dewpoint.max</td>
<td>$alltime.dewpoint.maxtime</td>
</tr>
<tr>
<td>Lowest:</td>
<td>$alltime.dewpoint.min</td>
<td>$alltime.dewpoint.mintime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Pressure</b></td>
</tr>
<tr>
<td>Highest:</td>
<td>$alltime.barometer.max</td>
<td>$alltime.barometer.maxtime</td>
</tr>
<tr>
<td>Lowest:</td>
<td>$alltime.barometer.min</td>
<td>$alltime.barometer.mintime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Wind</b></td>
</tr>
<tr>
<td>Highest Sustained:</td>
<td>$alltime.windSpeed.max.format('%.0f')</td>
<td>$alltime.windSpeed.maxtime</td>
</tr>
<tr>
<td>Highest Gust:</td>
<td>$alltime.windGust.max.format('%.0f')</td>
<td>$alltime.windGust.maxtime</td>
</tr>
<tr>
<th colspan="3" class="text-center"><br><b>Precipitation</b></td>
</tr>
<tr>
<td>Highest Daily Rainfall:</td>
<td>$alltime.rain.maxsum</td>
<td>$alltime.rain.maxsumtime</td>
</tr>
<tr>
<td>Highest Rain Rate:</td>
<td>$alltime.rainRate.max</td>
<td>$alltime.rainRate.maxtime</td>
</tr>
</table>
</div>
</div>
</div> |
@W0CHP |
Looking good now, I have added the all time records (tweaked a bit): https://www.360shetland.co.uk/weather/history.html @W0CHP I was looking at your Sun & Moon page, just wondering how you coded the "Today's Total Luminosity |
@Pogs2004 |
EDIT My history.html.tmpl file, it wasn't working correctly in dark mode and the font size was too small. I haven't set the language translations in the all time records section but it should be easy to do. I split the all time records into a separate card and aligned the headings to the left. I have also added the Erik Flowers WI weather icons which are installed with Neowx rather than the Font Awesome ones which may not be on an end users system.
|
Sure @Pogs2004 - in the #set $now = $current.dateTime.raw
#set $yesterday = $now - 24*3600
#set $today_dayluminosity = $almanac.sun.set.raw - $almanac.sun.rise.raw
#set $yesterday_dayluminosity = $almanac($almanac_time=$yesterday).sun.set.raw - $almanac($almanac_time=$yesterday).sun.rise.raw
#set $difference_pre = $today_dayluminosity - $yesterday_dayluminosity
#set $difference = $difference_pre//60
#set $seconds = $almanac.sun.set.raw - $almanac.sun.rise.raw
#set $hours = $seconds //3600
#set $seconds %= 3600
#set $minutes = $seconds//60
#set $seconds %= 60
#set $dayluminosity_str = "%d hours, %d minutes, %d seconds" % ($hours, $minutes, $seconds)
#set $difference = $today_dayluminosity - $yesterday_dayluminosity
#if $difference
#set $delta = abs($difference)
#set $amt_str = "%s%d seconds" % (str(int($delta) // 60) + ' minutes, ' if ($delta // 60) > 0 else '', $delta % 60 if ($delta // 60) > 0 else $delta)
#if $difference > 0
#set $delta_str = "%s more than yesterday" % $amt_str
#else
#set $delta_str = "%s less than yesterday" % $amt_str
#end if
#set $dayluminosity_str = "%s" % ($dayluminosity_str)
#end if Then place something similar to this in the Sun "card" and tweak: <h6 class="h6-responsive $Extras.color-text"> Today's Total Luminosity</h6>
<div class="row">
<div class="col">
$dayluminosity_str ($delta_str)
</div>
</div> |
Thanks @W0CHP |
Question: as there is not much actitity in that repo... do we want to create a fork to continue working on improvements? |
Thanks yet again @W0CHP! I’ve added it in and reformatted the sun and moon tables, looks great. Edit re the last new and full moon,, I was using last_new_moon and last_full_moon instead of previous. https://www.360shetland.co.uk/weather/almanac.html |
My pleasure. Your site is looking amazing, @Pogs2004! Q: I noticed your history/stats are leveraging what looks the more modern and responsive flexbox (or grid)? If so, I would recommend either doing a PR or posting the code for someone to do a PR to make the report more responsive by default. |
Yeah @seehase, this repo hasn't moved since 2021 (even PR's). I'd be OK with using and contributing to your (more "living") fork. If @neoground wants to pull all the changes in at a later date, it can always be done. |
Thanks @W0CHP! I am still playing around with the layout for the stats, unfortunately although it looks good on desktop and tablet it is a bit broken on small screens unless they are turned landscape. Even then, the max rain is a bit messy. If I use a fully flex container it looks good on small screens but stretched the full width of the viewport on desktop and tablet. I'm thinking to use a bit of code to determine the viewport size then use an appropriate container, I have done this for my own business website. As soon as I'm happy I'll post it up here |
Sounds good, mate. You got talent, and it would be beneficial for @seehase 's fork! 👍 |
I'm trying to make a graph for cumulative evapotranspiration, can anyone help me? Thank you |
Added the history report from https://github.com/ngulden/niculskin/
and took also some version updates from dependabot