0% found this document useful (0 votes)
3 views

r.jeevitha

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

r.jeevitha

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

MEENATCHI RAMASAMY VIDHYALAYA

SR. SEC. SCHOOL -THATHANUR

COMPUTER SCIENCE
PROJECT
CLASS:XII
Covid-19 Data visualization

Submitted by:R.JEEVITHA
CERTIFICATE

This to certify that R.JEEVITHA of class XII has worked


successfully under the supervision of Mrs,.G.SANDHIYA during
academic year 2024-2025 on the project COVID-19 DATA
VISUALIZATION as per the guidelines issued by CENTRAL BOARD
OF SECONDARY EDUCATION.

Signatureof subject Signatureof External

Teacher Examiner

Signature of principal
TABLE OF CONTENTS
ACKNOWLDGEMENT
I would like to express my special thanks to my
teacher Mrs.SANDHIYA as well as

our Principal Mr. KARTHIKRAJAsir,who gave me


the golden opportunity to do this project on the
topicCOVID- 19 DATA VISUALIZATION, which also
helped me in during lot of research and i came to
know about so many things.
I am really thank ful to them.
INTRODUCTION
The covid-19 pandemic has shaken the world
completely. No one knew what was coming and
every one was running helter-skelter. The
governments were paralyzed and the infra stucture
required to deal with this problem was absent
completetly . The genome sequence was out. But
what the disease entailed and what it will lead out
was just anyone’s imagination. Till today as wewrite
there are multiple dimension of it that lay
unexplored and need a deep exploration to be
found out. Our project seeks to uncover themystery
using the application of data sciences to solve it. We
seek to use data sciences to help authorities and
also to give the medical field the insight that data
can provide to them deal with the pandemic better.
Data visualization in our project is being applied to
just the corona virus but it application are wide
ranging and can be applied across sectors of
diseases to diagnose better.it’s this frontier we seek
to find from our project.
SOURCE CODE
#cbsepython.in
importpandasaspd
import numpyasnp
importmatplotlib.pyplotasplt
def Fun():
print(":)")
print("#1.Forcheckingthe data.")
print("#2.Readingcompletefilewithoutindex.")
print("===================")
print("Topic-DataVisualization")
print("")
print("#3.LineChart")
print("Press1toprintthedataforConfirmedcasesasperDistricts.")
print("Press2toprintthedataforRecoveredcasesasperDistricts.") 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("Press1toprintthedataforConfirmedcasesasperDistricts.")
print("Press2toprintthedataforRecoveredcasesasperDistricts.") 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("Press6toprintthedatainformofmultibarchart")
print("")
print("#5.ScatterChart")
print("")
print("#6. For Exit")
print("===============")
defRead_CSV():
print("The Data") df=pd.read_csv('D:\\
Covid_data_kerala.csv') print(df)
defNo_Index():
print("Reading the file without index")
df=pd.read_csv('D:\\Covid_data_kerala.csv',index_col=0)
print(df)
#FORLINE CHART:)
def line_plot(): df=pd.read_csv('D:\\
Covid_data_kerala.csv') df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','IDK','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 numberrepresenting your preferred line chart from the above choices:
"))
ifYC ==1:
plt.ylabel("Confirmed Cases")
plt.title("DistrictsWiseConfirmedCases")
plt.plot(District, Confirmed, color='b')
plt.show()
elifYC==2:
plt.ylabel("Recovered Cases")
plt.title("DistrictsWiseRecoveredCases")
plt.plot(District, Recovered, color='g')
plt.show()
elifYC==3:
plt.ylabel("Death Cases")
plt.title("DistrictsWiseDeathCases")
plt.plot(District, Deaths, color='r')
plt.show()
elifYC==4:
plt.ylabel("Active Cases")
plt.title("DistrictsWiseActiveCases")
plt.plot(District, Active, color='c')
plt.show()
elifYC==5:
plt.ylabel("Numberofcases")
plt.plot(District,Confirmed,color='b',label="DistrictsWiseConfirmedCases")
plt.plot(District,Recovered,color='g',label="DistrictsWiseRecoveredCases")
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("Entervalidinput") #FOR
BAR GRAPH:)
defbar_plot():
df=pd.read_csv('Covid_data_kerala.csv')
df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','IDK','WYD','KGD']
District = df["Districts"]
Confirmed=df["Confirmed"]
Recovered=df["Recovered"]
Deaths = df["Deaths"]
Active=df["Active"]
plt.xlabel("Districts")
YC=int(input("Enterthenumberrepresentingyourpreferredbargraphfromtheabove choices:"))
ifYC ==1:
plt.ylabel("Confirmed Cases")
plt.title("DistrictsWiseConfirmedCases")
plt.bar(District,Confirmed,color='b',width=0.5) plt.show()
elifYC==2:
plt.ylabel("Recovered Cases")
plt.title("DistrictsWiseRecoveredCases")
plt.bar(District,Recovered,color='g',width=0.5) plt.show()
elifYC==3:
plt.ylabel("Death Cases")
plt.title("DistrictsWiseDeathCases")
plt.bar(District,Deaths,color='r',width=0.5)
plt.show()
elifYC==4:
plt.ylabel("Active Cases")
plt.title("DistrictsWiseActiveCases")
plt.bar(District,Active,color='c',width=0.5)
plt.show()
elifYC==5:
plt.bar(District,Confirmed,color='b',width=0.5,label="DistrictsWiseConfirmedCases")
plt.bar(District,Recovered,color='g',width=0.5, label= "DistrictsWiseRecoveredCases")
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()
elifYC==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="DistrictsWiseRecoveredCases")
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("Entervalidinput") def
scatter_chart():
df=pd.read_csv('Covid_data_kerala.csv')
df['Districts'] =
['EKM','PTA','KTM','TSR','KKD','MPM','KLM','PKD','ALP','KNR','TVM','IDK','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="DistrictsWiseConfirmedCases")
SC=plt.scatter(District,Recovered,color="g",label="DistrictsWiseRecoveredCases")
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("CompleteScatterChart")
plt.legend()
plt.show()
Fun()
YC=int(input("EnterYourChoice:"))
while YC == 1 or 2 or 3 or 4 or 5 or 6:
if YC == 1:
Read_CSV()
break
elifYC==2:
No_Index()
break
elifYC==3:
line_plot()
break
elifYC==4:
bar_plot()
break
elif YC == 5:
scatter_chart()
break
elifYC==6:
print("ThankYouforusing...") break
else:
print("Entervalidinput")
break
SampleCSVfile forthe abovecode:
Covid_data_kerala

Output:

===RESTART:C:\Users\ATC\AppData\Local\Programs\Python\Python38-32\COVID.PY #1.
For checking the data.
#2.Readingcompletefilewithoutindex.
===================
Topic-DataVisualization

#3.LineChart
Press1toprintthedataforConfirmedcasesasperDistricts.
Press2toprintthedataforRecoveredcasesasperDistricts. Press 3 to
print the data for Death cases as per Districts.
Press4toprintthedataforActivecasesasperDistricts. Press 5 to
print All data.

#4.BarGraph
Press1toprintthedataforConfirmedcasesasperDistricts.
Press2toprintthedataforRecoveredcasesasperDistricts. Press 3 to
print the data for Death cases as per Districts.
Press4toprintthedataforActivecasesasperDistricts. Press 5 to
print the data in form of stack bar chart
Press6toprintthedatainformofmultibarchart #5. Scatter

Chart

#6.For Exit
===============
EnterYourChoice:
Screenshot:
CONCLUSION
The covid-19Pandemic is a hugestruggle for allofus
. The project we are making will seek to find the answers
to the most pertinent questions as to what is it that
makes thecovid- 19 such a tragedy and what all people
are the ones who are most affected by it. It will seek to
find the appropriate response which can reach to placeof
proper discussion about the problem and solve it in the
best possible manner out there. It will also lead to a
solution to any medicalconditions we might encounter
later on in our lives where we can apply data sciences for
medical diagnositics.This project saves on the already
limited resources that india have and prevents thespread
as people can use it to get an idea that they should go
and get tested. It also helps unhealthy and infected
people it isolate themselves. Using this system we can
effectively mitigate the burden on our healthcare system
which is completely stressed out.
BIBILIOGRAPHY
[1] R.Wang,G.Hu,c.Jiang,H.LuandY.Zhang,“DATA
VISUALIZATION”fortheCOVID-19E;pidemic,“2020IEEE
44th Annual Computers software and applications
conference, Madrid Spain 2020. pp.1261-1266,doi
10.1109/COMPSACA4866.
[2] Zoabi,..Y,,Derirozov,s.&showron’n.Machine
learningbasedon symptoms, npj Digit med 4,3(2021).

You might also like