Weather Forecasting
Weather Forecasting
Weather Forecasting
JULY 2024
SHADAN WOMEN’S COLLEGE OF ENGINEERING AND TECHNOLOGY
(Approved by AICTE, New Delhi & Affiliated to JNTUH,
Hyderabad) Khairatabad, Hyderabad – 500 004
1 Abstract 10
2&3 Survey
10
4&5 Analysis
6 Design 10
7 Seminar- 20
1+Report
Mid-1Total 50
8,9&10 Implementation 10
11 Testing 10
12 Execution 10
13 Seminar-2+ 20
Report
Mid-2Total 50
Incharge HOD
TABLE OF CONTENTS
CHAPTE PAGE
TITLE
R NO. NO.
ABSTRACT 1
1 INTRODUCTION 2
1.1 General 2
1.2 Objective 2
2 LITERATURE SURVEY 4
2.1 General 4
3 REQUIREMENT ANALYSIS 6
3.1 General 6
5 SYSTEM DESIGN 10
5.1 General 10
6 TESTING 17
6.1 General 17
7 IMPLEMENTATION 20
7.1 General 20
7.3 Screenshots 29
CONCLUSION 32
REFERENCES 33
LIST OF FIGURES
On the fronted, HTML and CSS are employed to design an intuitive and user-friendly
interface. The design prioritizes simplicity and clarity, ensuring that users can easily interpret
the weather information displayed. This ensures that users can access weather forecasts
conveniently regardless of the device they are using. Overall, this project demonstrates a
robust and user-friendly weather forecast application. By providing accurate and accessible
weather information, the application aims to enhance users' ability to plan their activities
effectively based on current and forecasted weather conditions.
Chapter 1
INTRODUCTION
1.1 GENERAL
Current weather apps lack simplicity and speed, making it challenging for users
to quickly access accurate information for specific cities. There is a need for streamlined web
application that prioritizes user-friendly interfaces, delivering real-time, precise weather
details for informed decision-making in travel, planning, and daily activities.
1.2 OBJECTIVE
The objective of this weather project is to design and implement an efficient and
user-friendly system that helps user to know about weather details of any city using its name
only.
User-friendly Interface
Accurate weather Details
Fast data Fetching
Warehousin
g
electronic
storage of a
large
amount of
information
by
1.3 EXISTING SYSTEM
RB Multicast is a receiver-based protocol, which means that the relay node of a packet
transmission is decided by the potential receivers of the packet in a distributed manner.
In RB Multicast, the multicast routing uses the concepts of “virtual node” and “multicast region” for
forwarding packets closer to the destination multicast members and determining when
packets should be split into separate routes to finally reach the multicast members.
These networks are dynamic due to the mobility of the nodes in the network and/or the
random sleep/awake cycles that are often utilized to minimize energy dissipation of the devices the
performance of RB Multicast is compared to that of the unicast protocol to show the
performance gain achieved by the proposed multicast routing protocol.
The results show that RB Multicast achieves much better performance in terms of latency and
network traffic.
RB Multicast includes a list of the multicast members’ locations in the packet header, which
prevents the overhead of building and maintaining a multicast tree at intermediate sensor
nodes, because all the necessary information for routing the packet is included with in the
packet header
Chapter 2
LITERATURE SURVEY
2.1 GENERAL
This chapter gives the literature survey about the various important techniques and
algorithms such as robust active shape model approach and local shape analysis method
needed to carry out the project. It also gives the information about drawbacks in the existing
robust active shape model approach and the advantages of local shape analysis.
2.2 GPSR: GREEDY PERIMETER STATELESS ROUTING
FOR WEATHER FORECASTING
Weather forecasting has been one of the most challenging difficulties around the world
because of both its practical value in popular scope for scientific study and meteorology.
Weather is a continuous, dynamic ,multidimensional chaotic process, and data-intensive and
these properties make weather forecasting a stimulating challenge. It is one of the most
imperious and demanding operational responsibilities that must be carried out by many
meteorological services all over the globe. Various organizations / workers in India and
abroad have done demonstrating using supported time series data manipulation. The various
methodologies viz. statistic decomposition models, Exponential smoothing models, ARIMA
models and their dissimilarities like seasonal ARIMA models, vector ARIMA models using
flexible time series, ARMAX models i.e. ARIMA with following informative variables etc.,
which has been used for forecasting purposes. Many training have taken place within the
analysis of pattern and circulation of rainfall in many regions of the world. Totally altered
time series methods with different purposes are used to investigate weather information in
many different literatures. Accurate and timely weather forecasting is a major challenge for
the scientific research.
Chapter 3
REQUIREMENT ANALYSIS
3.1 GENERAL
This chapter provides details about the system requirements. The functional, non-
functional, hardware and software requirements are explained in detail. The functional
requirements define a function of system. The function is described as a set of input, the
behaviour and outputs. The non-functional requirement is a requirement that specifies criteria
that can be used to judge the operation of a system, rather than specific behaviors. The
hardware and software requirements describe about the tool and the languages used to build
the system.
3.2 HARDWARE REQUIREMENTS
The operator shall be able to input the weather periods to the system to view the
desired weather parameters within the particular periods.
The system shall be able to produce minimum, maximum and the average data of
a particular weather parameter when it is requested by an operator.
The system shall provide the following weather parameters: temperature,
pressure, wind speed & direction, rainfall, and humidity.
Chapter 4
METHODOLOGY
4.2 SYSTEM ARCHITECTURE
SYSTEM DESIGN
5.1 GENERAL
This chapter deals with unified modelling language. UML is a language for
visualizing, specifying, constructing and documenting artefacts of software intensive systems.
The UML has emerged as the de facto and de jure standard diagramming notation for object-
oriented modelling. UML includes a set of graphic notation techniques to create visual
model of object-oriented software-intensive systems.
UML notations are the most important elements in modelling. Efficient and
appropriate use of notations is very important for making a complete and meaningful model.
Different notations are available for things and relationships. And the UML diagrams are
made using the notations of things and relationships.
Use case diagrams describe the functional behaviour of the system as seen by the user.
It shows a set of actors and use cases and their relationships. It is important for organizing and
modelling the external behaviour of the system. In the Fig.5.1 CT image and learning database
act as an external entity that interacts with the system. Ellipse drawn with a solid line,
represent the use case. An include relationship is that the base use case explicitly incorporates
the behaviour of another use case at a location specified in the base. An exclude relationship is
that the base use case implicitly incorporates the behaviour of another use case at a location
specified by the extending use case.
5.4 ACTIVITY DIAGRAM
Activity Diagrams model the dynamic behaviour of a system, in particular the work
flow. Activity diagrams can be used to describe the business and operational step-by-step
workflows of components in a system. An activity diagram shows the overall flow of control.
The rounded rectangles represent activities,diamonds represent decisions,bars represent the
start (split) or end (join) of concurrent activities black circle represents the start (initial state)
of the workflow and an encircled black circle represents the end (final state).Arrows run from
the start towards the end and represent the order in which activities happen. Fig.5.2 represents
the activity diagram.
State chart diagrams describe the dynamic behaviour of an individual object. This
behaviour is analyzed and represented in series of events, that could occur in one or more
possible states. Hereby "each diagram usually represents objects of a single class and track the
different states of its objects through
Class diagrams describe the static structure of the system: Objects, Attributes,
Associations. It shows a set of classes, interfaces and collaborations and their relationships.
Address static design view of a system.
In the design of a system, a number of classes are identified and grouped together in a class
diagram which helps to determine the static relations between those objects. With detailed
modelling, the classes of the conceptual design are often split into a number of subclasses.
Fig. 5.8 Class Diagram
Chapter 6
TESTING
6.1 GENERAL
Testing can never completely identify all the defects within software. Instead, it
furnishes a criticism or comparison that compares the state and behaviour of the product
against oracles, principles or mechanisms by which someone might recognize a problem.
These oracles may include (but are not limited to) specifications, contracts, comparable
products, past versions of the same product, inferences about intended or expected purpose,
user or customer expectations, relevant standards, applicable laws, or other criteria.
Every software product has a target audience. For example, the audience for video game
software is completely different from banking software. Therefore, when an organization
develops or otherwise invests in a software product, it can assess whether the software product
will be acceptable to its end users, its target audience, its purchasers, and other stakeholders.
Software testing is the process of attempting to make this assessment.
Not all software defects are caused by coding errors. One common source of expensive
defects is caused by requirement gaps, e.g., unrecognized requirements that result in errors of
omission by the program designer. A common source of requirements gaps is non-functional
requirements such as testability, scalability, maintainability, usability, performance and
security.
Verify that different modules and components of the Todays weather application
work together seamlessly.
Test data flow and interactions between various parts of the system.
Ensure that the user interface is user-friendly, intuitive, and visually appealing.
Check for consistency in design elements and responsiveness across different
devices.
Assess the system’s performance under normal and peak load conditions.
Check response times, scalability, and overall system stability.
IMPLEMENTATION
7.1 GENERAL
This chapter provides detail about the implementation of the system. It gives a detailed
view about the steps in implementation of the project.
weather.py
@dataclass
class WeatherData:
main: str
description: str
icon: str
temperature: int
resp = requests.get(fhttps://api.openweathermap.org/data/2.5/weather?
lat={lat}&lon={lon}&appid={API_key}&units=metric').json()
data = WeatherData(
main = resp.get('weather')[0].get('main'),
description = resp.get('weather')[0].get('description'),
icon = resp.get('weather')[0].get('icon'),
temperature = int(resp.get('main').get('temp'))
)
return data
return weather_data
2. Flask Application
app.py
def index():
data = None
if request.method == 'POST':
city = request.form['cityName']
state = request.form['stateName']
country = request.form['countryName']
3. .env File
API_KEY=your_openweathermap_api_key
@dataclass
class WeatherData:
main : str
description : str
icon : str
temperature : int
def
get_lat_lon(cityName,stateCode,countryCo
de,APIkey):
resp=requests.get(f'http://api.openweath
ermap.org/geo/1.0/direct?q={cityName},
{stateCode},
{countryCode}&appid={APIkey}').json()
data = resp[0]
lat,lon = data.get('lat'),
data.get('lon')
return lat, lon
try:
1
# Make the API request
resp =
requests.get(f'http://api.openweathermap
.org/geo/1.0/direct?q={cityName},
{stateCode},
{countryCode}&appid={APIkey}').json()
except
requests.exceptions.RequestException as
e:
2
# Handling any request
exceptions (e.g., network errors)
print(f"Request error: {e}")
return None, None
except (KeyError, IndexError) as e:
# Handling any key/index errors
print(f"Data error: {e}")
return None, None
3
app.py
app = Flask(__name__)
return
render_template('index.html',data=data)
if __name__ == '__main__':
4
app.run(debug=True)
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-
scale=1.0">
<title>My Weather App</title>
<link
href="https://cdn.jsdelivr.net/npm/boots
[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNl
yT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
</head>
<body class="bg-warning text=white">
<div class = "text-center">
5
<h1 class="mt-5">Weather
Website</h1>
<form action="/" method="post">
<div class="container">
<div class="row">
<div class="col-sm">
<input type="text" id="cityName"
name="cityName" placeholder="City"
class="form-control">
</div>
<div class="col-sm">
<input type="text"
id="stateName" name="stateName"
placeholder="State" class="form-
control">
</div>
<div class="col-sm">
<input type="text
id=countryName" name="countryName"
placeholder="Country" class="form-
control">
</div>
<div >
6
<button style="margin:30px"
class="submit btn btn-
light">Find</button>
</div>
</div>
</div>
</form>
{% if data %}
<!-- {{data.main}}:{{
data.description }}<br> -->
<img
src="https://openweathermap.org/img/wn/1
[email protected]" alt="Icon">
{{data.temperature}} C
{% endif %}
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootst
[email protected]/dist/js/bootstrap.bundle.min.j
s"
7
integrity="sha384-
YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDz
Oxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>"
</body>
</html>
7.3 SCREENSHOTS
8
Fig.7.3.1 Front end page