0% found this document useful (0 votes)
5 views20 pages

Project File - A

The document outlines an investigatory project on COVID data analysis submitted by a Class XII student at BMDAV Public School for the 2024-25 session. It includes a software tool for predicting COVID-19 cases, mortality rates, and visualizing data through graphs, along with a CSV file containing district-wise COVID statistics. The project concludes that densely populated areas are more affected by COVID-19 and highlights demographic trends in mortality rates.

Uploaded by

chitwanchauhan1
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)
5 views20 pages

Project File - A

The document outlines an investigatory project on COVID data analysis submitted by a Class XII student at BMDAV Public School for the 2024-25 session. It includes a software tool for predicting COVID-19 cases, mortality rates, and visualizing data through graphs, along with a CSV file containing district-wise COVID statistics. The project concludes that densely populated areas are more affected by COVID-19 and highlights demographic trends in mortality rates.

Uploaded by

chitwanchauhan1
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/ 20

BMDAV PUBLIC SCHOOL

BHUPATWALA ARIDWAR

SESSION : 2024-25

INFORMATICS PRACTICES
Investigatory Project on:
COVID DATA ANALYSIS

SUBMITTED TO: SUBMITTED BY:


Mrs. Khushboo Narula Name :
(PGT IP) Class : XII
Board Roll No.
CERTIFICATE

This is to certify that _____________ S/o,D/o of Mr.


___________________ studying in Class: XII during the
Session: 2024-25 has successfully completed her
investigatory project of Informatics Practices on the
Topic: _____________________________________

For an Annual Practical Examination conducted by CBSE.


During the tenure of project, he/she was found to be fully
disciplined, hard-working and has taken keen interest in
the completion of her/his project. He/She has covered all
the topics concerning her/his project successfully and all
the contents are presented in a very appropriate way. I
convey my best wishes to her/his and for her/his bright
future.

Name of the Student


ACKNOWLEDGEMENT

I wish to express my deep sense of gratitude and indebtedness to our


learned teacher MRS. KHUSHBOO NARULA, PGT INFORMATICS
PRACTICES, BMDAV PUBLIC SCHOOL

for his invaluable help, advice and guidance in the preparation of this
project.

I am also greatly indebted to our principal MRS. LEENA BHATIA

and school authorities for providing me with the facilities and requisite
laboratory conditions for making this practical file.

I also extend my thanks to a number of teachers, my classmates and


friends who helped me to complete this practical file successfully.

NAME OF THE STUDENT


TABLE OF CONTENTS

 PROJECT INTRODUCTION
 SOURCE CODE
 OUTPUT
 REFERENCES
ALL INDIA SENIOR SCHOOL CERTIFICATE EXAMINATION
RECORD OF PROJECT WORK IN INFORMATICS PRACTICES

Certified that this is the bonafide record of project word done by _________________

Under my supervision and guidance. Submitted for the Practical Examination held in
.........................................................

At BMDAV PUBLIC SCHOOL, BHUPATWALA HARIDWAR.

Subject In-charge
INTRODUCTION

The software will enable you to make predictions on the number of new cases, mortality

rates and more, and direct your efforts to areas where they are most needed.

Our COVID-19 data analysis resource, designed for hospitals, healthcare professionals

and state and local authorities, provides users with a concise view of the global, national

and local data they may require to get a clearer picture of the situation.

We hope this new tool will be of service to you in your ongoing fight against the virus

and are extremely grateful for your determination and hard work.

.
CSV FILE (Covid_19.csv)

Districts Confirmed Recovered Deaths Active


Navsari 78781 72835 349 5587
Jamnagar 95474 90780 356 4327
Rajkot 91580 86261 320 4988
Bhavnagar 50230 45351 149 4762
Gandhinagar 35134 27964 63 7102
Valsad 41887 41887 220 2770
Kutch 60768 56471 255 4021
Mahesana 430 230 20 180
Sabarkantha 400 200 12 188
Ahmedabad 95123 90010 2022 5113
Banaskantha 22678 17675 467 17234
Anand 18002 1245 120 16789
Dang 8765 3456 30 7654
CODING

mport numpy as np

import pandas as pd

import matplotlib.pyplot as plt

def showData():

df=pd.read_csv("covid_19.csv")

print(df)

input("Press any key to continue....")

def dataNoIndex():

df=pd.read_csv("covid_19.csv",index_col=0)

print(df)

input("Press any key to continue...")

def data_sorted():

df=pd.read_csv('covid_19.csv')

print(df.sort_values(by=['Confirmed']))

def write_data():

print("Insert data of particular districts in list form:")

di=eval(input("Enter Districts:"))

con_cases=eval(input("Enter no. of confirmed cases:"))

rec=eval(input("Enter no. of recovered cases:"))

deaths=eval(input("Enter deaths:"))

active=eval(input("Enter active cases:"))

d={'Districts':di,'Confirmed':con_cases,'Recovered':rec,'Deaths':deaths,'Active':active}

df=pd.DataFrame(d)

df.to_csv('covid_19.csv', mode='a', index=False, header=False)

