PM SHRI
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
Python Coding: 9-15
CSV Files Used: 16
Output Screen: 17-32
6. Bibliography 33
Acknowledgment
I express my gratitude towards my
INFORMATICS PRACTICES teacher
Mr. Mahendra Kumar Vishwakarma for
constantly guiding and supervising me
in completing this project.
I am also thankful to my Principal
Mr.Bharat Kumar Sheth for providing
the support and environment in the
school, without the guidance and
support would not have been able to
complete this project.
I am thankful to my friends who have
guided and encouraged me in this
project.
Vipul Nagar
ClassXII(Commerce)
Certificate
This is to certify that VIPUL
NAGAR , of class XII(Commerce) has
prepared this project during the
academic year 2024-25 under my
supervision and according to the
requirement of the CBSE.
I wish him good luck for the future.
External signature Teacher’s signature
Principle Signature
INTRODUCTION
“Contribution in GDP by each state of
India”
India is a diverse and dynamic economy with
various states having distinct economic
characteristics and challenges. This project
aims to analyze the Gross Domestic Product
(GDP) of different states in India, providing
insights into their economic conditions. The
project presents the GDP data of various states
from 2010 to 2022, facilitating an
understanding of their economic growth rates
and conditions.
Through this project, we hope to gain a better
understanding of the economic conditions of
different states in India and identify the factors
contributing to their economic growth. The
project provides a comprehensive overview of
the GDP of various states, enabling a
comparative analysis of their economic
performance. This analysis can be useful for
policymakers, researchers, and stakeholders
interested in understanding the economic
dynamics of different states in India.
Python is a high-level language. It is a
free and open- source language.
It is an interpreted language, as Python
programs are executed by an interpreter.
Python programs are easy to understand
as they have a clearly defined syntax and
relatively simple structure.
Python is case-sensitive. For example,
NUMBER and number are not same in
Python.
Python is portable and platform
independent, means it can run on various
operating systems and hardware
platforms.
Python has a rich library of predefined
functions.
Python is also helpful in web
development. Many popular web services
and applications are built using Python.
Python uses indentation for blocks and
nested blocks.
A CSV (Comma-Separated Values) file is a widely
used file format for storing and exchanging
structured data. It organizes data in a tabular form
where each row represents a record, and columns
are separated by commas. CSV files are simple,
lightweight, and compatible with a wide range of
software applications, making them ideal for data
transfer between systems or for quick data storage.
In the context of informatics practices, CSV files
play a crucial role in data analysis, processing, and
visualization. They are extensively used for storing
datasets due to their ease of readability and
simplicity. Python and other programming
languages provide robust libraries like pandas for
manipulating CSV files efficiently.
This project explores the concept and application of
CSV files, highlighting their importance in handling
structured data and their integration in real-world
scenarios like data science, business analysis, and
machine learning.
Pandas is an open-source, high-level data
analysis and manipulation library for
Python programming language. With
pandas, it is effortless to load, prepare,
manipulate, and analyze data. It is one of
the most preferred and widely used
libraries for data analysis operations.
Pandas have easy syntax and fast
operations. It can handle data up to
10,00,000 rows with ease. With pandas
Dataframe, it is effortless to add/delete
columns, slice, indexing, and dealing with
null values.
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.
Customize visual style and layout.
Export to many file formats.
System Implementation
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.
Python IDLE as Front-end Development
environment.
CSV Files as Back-end for storing the data.
MS-Word 2007 for documentation.
Python Coding:
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:
GDP at current prices in ₹ billions.CSV
State 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021
Andaman & Nicobar
Islands 44 50 55 60 68 79 90 98 93 104
Andhra Pradesh 4,114 4,643 5,250 6,042 6,844 7,861 8,737 9,258 9,786 11,485
Arunachal Pradesh 125 146 180 185 199 225 253 300 305 327
Assam 1,569 1,777 1,957 2,280 2,544 2,832 3,093 3,469 3,398 4,107
Bihar 2,824 3,171 3,430 3,716 4,211 4,687 5,280 5,819 5,678 6,474
Chandigarh 216 248 265 293 324 363 401 434 394 461
Chhattisgarh 1,775 2,068 2,211 2,252 2,628 2,827 3,271 3,447 3,523 4,105
Delhi 3,914 4,440 4,948 5,508 6,161 6,779 7,384 7,929 7,443 8,813
Goa 381 359 478 551 630 694 719 750 742 812
10,29
Gujarat 7,245 8,076 9,218 0 11,672 13,291 14,922 16,171 16,161 19,209
Haryana 3,470 3,993 4,371 4,955 5,614 6,388 6,989 7,381 7,291 8,689
Himachal Pradesh 828 948 1,038 1,142 1,256 1,386 1,484 1,592 1,516 1,722
Jammu &Kashmir 871 956 984 1,172 1,248 1,397 1,599 1,641 1,678 1,886
Jharkhand 1,747 1,886 2,185 2,066 2,362 2,698 3,057 3,103 2,967 3,761
10,45
Karnataka 6,954 8,167 9,139 2 12,076 13,332 14,794 16,158 16,415 19,781
Kerala 4,123 4,650 5,126 5,620 6,349 7,016 7,883 8,129 7,717 9,245
Madhya Pradesh 3,809 4,395 4,799 5,411 6,498 7,263 8,298 9,279 9,466 10,930
19,66
Maharashtra 14,596 16,496 17,791 2 21,982 23,528 25,289 26,568 26,107 31,441
Manipur 137 162 181 195 213 258 274 298 298 350
Meghalaya 219 229 232 251 274 295 322 348 338 402
Mizoram 84 103 135 151 172 194 219 250 239 267
Nagaland 141 166 184 195 217 244 265 297 298 323
Odisha 2,617 2,965 3,142 3,285 3,928 4,404 4,986 5,375 5,402 6,970
Puducherry 189 219 226 266 296 321 342 370 362 409
Punjab 2,977 3,321 3,551 3,901 4,270 4,710 5,125 5,370 5,409 6,277
Rajasthan 4,936 5,510 6,156 6,815 7,606 8,325 9,115 10,000 10,179 11,950
Sikkim 123 139 154 180 207 260 284 314 330 376
11,76
Tamil Nadu 8,548 9,685 10,727 5 13,026 14,651 16,302 17,431 17,881 20,725
Telangana 4,016 4,516 5,058 5,779 6,583 7,501 8,574 9,501 9,431 11,241
Tripura 217 256 295 359 395 437 498 542 535 623
11,37
Uttar Pradesh 8,224 9,404 10,118 8 12,887 14,399 15,822 17,001 16,449 19,756
Uttarakhand 1,316 1,491 1,614 1,772 1,951 2,202 2,303 2,393 2,256 2,671
West Bengal 5,915 6,768 7,181 7,973 8,725 9,747 11,021 11,791 11,418 13,292
Output (Screenshots):
Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023,
13:03:39) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more
information.
= RESTART: C:\Users\abc\Downloads\IP PRACTICLE FILE\
GSDP at current prices (in ₹ billions).py
GDP of India State Wise (Chart)
-----------------------------
Menu
Particular State -1
Particular Year-2
Selected State&Years-3
Enter choice :1
0 -> Andaman and Nicobar Islands
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
12 -> Jammu and Kashmir
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
Enter number(0 to 34)30
Details of State: Uttar Pradesh
State 2012 2013 2014 ... 2019 2020 2021
2022
30 Uttar Pradesh 8,224 9,404 10,118 ... 17,001
16,449 19,756 22,580
[1 rows x 12 columns]
['2012', '2013', '2014', '2015', '2016', '2017', '2018',
'2019', '2020', '2021', '2022']
['Uttar Pradesh', '8,224', '9,404', '10,118', '11,378',
'12,887', '14,399', '15,822', '17,001', '16,449', '19,756',
'22,580']
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
0 -> Andaman and Nicobar Islands
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
12 -> Jammu and Kashmir
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
Enter number(0 to 34)16
Details of State: Madhya Pradesh
State 2012 2013 2014 ... 2019 2020 2021
2022
16 Madhya Pradesh 3,809 4,395 4,799 ... 9,279 9,466
10,930 12,465
[1 rows x 12 columns]
['2012', '2013', '2014', '2015', '2016', '2017', '2018',
'2019', '2020', '2021', '2022']
['Madhya Pradesh', '3,809', '4,395', '4,799', '5,411',
'6,498', '7,263', '8,298', '9,279', '9,466', '10,930', '12,465']
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
Enter year (2012 to 2022):2019
All states-1
Select state-2
choice:2
0 Andaman and Nicobar Islands
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
12 Jammu and Kashmir
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
Name: State, dtype: object
Enter States(0 to 34): 5
Continue (y/n):Y
Enter States(0 to 34): 27
Continue (y/n):N
5 Chandigarh
27 Tamil Nadu
Name: State, dtype: object
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
0 -> Andaman and Nicobar Islands
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
12 -> Jammu and Kashmir
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
Enter number(0 to 34)14
Details of State: Karnataka
State 2012 2013 2014 ... 2019 2020 2021
2022
14 Karnataka 6,954 8,167 9,139 ... 16,158 16,415
19,781 22,700
[1 rows x 12 columns]
['2012', '2013', '2014', '2015', '2016', '2017', '2018',
'2019', '2020', '2021', '2022']
['Karnataka', '6,954', '8,167', '9,139', '10,452', '12,076',
'13,332', '14,794', '16,158', '16,415', '19,781', '22,700']
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
Enter year (2012 to 2022):2015
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
Name: 2015, dtype: object
Continue:y/nN
Bibliography
In order to work on this project titled –
State wise GDP Contribution in India
(in ₹ billions), the following books and
websites are referred by me during the
various phases of development of the
project.
Informatics Practices (NCERT Class XI
and XII)
Together with Informatics Practices
www.youtube.com
www.python.com
Other than the above-mentioned books,
the suggestions and supervision of my
teacher and my class experience also
helped me to develop this software project.