0% found this document useful (0 votes)
133 views19 pages

Mini Project Report

Uploaded by

jcsss0827
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)
133 views19 pages

Mini Project Report

Uploaded by

jcsss0827
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/ 19

INDUSTRIAL TRAINING REPORT

Uttaranchal Institute of Technology/ CSE-III,


Python Programming

Submitted in partial fulfillment of


the Requirements for the award of

Degree of Bachelor of Technology in Computer Science &


Engineering

Submitted By – Jayant Chaudhary


University Roll No – 2301010868
Class Roll No – 58
Semester/Branch – 3rd/B Tech CSE

SUBMITTED TO:
Department of Computer Science & Engineering

UIT, UTTARANCHAL UNIVERSITY


Dehradun (Uttarakhand), 248001.
CERTIFICATE
DECLARATION

I Jayant Chaudhary, student of Btech CSE-III , hereby declare that the


project work entitled “Weather Forecast Application” submitted to
Uttaranchal Institute Of Technology, is an original piece of work carried out by
me under the guidance of instructor YBI foundations. This work has been
submitted to any other institution or university for any degree, diploma, or
other titles, All the work has not been submitted to any project is my own ,
except where due reference and acknowledgement have been made in the
text. I have provided appropriate
References for all the material used, and this project is solely the result of my
efforts and learning during the academic period. I understand the implication
of plagiarism and I declare that no part of this project has been copied from
any other source without proper citation.

Signature : Jayant Chaudhary

Uttaranchal University(UIT)

Uttaranchal Institute Of Technology/ B.Tech CSE-III

Examined By: Mr. Vineet Kumar Saini and Mr. Gaurav Kumar

(signature)

Name of Faculty
facilitator
ACKNOWLEDGEMENT

First and foremost, I wish to express my sincere thanks and gratitude to


my esteemed Mentor ‘Ms Stuti Bhatt’ who has contributed so much for successful
completion of my Industrial of my Industrial Training by his thoughtful reviews
and valuables guidance.

Next I would like to tender my sincere thanks to “Dr. Madhu Kirola”


(Head of Computer Science and Engineering Department ) for his
co-operation and encouragement.

(signature of student)
Name- Jayant Chaudhary
University roll no - 2301010868

Table of Contents
1. Introduction
2. Objective
3. Key features of the application
4. Technical Implementation
=>4.1. Code Structure
=>4.2. Libraries used
=>4.3. Application flow
5. User Interface of the application
6. Future Enhancement
7. Conclusion
8. References
Introduction
This mini project showcase the development of a
weather forecast application with the help of
Python’s libraries and the open source API’s
available on the Internet . The app provides users
with real-time weather information and also time
for the city they’ve searched.
This report presents the development and
implementation of a mini project on a Weather
Forecast Application. The primary objective of
this project is to create a user-friendly
application that provides real-time weather
updates and forecasts. The application leverages
various data sources and employs advanced
algorithms to ensure the reliability and accuracy
of the weather predictions.
Objective
The primary objective of the Weather Forecast Application is to provide
accurate, real-time weather information and forecasts to users in an accessible
and user-friendly manner. This application aims to:

1. Enhance Decision Making: Provide timely and reliable weather


updates to assist users in planning their daily activities, travel, and other
outdoor events.
2. Increase Preparedness: Offer severe weather alerts and notifications to
help users prepare for and respond to adverse weather conditions,
thereby enhancing safety and reducing potential damage.
3. Improve User Experience: Create an intuitive and engaging user
interface that makes it easy for users to access detailed weather
parameters such as temperature, humidity, wind speed, and
precipitation.
4. Promote Environmental Awareness: Educate users about weather
patterns and climate conditions, fostering a greater understanding and
awareness of environmental changes and their impact.

By achieving these objectives, the Weather Forecast Application aims to


become an essential tool for users, providing them with the information they
need to make informed decisions and stay safe in varying weather conditions.

