L4 Weather Frorecast Project
L4 Weather Frorecast Project
Report on
WEATHER REPORTING SYSTEM
BACHELOR OF TECHNOLOGY
In
DEPARTMENT OF ELECTRONICS AND COMMUNICATION OF ENGINEERING
By
G.LOVELY KUMARI -22K81A04L4
Under the esteemed guidance of
Mrs.R SreeLakshmi
ASSISTANT PROFESSOR
DEPARTMENT OF CSE
College Code: K8
CERTIFICATE
This is certify that the PYTHON PROGRAMMING PROJECT
entitled “WEATHER REPORTING SYSTEM” is a bonafide record
of independent work done by G.LOVELY KUMARI(22K81A04L4)
under my supervision and guidance, submitted to St. MARTIN’S
ENGINEERING COLLEGE, Hyderabad, in partial fulfilment for
the award of the Degree of Bachelor of Technology in Computer
Science and Engineering.
…………………………….. …………………………………
Principal
(Dr. P.SANTOSH KUMAR PATRA)
……………………………………………..
ABSTRACT
The Weather Forecast Project Python is a console-based application written in the Python programming
language. The project is open source, and it was made for novices who wish to learn Python. This
Weather Forecast Python, With Source Code can run in console mode, which means that you have to enter
it manually. People can make smart choices about when and where to go on vacation – People’s work
schedules are so full that they rarely have time to rest or even spend time with each other. Most of the
time, workaholics like this use their vacation time to go on a relaxing trip The weather forecast helps keep
people safe – When it rains a lot, rivers and other bodies of water flood, sending water into people’s
homes, gardens, and even public spaces. This affects a lot of people. If flooding comes out of nowhere, it
can kill a lot of people ,Weather forecasting is important in the transportation sector – There have been
reports of ships turning over and planes crashing in different parts of the world. Most of the time, bad
weather is the main cause of these kinds of accidents .Benefits of Agriculture – In the past, farmers lost a
lot of money because of changes in the weather. Now, farmers use new technology to plan their
schedules. Farmers can plan what to plan and what to plan next.
CONTENTS
ABSTRACT i
CHAPTER 1- INTRODUCTION 1
CHAPTER 2-LITERATURE SURVEY 3
CHAPTER 3-SYSTEM ANALYSIS 6
3.1 EXISTING SYSTEM 6
3.2 PROPOSED SYSTEM 6
CHAPTER 4- SYSTEM REQUIREMENT 7
CHAPTER 5- ALGORITHM 8
CHAPTER 6- SYSTEM ARCHITECTURE 9
CHAPTER 7- SYSTEM IMPLEMENTATION 10
CHAPTER 8- SYSTEM TESTING 16
CHAPTER 9- OUTPUT SCREENS 18
CHAPTER 10- CONCLUSION 22
CHAPTER 11- FUTURE ENHANCEMENT 23
CHAPTER 12- REFERENCES 24
1. INTRODUCTION
Weather Forecast Project In Python was developed using Python Programming, this Simple Project
With Source Code created using console based, and this project is good for the beginners or the
students who wants to learn programming specially python programming language. A Weather
Prediction Project In Python is a simple console based application using machine learning which
helps to determine if the current situation of weather is good to play or not. It is done under the
supervised learning in . A Weather Prediction Project In Python is a simple console based application
using machine learning which helps to determine if the current situation of weather is good to play or
not. It is done under the supervised learning in which data are given first to train the system and then
the result for new data will be produce give people and organizations information they can use to
reduce losses caused by weather and improve societal benefits, such as protecting life and property,
1.1 INTRODUCTION ON NUMPY: NumPy is the fundamental package for scientific computing in
Python. It is a Python library that provides a multidimensional array object, various derived objects (such
as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including
mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear
algebra, basic statistical operations, random simulation and much more. Pandas: Pandas is a Python library
used for working with data sets. At the core of the NumPy package, is the array object. This encapsulates
n-dimensional arrays of homogeneous data types, with many operations being performed in compiled code
for performance. There are several important array bojects are present.
1.2 PANDAS: Pandas is a Python library used for working with data sets. At the core of the NumPy
package, is the ndarray object. This encapsulates n-dimensional arrays of homogeneous data types, with
many operations being performed in compiled code for performance. There are several important
differences between NumPy arrays and the standard Python sequences: It has functions for analyzing,
cleaning, exploring, and manipulating data. The name "Pandas" has a reference to both "Panel Data", and
"Python Data Analysis" and was created by Wes McKinney in 2008. Pandas allows us to analyze big data
and make conclusions based on statistical theories. Pandas can clean messy data sets, and make them
readable and relevant. Relevant data is very important in data science.
1.3 MATPLOT: Matplotlib is a low level graph plotting library in python that serves as a visualization
utility. Matplotlib was created by John D. Hunter. Matplotlib is open source and we can use it freely.
Matplotlib is mostly written in python, a few segments are written in C, Objective-C and Java script for
Platform compatibility. he libraries that have been used are the most famous ones for data analysis, plot
and mathematical operations (pandas, matplotlib, numpy). Then there are some of them for advanced data
visualization (like folium) and some of them are specific libraries for ARIMA models (like stats models).
Here is the code for the import
1
1.4 PROPOSED METHODOLOGY: Weather report application is a web based application through
which you will able to get all the reports related to weather forecasting of any locations. Its geographical
locator which will be received through your browser setting and server configuration will automatically
identify the location and able to present its weather details such as Temperature, Direction of Wind,
Humidity etc. To develop software for forecasting the weather involving Wind Speed, Cloud Cover, Rain
2
2. LITERATURE SURVEY
Python is a high-level, interpreted programming language that is widely used in various domains
such as web development, data science, machine learning, and artificial intelligence. Python's
popularity is due to its simplicity, readability, and versatility. Python has a vast standard library
and a large community of developers who contribute to the development of libraries and
frameworks that extend its capabilities. Python is easy to learn and code, which makes it a
popular choice for beginners. Its syntax is clear and concise, making it easy to read and
understand. Python's dynamic nature allows for rapid development and testing, which is why it is
a popular choice for prototyping and building applications. Python is also cross-platform, which
means that it can run on various operating systems such as Windows, macOS, and Linux.
Python's applications are diverse and its popularity is expected to continue to grow in the future
due to its versatility and the large community of developers supporting its development.
2.1 APPLICATIONS:
In game development, Python is used for creating games using libraries such as Pygame and
PyOpenGL.
In desktop applications, Python is used for creating cross-platform applications using libraries
such as PyQt and wxPython.
In automation of repetitive tasks, Python is used for scripting and automation using libraries such
as Selenium and PyAutoGUI.
There are currently two major versions of Python in use: Python 2 and Python 3.
Python 2 was the first version of Python that was widely used, and it is still used today in some legacy
systems. However, it is no longer being actively developed and will no longer receive updates or security
patches after January 1, 2020.
3
Python 3 is the current version of Python and is the version that is recommended for new
projects. Python 3 is not backward-compatible with Python 2, which means that code written in
Python 2 may need to be updated to work with Python 3.
Python 3 has several advantages over Python 2, including improved Unicode support, better
syntax and error handling, and improved performance. The latest version of Python 3 is Python
3.9.6, which was released on June 28, 2021.
Here are the major versions of Python and their significant developments:
- Python 2.0 (2000): Introduced list comprehensions, a garbage collector, and support for
Unicode.
- Python 2.2 (2001): Introduced the "with" statement for file handling and support for iterators.
- Python 2.3 (2003): Introduced the "enumerate" function, the "set" data type, and support for
generators.
- Python 2.4 (2004): Introduced the "decimal" module and support for function decorators.
- Python 2.5 (2006): Introduced the "with" statement for use with arbitrary context managers and
support for conditional expressions.
- Python 2.6 (2008): Introduced the "collections" module and support for "itertools" module.
- Python 2.7 (2010): Introduced the "print" function and support for dictionary comprehensions.
- Python 3.0 (2008): A major release that introduced significant changes to the language,
including improved Unicode support, a new I/O library, and changes to the print statement.
- Python 3.1 (2009): Introduced support for the "bytearray" data type and a new "memoryview"
object.
- Python 3.2 (2011): Introduced the "os.scandir()" function and support for the "pickle" protocol
3.
- Python 3.3 (2012): Introduced the "yield from" statement and support for the "u'unicode'"
syntax.
4
- Python 3.4 (2014): Introduced the "asyncio" module and support for the "enum" module.
- Python 3.5 (2015): Introduced support for the "async" and "await" keywords and the "typing"
module.
- Python 3.6 (2016): Introduced support for formatted string literals and the "f-strings" syntax.
- Python 3.7 (2018): Introduced support for the "asyncio.run()" function and the "dataclasses"
module.
- Python 3.8 (2019): Introduced support for the "walrus" operator and the "typing.TypedDict"
class.
- Python 3.9 (2020): Introduced support for dictionary union operators and the "zoneinfo"
module.
5
3. SYSTEM ANALYSIS
3.2 PROPOSED SYSTEM AND ADVANTAGES Weather report application is a web based
application through which you will able to get all the reports related to weather forecasting of any
locations. Its geographical locator which will be received through your browser setting and server
configuration will automatically identify the location and able to present its weather details such
as Temperature, Direction of Wind, Humidity etc.To develop software for forecasting the weather
involving Wind Speed,Cloud Cover, Rain or Snow in order to nurture the needs of any person
around the world.
6
4. SYSTEM REQUIREMENT
Operating system:windows
IDE:python 3.11
Windows/mac
Processor:Intel i3
Harddisk: 40 GB
Ram:512 MB
7
5. ALGORITHM
STEP 1: START
button to check
8
6. SYSTEM ARCHITECTURE
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 no teven 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
9
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
10
7. SYSTEM IMPLEMENTATION
6.1 CODE:
math.floor(w_dataset["list"][3]["main"]["temp_min"] -273.0),
11
math.floor(w_dataset["list"][4]["main"]["temp_min"] -273.0),
math.floor(w_dataset["list"][5]["main"]["temp_min"] -273.0),
math.floor(w_dataset["list"][6]["main"]["temp_min"] -273.0),
]
data ={
"labels":labels,
"chartLabel":chartLabel,
"chartdata":chartdata,
}
return Response(data)
def index(request):
return render(request, "home.html")
def result(request):
if request.method == "POST":
city_name = request.POST["city"].lower()
# print(api_key)
url =
f"http://api.openweathermap.org/data/2.5/forecast?q={city_name}&appid={api_key}"
# print(url)
w_dataset = requests.get(url).json()
try:
context = {
"city_name":w_dataset["city"]["name"],
"city_country":w_dataset["city"]["country"],
"wind":w_dataset['list'][0]['wind']['speed'],
"degree":w_dataset['list'][0]['wind']['deg'],
"status":w_dataset['list'][0]['weather'][0]['description'],
"cloud":w_dataset['list'][0]['clouds']['all'],
'date':w_dataset['list'][0]["dt_txt"],
'date1':w_dataset['list'][1]["dt_txt"],
'date2':w_dataset['list'][2]["dt_txt"],
'date3':w_dataset['list'][3]["dt_txt"],
12
'date4':w_dataset['list'][4]["dt_txt"],
'date5':w_dataset['list'][5]["dt_txt"],
'date6':w_dataset['list'][6]["dt_txt"],
"temp": round(w_dataset["list"][0]["main"]["temp"] -273.0),
"temp_min1":math.floor(w_dataset["list"][1]["main"]["temp_min"] -273.0),
"temp_max1": math.ceil(w_dataset["list"][1]["main"]["temp_max"] -273.0),
"temp_min2":math.floor(w_dataset["list"][2]["main"]["temp_min"] -273.0),
"temp_max2": math.ceil(w_dataset["list"][2]["main"]["temp_max"] -273.0),
"temp_min3":math.floor(w_dataset["list"][3]["main"]["temp_min"] -273.0),
"temp_max3": math.ceil(w_dataset["list"][3]["main"]["temp_max"] -273.0),
"temp_min4":math.floor(w_dataset["list"][4]["main"]["temp_min"] -273.0),
"temp_max4": math.ceil(w_dataset["list"][4]["main"]["temp_max"] -273.0),
"temp_min5":math.floor(w_dataset["list"][5]["main"]["temp_min"] -273.0),
"temp_max5": math.ceil(w_dataset["list"][5]["main"]["temp_max"] -273.0),
"temp_min6":math.floor(w_dataset["list"][6]["main"]["temp_min"] -273.0),
"temp_max6": math.ceil(w_dataset["list"][6]["main"]["temp_max"] -273.0),
"pressure":w_dataset["list"][0]["main"]["pressure"],
"humidity":w_dataset["list"][0]["main"]["humidity"],
"sea_level":w_dataset["list"][0]["main"]["sea_level"],
"weather":w_dataset["list"][1]["weather"][0]["main"],
"description":w_dataset["list"][1]["weather"][0]["description"],
"icon":w_dataset["list"][0]["weather"][0]["icon"],
"icon1":w_dataset["list"][1]["weather"][0]["icon"],
"icon2":w_dataset["list"][2]["weather"][0]["icon"],
"icon3":w_dataset["list"][3]["weather"][0]["icon"],
"icon4":w_dataset["list"][4]["weather"][0]["icon"],
icon5":w_dataset["list"][5]["weather"][0]["icon"],
"icon6":w_dataset["list"][6]["weather"][0]["icon"],
}
except:
context = {
"city_name":"Enter City not Found.... Try Again..."
}
return render(request, "results.html", context)
13
else:
return redirect('home')
def resultfour(request):
if request.method == "POST":
city_name = request.POST["city"].lower()
# print(api_key)
url =
f"http://api.openweathermap.org/data/2.5/forecast?q={city_name}&appid={api_key}&cnt
=96"
print(url)
w_dataset = requests.get(url).json()
#print(w_dataset)
# print(w_dataset['list'])
print(len(w_dataset['list']))
try:
context = {
"city_name":w_dataset["city"]["name"],
"city_country":w_dataset["city"]["country"],
"wind":w_dataset['list'][0]['wind']['speed'],
"degree":w_dataset['list'][0]['wind']['deg'],
status":w_dataset['list'][0]['weather'][0]['description'],
"cloud":w_dataset['list'][0]['clouds']['all'],
'date':w_dataset['list'][0]["dt_txt"],
'date1':w_dataset['list'][25]["dt_txt"],
'date2':w_dataset['list'][25]["dt_txt"],
'date3':w_dataset['list'][25]["dt_txt"],
'date4':w_dataset['list'][25]["dt_txt"],
'date5':w_dataset['list'][28]["dt_txt"],
'date6':w_dataset['list'][25]["dt_txt"],
14
"temp_min2":math.floor(w_dataset["list"][2]["main"]["temp_min"] -273.0),
"temp_max2": math.ceil(w_dataset["list"][2]["main"]["temp_max"] -273.0)
temp_min3":math.floor(w_dataset["list"][3]["main"]["temp_min"] -273.0),
"temp_max3": math.ceil(w_dataset["list"][3]["main"]["temp_max"] -273.0),
"temp_min4":math.floor(w_dataset["list"][4]["main"]["temp_min"] -273.0),
"temp_max4": math.ceil(w_dataset["list"][4]["main"]["temp_max"] -273.0),
"temp_min5":math.floor(w_dataset["list"][5]["main"]["temp_min"] -273.0),
"temp_max5": math.ceil(w_dataset["list"][5]["main"]["temp_max"] -273.0),
"temp_min6":math.floor(w_dataset["list"][6]["main"]["temp_min"] -273.0),
"temp_max6": math.ceil(w_dataset["list"][6]["main"]["temp_max"] -273.0),
"pressure":w_dataset["list"][0]["main"]["pressure"],
"humidity":w_dataset["list"][0]["main"]["humidity"],
"sea_level":w_dataset["list"][0]["main"]["sea_level"],
"weather":w_dataset["list"][1]["weather"][0]["main"],
"description":w_dataset["list"][1]["weather"][0]["description"],
"icon":w_dataset["list"][0]["weather"][0]["icon"],
"icon1":w_dataset["list"][1]["weather"][0]["icon"],
"icon2":w_dataset["list"][2]["weather"][0]["icon"],
"icon3":w_dataset["list"][3]["weather"][0]["icon"],
"icon4":w_dataset["list"][4]["weather"][0]["icon"],
"icon5":w_dataset["list"][5]["weather"][0]["icon"],
"icon6":w_dataset["list"][6]["weather"][0]["icon"],
}
except:
context = {
"city_name":"Enter City not Found.... Try Again..."
}
return render(request, "results4.html", context)
except:
context = {
"city_name":"Enter City not Found.... Try Again..."
}
return render(request, "results4.html", context)
15
16
6.2 MODULUES USED:
Graphical representation
17
8. SYSTEM TESTING
RESULT PAGE
18
19
20
9. OUTPUT SCREENS
21
22
23
24
10. CONCLUSION
In the era of the global warming, research in weather measurement, monitoring and forecasting are
become more and more relevant. This research demonstrates the design and implementation of an
affordable mini weather monitoring system that ensures flexibility, portability, scability and user
friendly operations which can provide data of some weather variables including temperature,
humidity and pressure. With the advacement of technology weather forecasting has developed to its
level best, but there is yet to develop, as far as a nature is so unpredictable. Weather forecasts are
increasingly accurate and useful, and their benefits extend widely across the economy. While much
has been accomplished in improving weather forecasts, there remains much room for improvement.
Simultaneously, they are developing new technologies and observational netwoeks that can enchance
forecaster skill and the value of their services to their users.
25
11. FUTURE ENHANCEMENTS
The website we created in this project can be further developed into a mobile application so that it
can give timely weather updates. These updates will be received in the form of notification in the
user’s mobile based on the location they are present in. So the users don’t even have to get into that
particular applicationto know the weather and it saves their valuable time.
26
12. REFERENCES
1. https://www.ielts.org/
2. https://www.cambridgeenglish.org/exams-and-tests/ielts/
3. https://www.ieltsidpindia.com/
4. https://studyabroad.shiksha.com/exams/ielts
5. https://www.ielts.org/about-ielts/what-is-ielts
6. https://ieltsonlinetests.com/listening-test-collection
7. https://ieltsliz.com/ielts-speaking-free-lessons-essential-tips/
8. https://www.ieltsbuddy.com/ielts-writing.html
9. https://www.online-python.com/
10. https://takeielts.britishcouncil.org/take-ielts/prepare/free-ielts-practice-tests/reading
27