mmkw43
Posts: 696
Joined: Tue Dec 24, 2013 6:18 pm

Weather forecast with python

Thu Apr 16, 2020 1:16 pm

A novice on this -- looked into openweathermap and I can see what that's all about. Unfortunately there isn't an easy way to have an actual forecast with rain percentage etc. So stupid question maybe but is there any way I can have a forecast in a python application? I was wondering if these weather widgets could somehow be embedded in the program and then be updated a couple of times an hour online. I'm trying to avoid being connected to the internet as a requirement -- just connect a couple of times an hour to update. Not sure if those widgets would work.

Just push me in the right direction (if there is one). :) --THANKS

User avatar
B.Goode
Posts: 11174
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Weather forecast with python

Thu Apr 16, 2020 2:31 pm

mmkw43 wrote:
Thu Apr 16, 2020 1:16 pm
A novice on this -- looked into openweathermap and I can see what that's all about. Unfortunately there isn't an easy way to have an actual forecast with rain percentage etc. So stupid question maybe but is there any way I can have a forecast in a python application? I was wondering if these weather widgets could somehow be embedded in the program and then be updated a couple of times an hour online. I'm trying to avoid being connected to the internet as a requirement -- just connect a couple of times an hour to update. Not sure if those widgets would work.

Just push me in the right direction (if there is one). :) --THANKS

It might not be the right direction for you, but this might be relevant -
https://bigl.es/tooling-tuesday-wttr/

mmkw43
Posts: 696
Joined: Tue Dec 24, 2013 6:18 pm

Re: Weather forecast with python

Thu Apr 16, 2020 5:40 pm

Wow, pretty cool. I'll have to play with that. Going to need something I can depend on but this looks very interesting. Thanks a lot.

User avatar
peppy.player
Posts: 336
Joined: Mon Mar 07, 2016 6:10 am

Re: Weather forecast with python

Thu Apr 16, 2020 9:13 pm

You can use Yahoo!Weather web service directly without any wrappers:
https://developer.yahoo.com/weather/

I used it for the Weather screensaver in the Peppy Player:
https://github.com/project-owner/Peppy.doc/wiki/Weather

Good luck!

mmkw43
Posts: 696
Joined: Tue Dec 24, 2013 6:18 pm

Re: Weather forecast with python

Thu Apr 16, 2020 11:10 pm

Ok. I did try openweather but it has no actual (detailed) forecast. It just gives true or false answers for a 3 day forecast like rain? clouds? etc.
Do you know if the yahoo api has a forecast? (Like % chance of rain etc)

mmkw43
Posts: 696
Joined: Tue Dec 24, 2013 6:18 pm

Re: Weather forecast with python

Thu Apr 16, 2020 11:11 pm

Oh Ok -- just saw your peppy player. THAT is what I want !
I may be back with questions. Thanks.

cyber7
Posts: 10
Joined: Thu Sep 12, 2013 7:28 am

Re: Weather forecast with python

Thu Nov 05, 2020 1:09 pm

PEPPY is just AWESOME!

User avatar
joelostinspace
Posts: 110
Joined: Sat Aug 10, 2019 2:51 pm
Location: Earth

Re: Weather forecast with python

Thu Nov 05, 2020 10:04 pm

there's a couple ways to use owm, I use folium webbrowser and os to make calls to the api and pull information out of a json file and an other is to use the python wrapper pyowm.
here's a folium example off there website: https://code-maven.com/openweathermap-api-using-python
and here's wrapper example: https://github.com/csparpa/pyowm
there really isn't a need to make multiple calls an hour the have a One Call that has the current weather and 48 hour forecast and a 7 day forecast

To travel is to discover that everyone is wrong about other countries.


--- Aldous Huxley

Return to “Python”