1. Key Feature of the Project


1. Beautiful Interface : This application offers a beautiful interface to
the user.
2. Real time updates: The application gives the real time weather
updates.
3. Detailed forecast : The application provides not only temperature but
also the pressure and the humidity in the searched city.

4. Search for specific city: It will search and tell the weather of a
specific city entred by the user.
Technical implementation

(i) Code structure :

from tkinter import *


import tkinter as tk
from geopy.geocoders import Nominatim
from tkinter import ttk,messagebox
from timezonefinder import TimezoneFinder
from datetime import datetime

import requests
import pytz

root = Tk()
root.title("Weather App")
root.geometry("900x500+300+200")
root.resizable(False,False)

def getWeather():
try:
city = textfield.get()

geolocator = Nominatim(user_agent = "geoapiExercises")


location = geolocator.geocode(city)
obj = TimezoneFinder()
result = obj.timezone_at(lng = location.longitude,
lat=location.latitude)

home = pytz.timezone(result)
local_time = datetime.now(home)
current_time = local_time.strftime("%I:%M %p")
clock.config(text = current_time)
name.config(text="CURRENT WEATHER")

#weather
api = "https://api.openweathermap.org/data/2.5/weather?
q="+city+"&appid=c20e369165ad4bcbbd27bfd5d11ce30e"

json_data = requests.get(api).json()
condition = json_data['weather'][0]['main']
description = json_data['weather'][0]['description']
temp = int(json_data['main']['temp']-273.15)
pressure = json_data['main']['pressure']
humidity = json_data['main']['humidity']
wind = json_data['wind']['speed']

t.config(text=(temp,"°"))
c.config(text=(condition,"|","FEELS","LIKE",temp,"°"))

w.config(text=wind)
h.config(text=humidity)
d.config(text=description)
p.config(text=pressure)

except Exception as e:
messagebox.showerror("Weahter App","Invalid Entry!")

#search box
Search_image = PhotoImage(file = "Search.png")
myimage = Label(image=Search_image)
myimage.place(x=20,y=20)

textfield =
tk.Entry(root,justify="center",width=17,font=("poppins",25,"bold"),bg
="#404040",border=0,fg="white")
textfield.place(x=50,y=40)
textfield.focus()

Search_icon = PhotoImage(file="Search_box.png")
myimage_icon = Button(image=
Search_icon,borderwidth=0,cursor="hand2",bg="#404040",command=getWeat
her)
myimage_icon.place(x=400,y=34)

#logo
Logo_image = PhotoImage(file="Logo.png")
logo = Label(image=Logo_image)
logo.place(x=150,y=100)

#bottom box
Frame_image = PhotoImage(file="box.png")
frame_myimage=Label(image=Frame_image)
frame_myimage.pack(padx=5,pady=5,side=BOTTOM)

#time
name = Label(root,font=("arial",15,"bold"))
name.place(x=30,y=100)
clock = Label(root,font=("Helvetica",20))
clock.place(x=30,y=130)

