ESP32-e-Paper-Weather-Display icon indicating copy to clipboard operation
ESP32-e-Paper-Weather-Display copied to clipboard

Add probability of precipitation to timeseries graph?

Open jpolton opened this issue 1 year ago • 9 comments

Probability of precipitation is downloaded with the 3hrly forecast data. And is quite interesting. This can be overlayed on the precipitation rate graph with a separate y-axis (on e.g. RHS of rainfall graph). On a 7.5" screen this fits fine with a little bit of nudging of the other elements in the DisplayForecastSection().

IMG_9623 IMG_9624

Would this be of interest as a Pull Request?

jpolton avatar Mar 26 '23 11:03 jpolton

Yes :-)

dreamy1 avatar Mar 27 '23 06:03 dreamy1

Started a PR: #202. Implemented in Waveshare_7_5_T7.ino only, for now.

jpolton avatar Mar 28 '23 08:03 jpolton

Edits should work on other screens but the forecast graph spacing might have to be tweaked to get the extra y-axis labels to fit.

For the 7.5" 800x480 screen this was a simple edit in the DisplayForecastSection() method (~line 407):

int gx = (SCREEN_WIDTH - gwidth * 4) / 5 + 5;

-->

int gx = (SCREEN_WIDTH - gwidth * 4) / 5 + 1;

I am reluctant to make a PR for things I can't personally test, unless someone else wants the PR and can help with that.

jpolton avatar Apr 06 '23 17:04 jpolton

Yes :-)

@dreamy1 @Kobbe1 Let me know what board you have, I'll make the changes for it and you could see if it looks OK?

jpolton avatar May 06 '23 16:05 jpolton

Thanks a lot - i have the 7.5" and the Liliygo T5 4.7" screen...but at the moment, unfortunately no time for testing...

dreamy1 avatar May 06 '23 16:05 dreamy1

I have a 4.2 inch board. I did not want to wait so already more or less implemented in my local copy which is heavily customized. I really love this feature - been using it since a few weeks now, thanks for the awesome idea. I did not actually add an Y-axis to show the % - as it is always 0 - 100% I don't think it is really needed and things are tight on a 4.2 screen.

I might be able to test it some time in the future when I merge other new changes but I don't regularly update it if all is well as it is "in production" - with the family, so changes are risky :)

Kobbe1 avatar May 06 '23 17:05 Kobbe1

I agree, actually OWM’s predicted rainfall amounts to gives a profile of predicted precipitation without the need to draw it as yet another graph line.

G6EJD avatar May 06 '23 21:05 G6EJD

I agree, actually OWM’s predicted rainfall amounts to gives a profile of predicted precipitation without the need to draw it as yet another graph line.

Yes but overlaying "probability of rainfall" as a line on top of rainfall rate is illuminating, especially when the probability is low. Together they make an estimate of risk of getting wet during e.g. the commute, laundry outside. IMG_0121

For smaller screens temperature and humidity could also be combined (where humidity is otherwise not plotted), though some method of distinguishing the lines (colour, thickness, style) would have to be experimented with.

jpolton avatar May 08 '23 20:05 jpolton

Associated PR #202 got closed when I attempted to move it off my master branch. Created a new PR

jpolton avatar Nov 10 '23 10:11 jpolton