PROJECT
PROJECT
BACHELOR OF TECHNOLOGY
IN
SUBMITTED BY
23881A6787 D.ANJALI
23881A6788 G.ROHITH KUMAR
JUNE-2024
VARDHAMAN COLLEGE OF ENGINEERING
(AUTONOMOUS)
Affiliated to JNTUH, Approved by AICTE, Accredited by NAAC with A++ Grade,
UGC “College with Potential for Excellence” and ISO 9001:2015 Certified
2 Objectives
3 Problem Statement
4 Algorithm
5 Flow Chart
6 Source Code
7 Input
8 Output
9 Conclusion
10 Future Scope
11 References
2 Objectives 02-03
3 Problem Statement 02
4 Algorithm 04
5 Flow Chart 05
6 Source Code 06
7 Input 07
8 Output 07
9 Conclusion 07
11 References 10
1. ABSTRACT
Models are initialized using this observed data. The irregularly spaced
observations are processed by data assimilation and objective analysis
methods, which perform quality control and obtain values at locations usable
by the model's mathematical algorithms (usually an evenly spaced grid). The
data are then used in the model as the starting point for a forecast.[48]
Commonly, the set of equations used to predict the physics and dynamics of
the atmosphere are called primitive equations. These equations are
1
initialized from the analysis data and rates of change are determined. The
rates of change predict the state of the atmosphere a short time into the
future. The equations are then applied to this new atmospheric state to find
new rates of change, and these new rates of change predict the atmosphere
at a yet further time into the future. This time stepping procedure is
continually repeated until the solution reaches the desired forecast time.
2. PROBLEM STATEMENT
3. OBJECTIVES
Develop a Python application that fetches real-time weather data from a
reliable weather API and delivers desktop notifications to the user. The
application should run in the background and periodically update the user
with the latest weather information for a specified location.
2
Objectice-1:To develop a Python based solution to get weather desktop
notification.
3
4. ALGORITHM
1.Extract data form given URL.
2.Scrape the data with the help of requests and Beautiful Soup.
4
5. FLOW CHART
5
6. SOURCE CODE
import requests
from plyer import notification
import time
# Configuration
API_KEY = 'your_openweathermap_api_key' # Replace with your OpenWeatherMap API
key
CITY = 'your_city' # Replace with your city
URL =
f"http://api.openweathermap.org/data/2.5/weather?q={CITY}&appid={API_KEY}&units=me
tric"
def get_weather():
response = requests.get(URL)
if response.status_code == 200:
data = response.json()
weather = data['weather'][0]['description']
temperature = data['main']['temp']
return f"Weather: {weather}\nTemperature: {temperature}°C"
else:
return "Error fetching weather data"
def show_notification(message):
notification.notify(
title='Weather Update',
message=message,
timeout=10
)
def main():
while True:
weather_info = get_weather()
show_notification(weather_info)
time.sleep(3600) # Wait for an hour before the next update
if _name_ == "_main_":
main()
7.
8. # Output: Display the average
print("The average of the three numbers is:", average)
6
7. INPUT
API_KEY = 'your_openweathermap_api_key' # Replace with your OpenWeatherMap API
key
CITY = 'your_city' # Replace with your city
8. OUPUT
Weather Update
Temperature: 25°C
9. CONCLUSION
This project served as an excellent opportunity to apply Python programming
skills in a real-world context. By combining Python's versatility with third-
party libraries, it was possible to create a useful tool for staying updated on
weather conditions directly from the desktop. Further enhancements could
include adding support for multiple cities, customizing notification styles, and
integrating with additional weather APIs for expanded coverage.
7
Create a user-friendly GUI using libraries like tkinter, PyQt, or Kivy to allow
users to enter their city and API key directly into the application.
Multiple Cities:
Allow users to enter and monitor weather for multiple cities, displaying
notifications for each one.
Advanced Notifications:
Add alerts for severe weather conditions like storms, heavy rain, or extreme
temperatures.
User Preferences:
Sync with smart home devices to adjust settings based on weather conditions
(e.g., thermostat adjustments).
Voice Assistance:
Mobile App:
Improve error handling to manage network issues, API errors, and invalid city
inputs.
9
Add logging to keep track of weather data requests and responses for
debugging and analytics.
11.REFERENCES
References: https://www.geeksforgeeks.org/get-live-weather-desktop-notifications-using-python/
https://www.studocu.com/in/document/chandigarh-university/master-of-computer-applications/synopsis-
live-desktop-notification/55132586
10