0% found this document useful (0 votes)
15 views24 pages

Synopsis On Weather Forecast

Uploaded by

srushtim1420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views24 pages

Synopsis On Weather Forecast

Uploaded by

srushtim1420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI -590 014

Mini-Project Synopsis on
“Weather Forecast”

Submitted in partial fulfillment of the requirement for the award of degree of

BACHELOR OF
ENGINEERING IN
COMPUTER SCIENCE AND ENGINEERING

Submitted by

NAME USN
PAVITRA D 4SM21CS070
SRUSHTI M 4SM21CS102
YASHVANTH K 4SM21CS125

Mini-Project Guide Mini-Project Coordinator


Prof. Vishwas C N B.E, M.Tech., Prof. Pushpalatha M B B.E, M.Tech.,
Asst. Prof., Dept. of CS&E, Asst. Prof., Dept. of CS&E,
SJMIT, CHITRADURGA. SJMIT, CHITRADURGA.

HOD
Dr. Krishnareddy K R
Professor and Head, Dept. of CS&E,
SJMIT, CHITRADURGA.

2023-2024

S.J.M VIDYAPEETHA ®

S.J.M INSTITUTE OF TECHNOLOGY


DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
(Affiliated to Visvesvaraya Technological University, Belagavi, Recognized by
AICTE, New Delhi and Approved by Government of Karnataka)
NAAC Accredited with ‘B++’ Grade
P.B No.73, NH4 Bypass Road, Chitradurga – 577 502
ABSTRACT
Weather forecasting is one of the most scientifically and technologically challenging
problems around the world in the last century. To make an accurate prediction is indeed, one
of the major challenges that meteorologists are facing all over the world. To predict the
conditions of the atmosphere for a given location, Weather Forecasting is used. Weather
forecasting is made by collecting numerous data predicted by very proper understanding of
the collected data. Weather simply refers to the condition of air on the earth at given place
and time. It is a continuous, data-intensive, multidimensional, dynamic and chaotic process.
These processes make weather forecasting a formidable challenge. Forecasting is the process
of estimation in unknown situations from the historical data.

i
CONTENTS
CHAPTER NO CHAPTER NAME PAGE NO

1 INTRODUCTION 1

1.1 OBJECTIVES 1

1.2 PROBLEM STATEMENT/ PROBLEM DEFINITION 2

1.3 EXSITING SYSTEM 2

1.4 PROPOSED SYSTEM 3

2 SOFTWARE AND HARDWARE REQUIREMENT 4

3 METHODOLOGY 5

REFERENCES 7
CHAPTER 1

INTRODUCTION
1.1
OBJECTIVE
Weather prediction is the application of technology to predict the action of the
atmosphere for a given location. It is becoming increasingly vital for business,
agriculturists, farmers, disaster management and relatedorganizations to understand the
natural phenomena. The art of weather prediction began with using the reoccurring
astronomical and meteorological events to help them to monitor the seasonal changes
in the weather. Throughout these centuries, this attempt is made to produce forecasts
based on weather changes and personal observations. Weather prediction has been one
of the most interesting domains.

Weather forecasts are issued to protect life and property, save life and tell us what
changes to except in the atmosphere. They provide vital information to a wide range of
categories: agriculture, aviation, commerce, marine, advisories, etc. Forecasting can
also significantly influence decision and policymaking, construction planning,
productivity and environmental risk management. People can also know and be aware
of atmospheric changes through variables such as temperature, wind speed and
direction, cloudiness and precipitation.

Features Weather Forecast Project In Python Django:


 Time to time update weather

 Temperature Update

 Last 7 days data Predict

 change weather in every hours as according to weather changes

 provide accurate data information about weather.

 user can search weather anytime and anywhere.

 any places data can be search and provide information as according to weather.

 help user to travel.

 help User to future plans for holidays.


1.1 PROBLEM DEFINITION
In today's world, accurate and timely weather information is crucial for planning and
decision-making in various aspects of daily life and professional activities. However, many
existing weather forecasting platforms either lack user-friendly interfaces or fail to provide
localized and real-time updates. This project aims to develop a robust and intuitive weather
forecasting application using the Django framework in Python. The primary goal is to create
a platform that delivers precise and up-to-date weather forecasts tailored to users' specific
locations.

The application will integrate with reliable weather APIs to fetch real-time data and
present it through a clean, responsive interface accessible via web browsers and mobile
devices. Additionally, the project will incorporate features such as weather alerts, historical
weather data analysis, and user-customizable settings to enhance the overall user experience.
By addressing these needs, the project seeks to provide an indispensable tool for individuals
and organizations to better prepare for and respond to weather conditions, ultimately
promoting safety, efficiency, and convenience in their daily activities.