print("Data has been added.")

input("Press any key to continue...")

def edit_data():

df=pd.read_csv("covid_19.csv")

di=input("Enter district to edit:")


col=input("Enter column name to update:")

val=input("Enter new value")

df.loc[df[df['Districts']==di].index.values,col]=val

df.to_csv("covid_19.csv",index=False)

print("Record has been updated...")

input("Press any key to continue...")

def delete_data():

di=input("Enter district to delete data:")

df=pd.read_csv("covid_19.csv")

df=df[df.Districts!=di]

df.to_csv('covid_19.csv',index=False)

print("Record deleted...")

def line_chart():

df=pd.read_csv('covid_19.csv')

District=df["Districts"]

Confirmed=df["Confirmed"]

Recovered=df["Recovered"]

Deaths=df["Deaths"]

Active=df["Active"]

plt.xlabel("Districts")

Y=0

while Y!=6:

print(" ==============================")

print(" Line Graph Menu")

print(" ==============================")

print("1.District wise Confirmed Cases ")

print("2.District wise Recovered Cases ")

print("3.District wise Death Cases")

print("4.District wise Active Cases")

print("5.All data")

print("6.Return to main menu.")

Y = int(input("Enter your choice to get line graph: "))


if Y == 1:

plt.ylabel("Confirmed Cases")

plt.title("Districts Wise Confirmed Cases")

plt.plot(District, Confirmed, color='b')

plt.show()

elif Y == 2:

plt.ylabel("Recovered Cases")

plt.title("Districts Wise Recovered Cases")

plt.plot(District, Recovered, color='g')

plt.show()

elif Y == 3:

plt.ylabel("Death Cases")

plt.title("Districts Wise Death Cases")

plt.plot(District, Deaths, color='r')

plt.show()

elif Y == 4:

plt.ylabel("Active Cases")

plt.title("Districts Wise Active Cases")

plt.plot(District, Active, color='c')

plt.show()

elif Y == 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()

elif Y==6:

print("Line Graph Closed.....")

main_menu()

else:

print("Sorry!! Invalid Option! Try Again!!!")

main_menu()
def bar_chart():

df=pd.read_csv('covid_19.csv')

District=df["Districts"]

Confirmed=df["Confirmed"]

Recovered=df["Recovered"]

Deaths=df["Deaths"]

Active=df["Active"]

plt.xlabel("Districts")

print(" ==============================")

print(" Bar Graph Menu")

print(" ==============================")

print("1. District Wise Confirmed Cases")

print("2. District Wise Recovered Cases")

print("3. District Wise Death Cases")

print("4. District Wise Active Cases")

print("5. All data")

print("6. Combine Bar Graph")

print("7. Return to main menu.")

Y=0

while Y!=5:

Y = int(input("Enter your choice to get bar graph: "))

if Y == 1:

plt.ylabel("Confirmed Cases")

plt.title("Districts Wise Confirmed Cases")

plt.bar(District, Confirmed, color='b', width = 0.5)

plt.show()

elif Y == 2:

plt.ylabel("Recovered Cases")

plt.title("Districts Wise Recovered Cases")

plt.bar(District, Recovered, color='g', width = 0.5)

plt.show()

elif Y == 3:

plt.ylabel("Death Cases")

plt.title("Districts Wise Death Cases")

plt.bar(District, Deaths, color='r', width = 0.5)


plt.show()

elif Y == 4:

plt.ylabel("Active Cases")

plt.title("Districts Wise Active Cases")

plt.bar(District, Active, color='c', width = 0.5)

plt.show()

elif Y == 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 Y == 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()

elif Y==7:

print("Bar Graph Closed.....")

main_menu()

else:

print("Sorry!! Invalid Option! Try Again!!!")

main_menu()

def main_menu():

ch=0

print(" ==============================")

print(" Main Menu")

print(" ==============================")

while ch!=9:
print("""

1. Show DataFrame

2. Data without index

3. Data in Ascending order of Confirmed cases

4. Add district data into CSV

5. Edit a record

6. Delete a record

7. Line Graph

8. Bar Graph

9. Exit

""")

ch=int(input("Enter your choice:"))

if ch==1:

showData()

elif ch==2:

dataNoIndex()

elif ch==4:

write_data()

elif ch==3:

data_sorted()

elif ch==5:

edit_data()

elif ch==6:

delete_data()

elif ch==7:

line_chart()

elif ch==8:

bar_chart()

elif ch==9:

print("Thank you for using our App, Bye Bye, See you again!!")

break

main_menu()
Output
Conclusion

By visualizing data in form of bar and line graphs we are able to easily analyze that the
states wisely affected due to Covid-19 are states with dense population and least affected
are not so densely populated.
The worst affected age group is 61 to 70 as there are More deaths caused in this group
due to Covid-19.
We can also clearly see that in every age group there is more deaths caused in males
than in females.
We are also able to see that India stands at third position in global testing of corona virus
with more than 15.6 crores sample already tested.
References
 Python.org
 SoloLearn
 TechBeamers
 Real Python

You might also like