Trixology
WeatherCat => WeatherCat Web Templates => Topic started by: jsnell on March 15, 2022, 12:29:21 AM
-
Just sharing in case people are interested. This is a python script that parses your WeatherCat data files for the current rain year (July-July, sorry, I live in California) and writes any "rain events" to a file that you can include in any web templates you might have. Rain events are defined as being .1 inches or more, more or less. I wanted to generate a "when was that last storm?" list.
Script here:
https://gist.github.com/jasonsnell/caeff4fef6978f8271780f40da58db9c
Output sample on my home weather page:
https://snell.zone/weather/weather.php
-
Thanks Jason for sharing! (http://www.canebas.org/WeatherCat/Forum_support_documents/Custom_emoticons/thanks_sign.gif)
Cheers, Edouard
-
Thanks for this and your past 14 day temperature graph, which works perfectly. This one works to create the text file, but is it also supposed to create the image showing the past two weeks of rain? Or is that another step that's not covered here?
-
Very cool, Jason. Thanks so much for sharing and providing a link to your weather site.
clockworkkev12: As this is your first post on the WeatherCat forum, welcome!
-
Sorry for the very long delay.
The code to generate the last 14 days of rain is here:
https://gist.github.com/jasonsnell/6ac75c44d0bc8dbd9c649f5211b77934
-
Works great! Thank you so much. Big fan of your work.