1.2 EXISTING SYSTEM


When people looks to their phones, computer, or TVs for Weather Forecasts, They
Want the forecasts to be accurate and timely. It’s the job of the weather scientists, armed
with computer models and array of weather-observing instruments, to make accurate
prediction.

In following ways current Weather Forecasting System is –

 Current forecast system is for both large-scale weather pattern.


 Also for smaller-scale features like precipitation at surface.
 Numerical weather prediction (NWP) uses mathematical models of the ocean.
 Current system relayed from radiosondes, weather satellites
1.3 PROPOSED SYSTEM

This project is to produce an interactive web application that could be used to display
live and future forecasting information on the weather. Incorporated into the application were
webcams located at the user’s specified location, so giving visual data of the actual area.
Initial background reading focused on which mapping system to use, in combination with a
particular weather data source. After looking at several options, the Django framework was
used with The Weather Channel’s API, mainly due to Django’s rapid setup and because of the
availability of the Weather Channel in not just the UK but worldwide.

After researching methodologies, the decision made was to follow an adapted version
of the Agile Unified Process. The adaptation was based on the project being managed and
run by one person, so therefore slightly simplifying the steps. User involvement was
important at the testing and evaluation stages as the project is fundamentally aimed at end-
users, so ensuring that other people not involved in the project were given a chance to test the
system’s robustness, whilst giving a chance for feedback for fixes or changes. Usability was
a big issue in the project’s design and implementation and as such several factors were taken
into account such as ensuring the application is compliant and will run well on older or more
restricted browsers.
CHAPTER 2
LITERATURE SURVEY
[1] WEATHER FORECASTING APPLICATION USING PYTHON

Weather forecasting is the application of science and technology to predict the state of
the atmosphere for a given location. Ancient weather forecasting methods usually relied
on observed patterns of events, also termed pattern recognition. For example, it might be
observed that if the sunset was particularly red, the following day often brought fair
weather. However, not all of these predictions prove reliable. Here this system will
predict weather based on parameters such as temperature, humidity and wind. User will
enter current temperature; humidity and wind, System will take this parameter and will
predict weather (rainfall in inches) from previous data in database (dataset). The role of
the admin is to add previous weather data in database, so that system will calculate
weather (estimated rainfall in inches) based on these data. Weather forecasting system
takes parameters such as temperature, humidity, and wind and will forecast weather
based on previous record therefore this prediction will prove reliable. This system can
be used in Air Traffic, Marine, Agriculture, Forestry, Military, and Navy etc.

[2] UNO: A Web Application using Django

This project revolves around the usage of a web page and its functionalities. Web has
been one of the greatest gifts to mankind and we intend to use its fruitful part too. This
project inculcates the usage of Python, HTML, Django and Bootstrap. It is designed to
facilitate multiple domains of knowledge from a single place as it is often seen that
information is highly specific and found only at their respective domain holders. With
this project we sought to bridge the gap between different kinds of beneficiaries of
knowledge. This platform will facilitate all sort of knowledge from all sort of domains
like Travel, Information Sciences, Tech Advancements, Politics to name a few. The
availability of platforms like Django, Bootstrap has not only made the process really
timesaving but also hassle free.

[3] Django: Developing web using Python

Every sector including education, medical, business, agriculture focuses on the


digitalization that results the use of web development. There is the use of various
technologies for the web development. Django and flask are the popular python based
framework that redefine the meaning of web development. Due to the rapid
development feature, it now demanding in the market. It repeals the demand of other
web framework. It is in the demand for the people who want to understand how to
develop an elegant website with minimal fuss. Django and flask helps to reduce the
repetition of task to make web development code less complex. In this paper the Django
and flask web framework with its working at frontend and backend is designed for the
development of shorten the URL is discussed.
CHAPTER 3
SOFTWARE AND HARDWARE REQUIREMENT
3.1 SOFTWARE REQUIREMENT
Software requirements deals with defining resource requirements and prerequisites
that needs to be installed on a computer to provide functioning of an application.
The minimal software requirements are as follows,

 Python
 Visual Studio Code
 Windows

Front-End part
 HTML
 CSS
 Bootstrap
 Java Script

Back-end part
 Django
 SQLite 3

3.2 HARDWARE REQUIREMENT


