Project Anish
Project Anish
A Project Report
on
“Weather Report of India”
(For AISSCE 2023-24 Examination)
1
Certificate
Signature of Signature of
Internal Examiner External Examiner
Signature of Principal
2
Declaration
Anish Das
XII (Commerce)
3
Acknowledgement
Anish Das
XII (Commerce)
4
Index
S. No. Title Page Nos.
6
1. Introduction to the Project
7
2. Objective & Scope of the Project
8
3. Hardware and Software Requirements
9-11
4. Modules and Functions used
12-13
5. CSV Files used
14-18
6. Coding
19-25
7. Output Screens
26
8. User Manual
27
9. Bibliography
5
Introduction to the Project
The Earth's atmosphere is a dynamic and ever-changing system,
influencing our daily lives in myriad ways. From the clothes we
wear to the activities we plan, the weather plays a crucial role in
shaping our experiences. Understanding and predicting weather
patterns are essential for a variety of sectors, including agriculture,
transportation, emergency management, and more.
+
This weather report project aims to delve into the distinctive climatic
conditions of different Indian states, providing a comprehensive
overview of the meteorological nuances that define each region. By
examining temperature variations, precipitation levels, seasonal
changes, and extreme weather events, we seek to unravel the
complex interplay of geographical features and atmospheric
phenomena that contribute to India's diverse weather landscape.
6
Objective & Scope of the Project
AIM :
To Develop Weather Report Analysis System of India
7
Hardware and Software
Requirements
Hardware Requirements:
∗Processor:
∗RAM:
Intel Core i5
∗Hard disk:
32GB
∗CD/DVD/Pen-drive:
500 GB
∗Printer:
Pen-drive
Inkjet
Software Requirements:
∗Windows 11
∗Python 3.11
∗MySQL 5.5
∗Microsoft Word 2019
8
Modules and Functions Used
PANDAS: -
Pandas is a high-level data manipulation tool developed by Wes
McKinney. It is built on the Numpy package, and its
key data structure is called the DataFrame. DataFrames
allow you to store and manipulate tabular data in
rows of observations and columns of variables.
MATPLOTLIB: -
Matplotlib is a Comprehensive library
for creating static, animated, and
interactive visualizations in Python.
Matplotlib makes easy things easy
and hard things possible.
Create publication quality plots. Make interactive figures that can
9
zoom, pan, update. Customize visual style and layout.
head/tail (): The head and tail function prints the top and bottom
values of the file as per user specified.
10
xticks():The plt.xticks () gets or sets the properties of tick locations
and labels of the x-axis. 'Rotation = 45' is passed as an argument to
the plt.xticks () function.
11
CSV Files Used
weather.csv (Excel View):
12
literacy_rate.csv (Notepad View):
13
CODING
import csv
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.ion
def menu():
print("WEATHER REPORT")
print("0. Know about the project")
print("1. Reading file bank")
print("2. Reading file bank without index")
print("3. Add Detail of new state")
print("4. Delete Data")
print("5. Read few records")
print("6. Read 2 records from top and 2 from bottom")
print("7. Arrange details in ascending order by State name")
print("8. Line Chart")
print("9. Bar Chart")
print("10. Horizontal Barchart")
print("11. Histogram")
print("12.Pie Chart")
print("13. Quit")
menu()
14
# Option 1: Read 'weather.csv' with index
def weathercsv():
print("Reaading the file 'weather.csv' with index:")
df =pd.read_csv("C:\\pythonn\\weather.csv", index_col=0)
print(df)
print()
def add_state():
# Collect user information
city = input("Enter the states name: ")
Min_Temp = float(input("Enter the minimum temp: "))
Max_Temp = float(input("Enter the maximum temp: "))
Avg_Temp = float(input("Enter the avg temp: "))
15
df.to_csv(file_path)
# Option 6: Read 2 records from the top and 2 from the bottom
def top_bottom():
print("Displaying the top 2 and bottom 2 records:")
df = pd.read_csv("C:\\pythonn\\weather.csv")
top_2 = df.head(2)
bottom_2 = df.tail(2)
print(top_2)
print(bottom_2)
17
# Option 12: Pie Chart
def piechart():
print("Pie Chart")
df=pd.read_csv("C:\\pythonn\\weather.csv")
categories = df['City']
values = df['Avg_Temp']
plt.pie(values, labels=categories, autopct='%1.1f%%', startangle=90,
colors=['red', 'green', 'blue', 'yellow'])
plt.title('Pie Chart Of Weather Report')
plt.show()
choice = 'y'
while choice == 'y' or choice == 'Y':
opt = int(input("Enter your choice: "))
if opt == 0:
about()
elif opt == 1:
weathercsv()
elif opt == 2:
no_index()
elif opt == 3:
add_state()
elif opt == 4:
removestate()
elif opt == 5:
read_rows()
elif opt == 6:
top_bottom()
elif opt == 7:
sort_names()
elif opt == 8:
line_chart()
elif opt == 9:
bar_chart()
elif opt == 10:
horizontalbar_chart()
elif opt == 11:
histogram()
elif opt== 12:
piechart()
18
elif opt == 13:
print("Exiting the program.")
break
else:
print('Invalid option. Please select a valid option.')
Output Screens
19
20
21
22
23
24
25
User Manual
A screen with the main menu will appear, asking from the user when
the Program is executed. It will print the following options:
Main Menu:
1. Knowing about the project
2. Reading file
6. Line Chart
7. Bar Chart
8. Horizontal Barchart
9. Histogram
26
Bibliography
Books:
Informatics Practices with Python by Sumita Arora
Websites:
Python.mykvs.in
www.programiz.com
www.brainly.com
Python.org
27