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 %
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:
As an example, go to your favourite map service and copy the coordinate in decimal lat, lon
format separated by ,
:
Then press paste from clipboard
, then request
and copy to clipboard
the response you got
The response format is explained at the top
The maximum size of the forecast text is 160 symbols. It is the maximum size for the satellite phone online SMS as for Iridium
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.