The most common set of requirements defined by any operating system or software
application is the physical computer resources, also known as hardware. The
minimum hardware requirements are as follows,

 Hard disk: 40 GB and Above


 RAM: 512 MB and Above
 Processor: Intel I3 and Above
CHAPTER 4
SYSTEM DESIGN

4.1 SYSTEM ARCHITECTURE

Fig 4.1 Architecture Diagram

Fig 4.1 Architecture diagram

The architecture diagram Fig 4.1 explains the entire flow of the proposed
system. Normally, every state has a weather department (e.g.) Tamil Nadu, Andhra
Pradesh etc. In that weather department they have an antenna called automatic weather
station, with the help of that antenna we can predict the climate whether the rain has
come or not. So, this is weather data gathering tool. In this place gathering information
are stored in the processed weather data storage. Our web application gets weather
information in that data storage.

The processed weather data will go to user authentic for forecast which means
user have a subscription based plans like SMS or E-mail they have means,
automatically they get weather information through web browsing not even to type
places. Other than that, initially the user will be requested to enter the location for
which he wishes to know the weather forecasting. After the user enters the location, it
will go to web service system. Web service split the information comes from the data
storage, the server configuration identifiers the location using geographical locator to
get accurate data what actually end user wants. Once the location has been identified,
the corresponding weather forecasted will be presented within fraction of seconds to
the end user.

4.2 DATA FLOW

Fig 4.2 Data flow diagram


When the end user request the weather forecasting information from the web
application and it will directly go the API call. API call is the process of a user
application submitting a request to an API and that API retrieving the requested data
from the external server or program and delivering it back to the client. After API call it
will go to the cloud database in which all the weather data information are saved in a
database. From database it will go into JSON data. JSON data is an open standard file
format and data interchange format that uses human-readable text to store and transmit
data objects consisting of attribute value pairs and arrays.

CHAPTER 5
IMPLEMENTATION
5.1 ALGORITHMS
Creating a full-stack weather prediction application using Django (backend) and a frontend
framework like React involves several steps. Here's a complete guide to achieve this:

1. Set Up Django (Backend)


 Create Django Project and App:
django-admin startproject weather_predictor
cd weather_predictor
python manage.py startapp prediction

 Add App to `settings.py`:


INSTALLED_APPS = ['prediction', 'corsheaders']

 Create Prediction View in `views.py`:


import pickle
from django.http import JsonResponse
model = pickle.load(open('weather_model.pkl', 'rb'))
def predict_weather(request):
# Get parameters and predict
return JsonResponse({'prediction': prediction[0]})

 Set Up URLs in `urls.py`:


urlpatterns = [path('predict/', predict_weather)]

2. Set Up React (Frontend)


 Create React App:
npx create-react-app weather-frontend
cd weather-frontend
npm install axios
 Build Simple Form in `App.js`:
const handleSubmit = async (event) => {
const response = await axios.get('http://localhost:8000/predict/', { params });
setPrediction(response.data.prediction);
};

3. Allow CORS in Django:


Add `django-cors-headers` to handle cross-origin requests.

4. Run Servers:
python manage.py runserver
CHAPTER 6

SOFTWARE TESTING

Software testing is a critical process in the software development lifecycle that ensures
the quality, functionality, and reliability of software applications. It involves the systematic
evaluation of software components and systems to identify defects, ensure compliance with
requirements, and verify that the software performs as expected. The primary goals of software
testing are to detect and fix bugs, ensure that the software meets user needs, and maintain high
standards of performance and security.

There are various types of software testing, each serving a specific purpose. Functional
testing focuses on verifying that the software performs the required tasks correctly, covering
unit testing (testing individual components), integration testing (ensuring that combined
components work together), system testing (testing the complete system), and user acceptance
testing (UAT, ensuring the software meets user needs). Non-functional testing evaluates the
software's performance, security, usability, and compatibility, ensuring it performs well under
different conditions and is user-friendly and secure. This includes load testing, stress testing,
security testing, and usability testing.

Maintenance testing ensures that updates or changes to the software do not introduce
new defects or degrade existing functionality. This includes regression testing, smoke testing,
and sanity testing. Other specialized testing methods, such as alpha and beta testing,
exploratory testing, ad-hoc testing, white box testing, black box testing, gray box testing, and
A/B testing, provide additional layers of validation and quality assurance.

6.1 TESTING METHODS

6.1.1 BLACK-BOX TESTING


Black box testing in the context of a weather forecast application built with Python
Django focuses on verifying that the application functions correctly according to specified
requirements without knowing the internal workings of the code. Here’s how you might
approach it:

