Ip Practicle File
Ip Practicle File
KENDRIYA VIDYALAYA
B.N.P. DEWAS (M.P)
SESSION:- 2024-25
SUBJECT:- INFORMATICS PRACTICES
TOPIC:- Contribution in GDP by each state
of India
SUBMITTED TO SUBMITTED BY
MR. M.K. VISHWAKARMA VIPUL NAGAR
CLASS XII ‘C’
INDEX
S.No Contents Page
No.
1. Acknowledgment 1
2. Certificate 2
3. Introduction 3-7
4. System Implementation
The Hardware used: 8
The Software’s used: 8
5. System Design & Development
Vipul Nagar
ClassXII(Commerce)
Certificate
Hardware used:
While developing the software, the used
hardware’s are: PC with Intel Core i3 processor
having 6.00 GB RAM and other required devices.
Software used:
Microsoft Windows® 10 as Operating
System.
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
df1=pd.read_csv("C:\\Users\\abc\\Desktop\\
GDP at current prices in ₹ billions.csv")
prop_cycle =plt.rcParams['axes.prop_cycle']
colors = prop_cycle.by_key()['color']
cho='y'
print("GDP of India State Wise (Chart)")
print("-----------------------------")
while(cho=='y' or cho=='Y'):
print("Menu")
print("Particular State -1")
print("Particular Year-2")
print("Selected State&Years-3")
ch=int(input("Enter choice :"))
if ch==1:
for i in range(len(df1['State'])):
print(i," ->",df1['State'][i])
state=int(input("Enter number(0 to
34)"))
print("Details of State: ",df1['State']
[state])
print(df1[df1['State']==df1['State']
[state]])
yr=df1.columns.values.tolist()
yr=yr[1:]
population=df1[df1['State']==
df1['State']
[state]].values.tolist()
print(yr)
print(population[0])
print("Line chart-L")
print("Bar chart-B")
ch=input("Choice :")
if ch=='L':
plt.figure(figsize=(15,6))
plt.grid(True)
plt.xticks(
rotation=90,
horizontalalignment='right',
fontweight='light',
fontsize='medium')
plt.plot(yr,population[0][1:],
linestyle='dashed', linewidth =
3,
marker='o', markerfacecolor='blue',
markersize=12)
elif ch=='B':
plt.figure(figsize=(15,6))
plt.bar(yr,population[0][1:],
color=colors[0:len(population[0]
[1:])])
plt.xlabel("Year")
plt.ylabel("GDP of India State Wise")
plt.title(df1['State'][state])
plt.show()
elif ch==2:
year=input("Enter year (2012 to 2022):")
yr=df1[year]
print("All states-1")
print("Select state-2")
c=int(input("choice:"))
if c==1:
plt.figure(figsize=(15,6))
st=df1['State']
plt.xticks(
rotation=90,
horizontalalignment='right',
fontweight='light',
fontsize='medium')
print(yr)
plt.bar(st,yr,color=colors[0:len(st)])
plt.xlabel("State")
plt.ylabel("GDP of India State Wise")
plt.title(year)
plt.show()
elif c==2:
plt.figure(figsize=(15,6))
print(df1['State'])
op='y'
l=[]
while op=='y' or op=='Y':
s=int(input("Enter States(0 to 34):
"))
l.append(s)
op=input("Continue (y/n):")
st=df1['State'][l]
print(st)
yr=df1[year][l]
print(yr)
plt.xlabel("State")
plt.ylabel("GDP of India State Wise")
plt.title(year)
plt.bar(st,yr,color=colors[0:len(st)])
plt.show()
elif ch==3:
plt.figure(figsize=(15,6))
yr=df1.columns.values.tolist()
yr=yr[1:]
print(df1['State'])
op='y'
l=[]
while op=='y' or op=='Y':
s=int(input("Enter State(0 to 34): "))
l.append(s)
op=input("Continue (y/n):")
print(df1['State'][l])
l1=[]
op='y'
while op=='y' or op=='Y':
s1=input("Enter Year(2012 to 2022):")
l1.append(s1)
op=input("Continue (y/n):")
x=np.arange(len(l))
w=0
for s1 in l1:
a=df1[s1][l].values.tolist()
print(x)
print(a)
plt.bar(x+w,a)
w=w+0.5
print(l)
plt.xticks(np.arange(len(l)),df1['State'][l])
plt.xlabel('State',fontsize=20)
plt.show()
else:
print("Invalid choice")
cho=input("Continue:y/n")
CSV Files Used:
-----------------------------
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :1
3 -> Assam
4 -> Bihar
5 -> Chandigarh
6 -> Chhattisgarh
7 -> Delhi
8 -> Goa
9 -> Gujarat
10 -> Haryana
13 -> Jharkhand
14 -> Karnataka
15 -> Kerala
17 -> Maharashtra
18 -> Manipur
19 -> Meghalaya
20 -> Mizoram
21 -> Nagaland
22 -> Odisha
23 -> Puducherry
24 -> Punjab
25 -> Rajasthan
26 -> Sikkim
28 -> Telangana
29 -> Tripura
31 -> Uttarakhand
32 -> West Bengal
[1 rows x 12 columns]
Line chart-L
Bar chart-B
Choice :B
Continue:y/nY
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :1
3 -> Assam
4 -> Bihar
5 -> Chandigarh
6 -> Chhattisgarh
7 -> Delhi
8 -> Goa
9 -> Gujarat
10 -> Haryana
13 -> Jharkhand
14 -> Karnataka
15 -> Kerala
17 -> Maharashtra
18 -> Manipur
19 -> Meghalaya
20 -> Mizoram
21 -> Nagaland
22 -> Odisha
23 -> Puducherry
24 -> Punjab
25 -> Rajasthan
26 -> Sikkim
27 -> Tamil Nadu
28 -> Telangana
29 -> Tripura
31 -> Uttarakhand
[1 rows x 12 columns]
Line chart-L
Bar chart-B
Choice :L
Continue:y/nY
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :2
All states-1
Select state-2
choice:2
1 Andhra Pradesh
2 Arunachal Pradesh
3 Assam
4 Bihar
5 Chandigarh
6 Chhattisgarh
7 Delhi
8 Goa
9 Gujarat
10 Haryana
11 Himachal Pradesh
13 Jharkhand
14 Karnataka
15 Kerala
16 Madhya Pradesh
17 Maharashtra
18 Manipur
19 Meghalaya
20 Mizoram
21 Nagaland
22 Odisha
23 Puducherry
24 Punjab
25 Rajasthan
26 Sikkim
27 Tamil Nadu
28 Telangana
29 Tripura
30 Uttar Pradesh
31 Uttarakhand
32 West Bengal
Continue (y/n):Y
Continue (y/n):N
5 Chandigarh
27 Tamil Nadu
5 434
27 17,431
Name: 2019, dtype: object
Continue:y/nY
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :1
3 -> Assam
4 -> Bihar
5 -> Chandigarh
6 -> Chhattisgarh
7 -> Delhi
8 -> Goa
9 -> Gujarat
10 -> Haryana
13 -> Jharkhand
14 -> Karnataka
15 -> Kerala
17 -> Maharashtra
18 -> Manipur
19 -> Meghalaya
20 -> Mizoram
21 -> Nagaland
22 -> Odisha
23 -> Puducherry
24 -> Punjab
25 -> Rajasthan
26 -> Sikkim
28 -> Telangana
29 -> Tripura
31 -> Uttarakhand
[1 rows x 12 columns]
Line chart-L
Bar chart-B
Choice :B
Continue:y/nY
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :2
All states-1
Select state-2
choice:1
0 60
1 6,042
2 185
3 2,280
4 3,716
5 293
6 2,252
7 5,508
8 551
9 10,290
10 4,955
11 1,142
12 1,172
13 2,066
14 10,452
15 5,620
16 5,411
17 19,662
18 195
19 251
20 151
21 195
22 3,285
23 266
24 3,901
25 6,815
26 180
27 11,765
28 5,779
29 359
30 11,378
31 1,772
32 7,973
Continue:y/nN
Bibliography