0% found this document useful (0 votes)
22 views15 pages

AI Practical Project

The document outlines a project on Data Visualization using Python, conducted by a student at Techno India Group Public School for the AISSCE session 2024-25. It includes a certificate of completion, acknowledgments, an overview of Python, and sample code for various data visualization techniques such as line charts, bar graphs, and scatter charts. Additionally, it lists references and resources used in the project.

Uploaded by

bivan.roy28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views15 pages

AI Practical Project

The document outlines a project on Data Visualization using Python, conducted by a student at Techno India Group Public School for the AISSCE session 2024-25. It includes a certificate of completion, acknowledgments, an overview of Python, and sample code for various data visualization techniques such as line charts, bar graphs, and scatter charts. Additionally, it lists references and resources used in the project.

Uploaded by

bivan.roy28
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

TECHNO INDIA GROUP PUBLIC SCHOOL

COOCHBEHAR
AFFLIATION NO.: 2430158
SCHOOL CODE: 15727

ARTIFICAL INTELLIGENCE (417)


PROJECT: DATA VISUALIZATION

AISSCE
SESSION: 2024-25

NAME:________________________________________________________________________________

CLASS:-X SECTION: A / B/ C

ROLL NO.(Board’s):__________________________________________________________________

SUBJECT TEACHER: VIJAY KUMAR BHARVAD


CERTIFICATE
This is to certify that _____________________________________ of
class: X SEC. _____ of Techno India Group Public School,
Coochbehar, has completed his/her investigatory project
under my supervision.

She/he has taken proper care and shown utmost sincerity in


completion of this project. I certify that this project is upto my
expectations and as per guidelines issued by CBSE.

Mr. Rajesh Sengupta/ Mr. Vijay Bharvad


(Subject Teacher/Head of the Department)

Signature of the Principal Signature of the Internal Examiner


ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my teacher

___________________________ as well as our principal madam MRS. SOMA

TARAN DUTTA who gave me the golden opportunity to do this wonderful

investigatory project on the topic DATA VISUALIZATION which also helped

me in doing a lot of research and I came to know about so many new things I am

really thankful to them.

Secondly I would also like to thank my parents and friends who helped me a lot in

finalizing this project within limited time frame.

Date: _________________

Name: _____________________________________________________________
Class: X Section:____________________________
Roll No.(Board’s):_____________________________________________________
ABOUT PYTHON
Python is a programming language that is interpreted, object-oriented, and considered to be high-level too.
What is Python? Python is one of the easiest yet most useful programming languages which is widely used in
the software industry. People use Python for Competitive Programming, Web Development, and creating
software. Due to its easiest syntax, it is recommended for beginners who are new to the software
engineering field. Its demand is growing at a very rapid pace due to its vast use cases in Modern
Technological fields like Data Science, Machine learning, and Automation Tasks. For many years now, it has
been ranked among the top Programming languages.

Today Python is used in all kinds of development from game development, basic programming, and scripting
to large and complex software development. It has a large community support and is rich in the library,
having all kinds of frameworks for backend, frontend and you name it python has it all.

Python was created in 1980s by Guido van Rossum. During his research at the National Research Institute
for Mathematics and Computer Science in the Netherlands, he created Python – a super easy programming
language in terms of reading and usage. The first ever version was released in the year 1991 which had only
a few built-in data types and basic functionality.

Later, when it gained popularity among scientists for numerical computations and data analysis, in 1994,
Python 1.0 was released with extra features like map, lambda, and filter functions. After that adding new
functionalities and releasing newer versions of Python came into fashion.
 Python 1.5 released in 1997
 Python 2.0 released in 2000
 Python 3.0 in 2008 brought newer functionalities
The latest version of Python, Python 3.11 was released in 2022.