Steps for Black Box Testing

1. Identify Test Scenarios


Based on the requirements and specifications, identify the scenarios to be tested. Examples
might include:

 Valid inputs returning correct predictions.

 Handling of invalid or out-of-range inputs.

 Ensuring that required inputs are not left blank.

2. Create Test Cases


Design test cases that cover these scenarios using techniques like equivalence partitioning and
boundary value analysis.

3. Implement Test Cases in Django

Using Django’s test framework, you can implement the black box test cases.

4. Run the Tests

Run the tests using Django’s test runner.

python manage.py test

5. Interpretation of Results
 Pass: If all test cases pass, it indicates that the application handles inputs and produces
outputs as expected.

 Fail:If any test case fails, it points to an issue in handling inputs or producing the correct
outputs, necessitating further investigation and fixing.

6.1.2 WHITE-BOX TESTING


White box testing, also known as structural testing or glass box testing, focuses on
testing the internal structure and logic of the software application. In the context of a
weather forecast application built with Python Django, white box testing involves
examining the code to ensure it functions correctly at a detailed level, taking into account
control flows, decision branches, and internal logic. Here’s how you might approach white
box testing for such an application:
Steps for White Box Testing

1. Understand the Code Structure


Review and understand the implementation details of the weather prediction logic, including:

 How inputs are processed.

 Which algorithms or models are used for predictions.

 Any error handling mechanisms in place.

2. Design Test Cases Based on Code Structure


Create test cases that target specific parts of the codebase to ensure:

 Coverage of Code Paths: Test all decision points, loops, and conditional statements.

 Edge Cases: Test extreme values and unexpected inputs to ensure robustness.

 Integration Testing: Verify interactions between different components (e.g., model


integration with Django views).

3. Implement White Box Tests


Using Django's testing framework and possibly additional tools for code coverage, implement
white box tests that directly access and validate the internal logic of the application.

4. Run and Analyze Tests


Execute the white box tests using Django's test runner (`python manage.py test`). Analyze the
results to ensure that:

 All code paths are covered.

 Expected outcomes match actual outcomes.

 Edge cases and error conditions are handled appropriately.

6.2 LEVELS OF TESTING

6.2.1 UNIT TESTING


Unit testing in the context of a weather forecast application in Python Django involves
testing individual components or units of code to ensure they perform as expected. For
instance, in a Django application, unit tests would focus on testing specific functions, methods,
or classes responsible for weather prediction logic, input validation, or API endpoints.

Example Scenarios for Unit Testing:

1.Weather Prediction Function:


 Scenario: Test the function that predicts weather based on temperature, humidity, and
pressure inputs.

 Expected Outcome: Verify that the function returns the correct weather condition
('Sunny', 'Rainy', 'Cloudy') based on different input combinations.

2. Input Validation:
 Scenario: Test the validation function that checks if input parameters (temperature,
humidity, pressure) fall within valid ranges.

 Expected Outcome: Ensure that the function correctly identifies and handles invalid
inputs, such as negative temperatures or out-of-range humidity.

3.API Endpoint Testing:


 Scenario: Test the Django view or API endpoint (`/predict/`) that receives weather
prediction requests.

 Expected Outcome: Validate that the endpoint correctly processes input data, interacts
with the weather prediction function, and returns expected HTTP responses.

6.2.2 INTEGRATED TESTING


Integrated testing in the context of a weather forecast application built with
PythonDjango focuses on verifying interactions between various components of the
system. This type of testing ensures that different modules, services, or components
work together seamlessly to achieve the desired functionality of predicting weather
based on input parameters like temperature, humidity, and pressure.

Key Aspects of Integrated Testing:

1.Testing Interactions
 Scenario: Test how the Django views or API endpoints (`/predict/`) interact with the
weather prediction logic and data models.

 Expected Outcome: Validate that inputs are correctly passed from the frontend to the
backend, processed by the prediction logic, and returned accurate weather predictions.

2. Component Integration:
 Scenario Test integration between the weather prediction algorithm/model and the
Django application.

 Expected Outcome: Ensure that data flows correctly between components, and that
predictions are generated accurately based on integrated data and logic.

3. External Service Integration:


 Scenario: Test integration with external services (e.g., weather APIs for current
data).

 Expected Outcome: Verify that the application fetches and utilizes external data
effectively in generating predictions.

6.2.3 SYSTEM TESTING


