You are on page 1of 20

WEATHER PREDICTION

APPLICATION USING PYTHON

An Industrial Training Presentation by:


Navjot Kamboj
Branch: B.Tech CSE Cloud Computing
Class: 7CCA
Roll No. : 1/15/FET/BCC/1/056
OUTLINE
• ABOUT WEATHER PREDICTION
• EXISTING SYSTEM
• PROBLEMS IN EXISTING SYSTEMS
• PYTHON
• MAIN MODULE- TKINTER
• OPEN WEATHER MAP API
• ARCHITECTURE DIAGRAM
• WORKING OF THE APPLICATION
• ACTIVITY DIAGRAM
• USE CASE DIAGRAMS
• SCOPE
ABOUT WEATHER
PREDICTION
• A useful tool for informing populations about expected weather
conditions.
• Important for planning our day-to-day activities.
• Farmers need information to help them plan for the plan for the
planting and harvesting of their crops.
• Airlines need to know about local weather conditions in order to
schedule flights.
• Weather forecasting helps us to make more informed daily
decisions, and may even help keep us out of danger.
EXISTING SYSTEM

• The Weather Channel: provides you with a wealth of meteorological data


such as temperature, wind and visibility on an hourly or daily basis, with an
extended 10 day forecast available.app is available on Android, iOS and Windows
Phone.
• Weather Timeline: Android based application. Extreme weather alerts from
your choice of a variety of data sources are received. Users can save a variety of
locations and view detailed daily forecasts.

• Dark Sky: Provides hyper-accurate local weather forecasting. Improved


interface revamp puts more weather data right at your fingertips. The freakishly
accurate hyperlocal forecast is now accompanied by a precipitation map for the
next hour, as well as handy hourly forecasts and a precipitation graph.
EXISTING
APPLICATIONS
PROBLEMS IN EXISTING
SYSTEMS
● The Weather Channel includes social sharing. Sharing
personal details and location pose a threat to the security
of the user. Android or ios applications can even have bugs
which can corrupt the entire system.
● Dark sky application though provides hourly weather
updates but is unable to predict the weather forecast for
coming days. So, user will be unable to take necessary
steps. This application is not free to use.
● Weather Timeline beautifully show hourly updates but
doesn’t provide forecast for coming days.
PYTHON

➢ Python is a high-level, interpreted and general-purpose


dynamic programming language.
➢ The syntax in Python helps the programmers to do
coding in fewer steps as compared to Java or C++.
➢ Python is Interactive, Interpreted, Modular, Dynamic,
Object-oriented, Portable, and High level.
➢ It provides large standard libraries that include the areas
like string operations, Internet, web service tools,
operating system interfaces and protocols.
MAIN MODULE - TKINTER
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard
Python interface to the Tk GUI toolkit, and is Python's de
facto standard GUI. Tkinter is included with standard Linux, Microsoft
Windows and Mac OS X installs of Python. Core widgets available in
Tkinter library are-
● Containers: frame, toplevel, paned window.
● Buttons: button, radiobutton, checkbutton (checkbox),
menubutton (combobox).
● Text Widgets: label, labelframe, message, text.
● Entry Widgets: scale, scroll, listbox, slider, spinbox, entry
(singleline), text (multiline), and canvas (vector and pixel
graphics).
OPEN WEATHER MAP API
The back-end of the application uses two APIs from OpenWeatherMap,
which is an open source and enables anyone to download APIs for
various purposes.

• Current Weather Data: Fetch the current weather conditions for any
location over 200,000 cities round the world. Weather is updated based
on data from more than 40,000 weather stations. Data is available in
JSON, XML or HTML format.

API call:
api.openweathermap.org/data/2.5/weather?q={city name}
api.openweathermap.org/data/2.5/weather?q={city name},{country
code}
api.openweathermap.org/data/2.5/weather?zip={zip code},{country
code}
WEATHER PREDICTION API
• 5 day/ 3 hour forecast: This API provides the 5 day forecast
available in any city or location. 5 day forecast includes weather
data every 3 hours. Forecast is available in JSON and XML format.

• API Call
api.openweathermap.org/data/2.5/forecast?q={city
name},{country code}
api.openweathermap.org/data/2.5/forecast?id={city ID}
api.openweathermap.org/data/2.5/forecast?zip={zip
code},{country code}
ARCHITECTURE DIAGRAM
WORKING OF THE
APPLICATION
•The user is asked to enter the name of the city. If he doesn’t
enter the city then error is displayed on the Python shell.
•If he enters the city, he is asked if he wants to view the current
weather conditions or view the weather forecast for the coming
three days.
•User then clicks on the show button which further calls the
OpenWeatherMap API and fetches the results.
•Weather conditions of place which include temperature,
humidity, pressure, wind speed, wind direction etc, are
displayed.
•Name of the city, time and date are also fetch. If user wishes to
exit, he can simply close the application or he can re-enter name
of different city and view the results.
ACTIVITY
DIAGRAM
USE CASE FOR ADMINISTRATOR
USE CASE FOR USERS
PROPOSED SYSTEM
1. Starting Window displaying options to either shows current
weather or predicted weather
2. User enters the city name and clicks on show button.
3. Predicted weather forecast of the city for the next 3 days at a
given time.
SCOPE OF THE APPLICATION
● Weather forecast can be given for up to 10 days.
● Predicted temperature trends for the coming days can be shown with the help
of graphs. Graphs and charts make understanding of the data even better.
● Weather application can even show hourly updates of temperature.
● User experience can be further enhanced with the use of rich icons. For eg,
sun can be used to show sunny day/ daytime, moon can show nighttime,
clouds can indicate foggy weather.
● Application can also be made to show the UV index.
● A refresh button can be there to refresh the data.
THE END !!!

You might also like