Newer functionalities being added to Python makes it more beneficial for developers and improved its
performance. In recent years, Python has gained a lot of popularity and is a highly demanding programming
language. It has spread its demand in various fields which includes machine learning, artificial
intelligence, data analysis, web development, and many more giving you a high-paying job.
(What is Python? Its Uses and Applications - GeeksforGeeks, https://www.geeksforgeeks.org/)
PYTHON CODE
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

defFun():
print(":)")
print("#1. For checking the data.")
print("#2. Reading complete file without index.")
print("===================")
print("Topic - Data Visualization")
print(" ")
print("#3. Line Chart")
print(" Press 1 to print the data for Confirmed cases as per Districts.")
print(" Press 2 to print the data for Recovered cases as per Districts.")
print(" Press 3 to print the data for Death cases as per Districts.")
print(" Press 4 to print the data for Active cases as per Districts.")
print(" Press 5 to print All data.")
print(" ")
print("#4. Bar Graph")
print(" Press 1 to print the data for Confirmed cases as per Districts.")
print(" Press 2 to print the data for Recovered cases as per Districts.")
print(" Press 3 to print the data for Death cases as per Districts.")
print(" Press 4 to print the data for Active cases as per Districts.")
print(" Press 5 to print the data in form of stack bar chart")
print(" Press 6 to print the data in form of multi bar chart")
print(" ")
print("#5. Scatter Chart")
print(" ")
print("#6. For Exit")
print("===============")

defRead_CSV():
print("The Data")
df=pd.read_csv('C:\\Covid_data_kerala.csv')
print(df)

defNo_Index():
print("Reading the file without index")
df=pd.read_csv('C:\\Covid_data_kerala.csv', index_col=0)
print(df)

#FOR LINE CHART:)

defline_plot():
df=pd.read_csv('C:\\Covid_data_kerala.csv')
df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','I
DK','WYD','KGD']
District=df["Districts"]
Confirmed=df["Confirmed"]
Recovered=df["Recovered"]
Deaths=df["Deaths"]
Active=df["Active"]
plt.xlabel("Districts")
YC = int(input("Enter the number representing your preferred line chart
from the above choices: "))
if YC == 1:
plt.ylabel("Confirmed Cases")
plt.title("Districts Wise Confirmed Cases")
plt.plot(District, Confirmed, color='b')
plt.show()
elif YC == 2:
plt.ylabel("Recovered Cases")
plt.title("Districts Wise Recovered Cases")
plt.plot(District, Recovered, color='g')
plt.show()
elif YC == 3:
plt.ylabel("Death Cases")
plt.title("Districts Wise Death Cases")
plt.plot(District, Deaths, color='r')
plt.show()
elif YC == 4:
plt.ylabel("Active Cases")
plt.title("Districts Wise Active Cases")
plt.plot(District, Active, color='c')
plt.show()
elif YC == 5:
plt.ylabel("Number of cases")
plt.plot(District, Confirmed, color='b', label = "Districts Wise Confirmed
Cases")
plt.plot(District, Recovered, color='g', label = "Districts Wise Recovered Cases")
plt.plot(District, Deaths, color='r', label = "Districts Wise Death Cases")
plt.plot(District, Active, color='c', label = "Districts Wise Active Cases")
plt.legend()
plt.show()
else:
print("Enter valid input")

#FOR BAR GRAPH:

defbar_plot():
df = pd.read_csv('C:\\Covid_data_kerala.csv')
df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','I
DK','WYD','KGD']
District = df["Districts"]
Confirmed = df["Confirmed"]
Recovered = df["Recovered"]
Deaths = df["Deaths"]
Active = df["Active"]
plt.xlabel("Districts")
YC = int(input("Enter the number representing your preferred bar graph
from the above choices:"))
if YC == 1:
plt.ylabel("Confirmed Cases")
plt.title("Districts Wise Confirmed Cases")
plt.bar(District, Confirmed, color='b', width = 0.5)
plt.show()
elif YC == 2:
plt.ylabel("Recovered Cases")
plt.title("Districts Wise Recovered Cases")
plt.bar(District, Recovered, color='g', width = 0.5)
plt.show()
elif YC == 3:
plt.ylabel("Death Cases")
plt.title("Districts Wise Death Cases")
plt.bar(District, Deaths, color='r', width = 0.5)
plt.show()
elif YC == 4:
plt.ylabel("Active Cases")
plt.title("Districts Wise Active Cases")
plt.bar(District, Active, color='c', width = 0.5)
plt.show()
elif YC == 5:
plt.bar(District, Confirmed, color='b', width = 0.5, label = "Districts Wise
Confirmed Cases")
plt.bar(District, Recovered, color='g', width = 0.5, label = "Districts Wise
Recovered Cases")
plt.bar(District, Deaths, color='r', width = 0.5, label = "Districts Wise Death
Cases")
plt.bar(District, Active, color='c',width = 0.5, label = "Districts Wise Active
Cases")
plt.legend()
plt.show()
elif YC == 6:
D=np.arange(len(District))
width=0.25
plt.bar(D,Confirmed, width, color='b', label = "Districts Wise Confirmed
Cases")
plt.bar(D+0.25, Recovered, width, color='g', label = "Districts Wise Recovered
Cases")
plt.bar(D+0.50, Deaths, width, color='r', label = "Districts Wise Death Cases")
plt.bar(D+0.75, Active ,width, color='c', label = "Districts Wise Active Cases")
plt.legend()
plt.show()
else:
print("Enter valid input")

defscatter_chart():
df=pd.read_csv('C:\\Covid_data_kerala.csv')
df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','I
DK','WYD','KGD']
District = df["Districts"]
Confirmed = df["Confirmed"]
Recovered = df["Recovered"]
Deaths = df["Deaths"]
Active = df["Active"]

SC=plt.gca()
SC=plt.scatter(District, Confirmed, color="b", label="Districts Wise
Confirmed Cases")
SC=plt.scatter(District, Recovered, color="g", label="Districts Wise
Recovered Cases")
SC=plt.scatter(District, Deaths, color="r", label="Districts Wise Death
Cases")
SC=plt.scatter(District, Active, color="c", label="Districts Wise Active
Cases")

plt.xlabel("District")
plt.title("Complete Scatter Chart")
plt.legend()
plt.show()

Fun()
YC = int(input("Enter Your Choice: "))

while YC == 1 or 2 or 3 or 4 or 5 or 6:

if YC == 1:
Read_CSV()
break
elif YC == 2:
No_Index()
break
elif YC == 3:
line_plot()
break
elif YC == 4:
bar_plot()
break
elif YC == 5:
scatter_chart()
break
elif YC == 6:
print("Thank You for using...")
break
else:
print("Enter valid input")
break
OUTPUT
Note: According to our choice different types of plot will come in our screen.
BIBLIOGRAPHY

Books
 Artificial Intelligence – Sumita Arora
Dhanpat Rai Publication

WEBSITES
 ladderpython.com
 w3schools.com

You might also like