System testing in the context of a weather forecast application developed with
Python Django involves testing the complete integrated system to ensure it meets the
specified requirements and functions as expected from end-to-end. This type of testing
evaluates the application as a whole, focusing on its behavior and performance in real-
world scenarios.

Key Aspects of System Testing:

1. End-to-End Testing:

 Scenario: Test the entire workflow of the weather forecast application, from user input
through the Django frontend to weather prediction and output.
 Expected Outcome: Validate that the application correctly handles inputs, processes
them using the prediction logic, and delivers accurate weather forecasts to users.

2. User Scenarios:

 Scenario: Simulate various user scenarios and interactions with the application,
including different input combinations and expected outcomes.
 Expected Outcome: Ensure that the application meets user expectations in terms of
usability, responsiveness, and accuracy of predictions.

CHAPTER 7

RESULTS AND SNAPSHOTS

Fig 7.1: Home page


Fig 7.2: Rainy Weather

Fig 7.3 : Scattered(Thunderstorm) Weather


Fig 7.4 : Weather showing Intense rain

CHAPTER 8

ADVANTAGES AND APPLICATIONS

1. Improved Planning:

 Advantage: Allows individuals, businesses, and governments to plan activities based on


weather predictions.
 Application: Farmers can schedule planting and harvesting, event organizers can plan
outdoor activities, and airlines can optimize flight schedules.

2. Disaster Preparedness:

 Advantage: Provides early warnings for severe weather events such as hurricanes,
storms, and floods, helping to mitigate risks and save lives.
 Application: Authorities can evacuate areas, prepare emergency services, and inform
the public to take necessary precautions.

3. Economic Benefits:
 Advantage: Helps various industries, including agriculture, tourism, and transportation,
to optimize operations and reduce losses due to adverse weather conditions.
 Application: Retailers can manage inventory based on seasonal weather trends, and
energy companies can adjust production based on demand forecasts.

4. Enhanced Safety:

 Advantage: Improves safety for individuals and communities by providing accurate


weather information.
 Application: Fishermen and mariners can avoid dangerous sea conditions, and hikers
can plan trips to avoid extreme weather.

5. Environmental Protection:

 Advantage: Assists in monitoring and predicting environmental changes, aiding in


conservation efforts.
 Application: Predicting droughts and floods can help in managing water resources and
protecting wildlife habitats.

CHAPTER 9

CONCLUSION AND FUTURE ENHANCEMENT

Developing a weather forecast application using Python Django presents numerous advantages,
including rapid development, scalability, and robust security features. Django’s comprehensive
ecosystem, built-in functionalities, and modular architecture make it an ideal framework for
building reliable and user-friendly weather forecasting solutions. The application of such a
system spans across various industries, providing critical insights and aiding in planning,
disaster preparedness, and economic optimization. Looking forward, future enhancements can
leverage advancements in machine learning and artificial intelligence to improve prediction
accuracy and efficiency. Integration with IoT devices for real-time data collection, deployment
of more sophisticated data visualization techniques, and incorporation of user personalization
features can further enhance the user experience. Additionally, expanding the application to
support global scale and integrating with more external data sources can make the weather
forecast system more robust and comprehensive, ultimately providing more value to its users.
REFERENCES

[1] https://www.researchgate.net/publication/
360620450_WEATHER_FORECASTING_APPLICATION_USING_PYTHONS. Raksha,
J. S. Graceline, J. Anbarasi, M. Prasanna and S. Kamaleshkumar, "Weather Forecasting
Framework for Time Series Data using Intelligent Learning Models," 2021 5th International
Conference on Electrical, Electronics, Communication, Computer Technologies and
Optimization Techniques (ICEECCOT), Mysuru, India, 2021, pp. 783-787, doi:
10.1109/ICEECCOT52851.2021.9707971.

[2]I. A. Bairagi, A. Sharma, B. K. Rana and A. Singh, "UNO: A Web Application using Django,"
2021 3rd International Conference on Advances in Computing, Communication Control and
Networking (ICAC3N), Greater Noida, India, 2021, pp. 1371-1374, doi:
10.1109/ICAC3N53548.2021.9725577.keywords:
{Blogs;Webpages;History;django;webpage;blog;python;bootstrap},

[3]P. Thakur and P. Jadon, "Django: Developing web using Python," 2023 3rd International
Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE),
Greater Noida, India, 2023, pp. 303-306, doi: 10.1109/ICACITE57410.2023.10183246.
keywords:
{Uniformresourcelocators;COVID19;Codes;Scientificcomputing;Pandemics;Education;Comp
anies;Django;Python;Model;View;Web Development},

You might also like