#label
label1
=Label(root,text="WIND",font=("Helvetica",15,'bold'),fg="white",bg="#
1ab5ef")
label1.place(x=120,y=400)

label2
=Label(root,text="HUMIDITY",font=("Helvetica",15,'bold'),fg="white",b
g="#1ab5ef")
label2.place(x=250,y=400)

label3
=Label(root,text="DESCRIPTION",font=("Helvetica",15,'bold'),fg="white
",bg="#1ab5ef")
label3.place(x=430,y=400)

label4
=Label(root,text="PRESSURE",font=("Helvetica",15,'bold'),fg="white",b
g="#1ab5ef")
label4.place(x=650,y=400)

t = Label(font=("arial",70,'bold'))
t.place(x=400,y=150)
c= Label(font=("arial",15,'bold'))
c.place(x=400,y=250)

w = Label(text="....",font=("arial",20,"bold"),bg="#1ab5ef")
w.place(x=120,y=430)
h = Label(text="....",font=("arial",20,"bold"),bg="#1ab5ef")
h.place(x=280,y=430)
d = Label(text="....",font=("arial",20,"bold"),bg="#1ab5ef")
d.place(x=450,y=430)
p = Label(text="....",font=("arial",20,"bold"),bg="#1ab5ef")
p.place(x=670,y=430)

root.mainloop()
(ii) Libraries used :
• Tkinter library is used for the GUI(Graphical user interface) which we
also call the frontend in web development.
• Geopy Library is used to retrieve the coordinates of the city which will
going to be search in the Application.
• Requests library is used to get the data from the API in real time.
• Open weather API is used to provide the real time data.

(iii) Application flow :


+-------------------+
| User Input |
+-------------------+
|
v
+-------------------+
| Request to |
|functions |
+-------------------+
|
v
+-------------------+
| Request to API |
+-------------------+
|
v
+-------------------+
| Get Data |
+-------------------+
|
v
+-------------------+
| Diplay if get the data |
+-------------------+
|
v
+-------------------+
| Display Invalid entry|
|If don’t get the data |
+-------------------+
User Interface of the application
Future Enhancement
To further improve the functionality and user experience of the Weather
Forecast Application, several potential enhancements can be considered:

1. AI-Driven Predictions: Integrate machine learning algorithms to


analyze historical weather data and provide more accurate and localized
weather predictions.
2. Personalized Weather Alerts: Allow users to set preferences for
receiving specific weather alerts based on their location and activities,
such as outdoor events, commutes, or travel plans.
3. Interactive Weather Maps: Include interactive weather maps that
allow users to explore weather patterns across different regions and
timelines.
4. Integration with Wearable Devices: Enable compatibility with
wearable devices like smartwatches, providing users with real-time
weather updates and alerts on the go.
5. Environmental Insights: Provide users with information on air quality,
pollen levels, and UV index, helping them make informed health and
safety decisions.
6. Voice Assistant Integration: Incorporate voice command features,
allowing users to ask for weather updates and forecasts through voice
assistants like Alexa, Google Assistant, and Siri.
7. User Feedback and Crowdsourcing: Implement a feature that allows
users to report weather conditions in their area, contributing to more
accurate real-time data and fostering a community of weather
enthusiasts.
8. Energy Consumption Insights: Offer insights on how upcoming
weather conditions might impact home energy consumption, providing
tips on optimizing energy use.
9. Multilingual Support: Expand language support to cater to a broader
audience, making the application accessible to non-English speaking
users.
10.Augmented Reality (AR) Features: Develop AR capabilities that
provide visual representations of weather conditions, enhancing user
engagement and understanding of weather phenomena.

By incorporating these enhancements, the Weather Forecast Application can


become an even more robust and versatile tool, offering users a
comprehensive and personalized weather forecasting experience.
Conclusion

In this mini project, we have successfully developed a Weather Forecast


Application that provides users with real-time weather updates and accurate
forecasts. Through a detailed design and implementation process, we have
demonstrated the practical application of various concepts in programming,
data analysis, and user interface design.

The Weather Forecast Application is more than just a tool for predicting the
weather; it is a means to enhance decision-making, increase preparedness, and
promote environmental awareness. By offering timely and reliable weather
information, the application helps users stay informed and make better choices
in their daily lives.

Looking ahead, there are numerous opportunities for future enhancements that
can further improve the functionality and user experience of the application.
Integrating advanced technologies such as AI-driven predictions, interactive
weather maps, and voice assistant capabilities can make the application even
more robust and user-friendly.

Overall, this project has not only provided valuable insights into the field of
weather forecasting but also highlighted the importance of innovative
solutions in addressing everyday challenges. We hope that the Weather
Forecast Application will continue to evolve and serve as a useful tool for
users in the years to come.

You might also like