Weather App: 21Csc204J Subject - Design & Analysis of Algorithms A Mini Project Report
Weather App: 21Csc204J Subject - Design & Analysis of Algorithms A Mini Project Report
Weather App: 21Csc204J Subject - Design & Analysis of Algorithms A Mini Project Report
Submitted By
BACHELOR OF TECHNOLOGY
in
BONAFIDE CERTIFICATE
SIGNATURE
Associate Professor,
DECLARATION
We hereby declare that the entire work contained in this mini project report titled
Date: PAVITHRA M
LIST OF FIGURES ix
LIST OF ABBREVIATIONS x
INTRODUCTION 1
1 1.1 Overview 1
1.2 Problem Statement 1
1.3 Objective of the Project 2
1.4 Scope of the Project 2
SOFTWARE AND HARDWARE 10
SPECIFICATIONS
2 2.1 Hardware Requirements 10
2.2 Software Requirements 10
PROJECT DESCRIPTION 12
3.1 Introduction 12
3 3.2 Architecture Diagram 13
3.3 Algorithm Used 14
3.4 Advantages of Algorithm used 16
3.5 Explanation of the Project 39
3.6 Output Results 42
3.7 Conclusion 46
APPENDIX 49
Source Code 49
LIST OF TABLES
Table No Table Name Page No.
2.1 Hardware Requirements 9
2.1 Software Requirements 18
2.2 Weather Data Parameters 18
2.3 Algorithm Performance Metrics 18
LIST OF FIGURES
Fig No. Figure Name Page No.
4.1
4.2 Architecture Diagram
4.3 Algorithm Flowchart
4.4 User Interface Design
4.5 Data Flow Diagram
4.6 Machine Learning Model Structure
LIST OF ABBREVIATIONS
• Eg Example
• OS – Operating System
• GUI Graphical User Interface
• UAC – User Account Control
• JAR – Java Archive
• IDE – Integrated Development Environment
• JDK Java Development Kit
CHAPTER 1
INTRODUCTION
1.1 Overview
Weather forecasting has evolved significantly over the years, becoming an integral part of
our daily lives. With the advent of technology and the proliferation of smartphones,
accessing real-time weather information has never been easier. However, the accuracy,
reliability, and user experience of existing weather apps vary widely, leading to challenges
in making informed decisions based on weather forecasts. This project aims to address
these challenges by developing an advanced weather application that leverages cutting-
edge technologies to deliver accurate, personalized, and user-friendly weather information
to users.
Limited Features: Some apps lack comprehensive features, such as historical data analysis,
personalized alerts, and interactive maps, limiting user engagement and utility.
Poor User Experience: Complex interfaces, slow loading times, and lack of intuitive design
elements can hinder user experience, making it challenging to access and interpret weather
information effectively.
The project aims to tackle these problems by developing a weather application that
prioritizes accuracy, offers a wide range of features, and provides a seamless user
experience.
1
The primary objectives of this project are:
Enhance User Experience: Design an intuitive and visually appealing user interface with
interactive elements, personalized alerts, and easy navigation to improve user engagement
and satisfaction.
Data Acquisition and Integration: Gathering weather data from multiple reliable sources,
including weather APIs, meteorological stations, and historical databases, to ensure
comprehensive coverage and accuracy.
User Interface Design: Creating a user-friendly and visually appealing interface with
intuitive navigation, interactive elements, and customizable features to enhance user
experience and engagement.
2
CHAPTER 2
•Jupyter - Jupyter is a web application that permits clients to make and run
reports with live code, conditions, visualizations, and comments. It underpins
numerous programming dialects such as Python, R, Julia, and Scala. In a
3
Jupyter Notebook, code can be written and executed in individual cells, which
allows for an interactive and exploratory programming experience. Users can
easily visualize and analyze data, create plots and graphs, and share their
work with others.
4
CHAPTER 3
PROJECT DESCRIPTION
3.1 Introduction
5
3.3 Algorithm Used
6
3.5 Explanation of the Project
7
8
3.7 Conclusion
9
APPENDIX
Source Code
import tkinter as tk
import requests
import json
API_KEY = "YOUR_OPENWEATHERMAP_API_KEY"
API_URL = "http://api.openweathermap.org/data/2.5/weather?
q={}&appid={}&units=metric"
def fetch_weather(city):
try:
data = json.loads(response.text)
weather = {
"description": data['weather'][0]['description'],
"temperature": data['main']['temp'],
"humidity": data['main']['humidity'],
"wind_speed": data['wind']['speed'],
10
}
return weather
except Exception as e:
return None
def get_weather():
city = city_entry.get()
weather = fetch_weather(city)
if weather:
result_label.config(text=f"Weather: {weather['description']}\
nTemperature: {weather['temperature']}°C\nHumidity: {weather['humidity']}
%\nWind Speed: {weather['wind_speed']} m/s")
else:
root = tk.Tk()
root.title("Weather App")
11
tk.Label(root, text="Enter City:").pack(pady=20)
city_entry = tk.Entry(root)
city_entry.pack(pady=20)
get_weather_button.pack(pady=20)
result_label.pack(pady=20)
root.mainloop()
12