Skip to content

SavelevGeo/open-weather-short-response

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenWeatherShortResponse

A short response from OpenWeatherMap forecast.

A simple app to put a 5 days weather forecast into 160 characters.
The response can be sent via SMS, for example, if your recipient doesn't have access to the Internet.
It gets a request from OpenWeatherMap.org One Call API, rearranges the daily forecast for 5 days into a short version.

A response example:

14                  
13-18-17-12,804,0   
13-15-16-11,500,53
11-18-18-15,803,0
13-20-19-16,801,0
14-24-24-20,803,0
17-25-26-21,801,0
20-26-25-23,804,13
21-30-28-24,803,0

Being: 14 the first day of the forecast.
Then for each day, separated by space:
13-18-17-12 Morning-Day-Evening-Night temperature in C°,weather id,probability of precipitation in %

Getting started

requires a python3, pandas and requests

git clone https://github.com/SavelevGeo/open-weather-short-response && cd open-weather-short-response

or download the weather_ui.py and weather_request.py files

and if python stands for Python 3.0 or higher with pandas and requests:

python weather_ui.py

The main and only window appears:

ui

Get your point and take your weather

As an example, go to your favourite map service and copy the coordinate in decimal lat, lon format separated by ,:

google maps

Then press paste from clipboard, then request

and copy to clipboard the response you got

the request

The response format is explained at the top

Send it!

The maximum size of the forecast text is 160 symbols. It is the maximum size for the satellite phone online SMS as for Iridium

send sms

NB!

The limit for one api key is 60 calls/minute or 1,000,000 calls/month. If you are planning to use it more often than once, you need to get your own API key and replace my API key with it here in weather_request.py. With the same limit the API key is free.

About

A simple app to put a 5 days weather forecast into 160 characters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages