Project File - A
Project File - A
BHUPATWALA ARIDWAR
SESSION : 2024-25
INFORMATICS PRACTICES
Investigatory Project on:
COVID DATA ANALYSIS
for his invaluable help, advice and guidance in the preparation of this
project.
and school authorities for providing me with the facilities and requisite
laboratory conditions for making this practical file.
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
.........................................................
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)
mport numpy as np
import pandas as pd
def showData():
df=pd.read_csv("covid_19.csv")
print(df)
def dataNoIndex():
df=pd.read_csv("covid_19.csv",index_col=0)
print(df)
def data_sorted():
df=pd.read_csv('covid_19.csv')
print(df.sort_values(by=['Confirmed']))
def write_data():
di=eval(input("Enter Districts:"))
deaths=eval(input("Enter deaths:"))
d={'Districts':di,'Confirmed':con_cases,'Recovered':rec,'Deaths':deaths,'Active':active}
df=pd.DataFrame(d)
def edit_data():
df=pd.read_csv("covid_19.csv")
df.loc[df[df['Districts']==di].index.values,col]=val
df.to_csv("covid_19.csv",index=False)
def 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(" ==============================")
print("5.All data")
plt.ylabel("Confirmed Cases")
plt.show()
elif Y == 2:
plt.ylabel("Recovered Cases")
plt.show()
elif Y == 3:
plt.ylabel("Death Cases")
plt.show()
elif Y == 4:
plt.ylabel("Active Cases")
plt.show()
elif Y == 5:
plt.ylabel("Number of cases")
plt.legend()
plt.show()
elif Y==6:
main_menu()
else:
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(" ==============================")
Y=0
while Y!=5:
if Y == 1:
plt.ylabel("Confirmed Cases")
plt.show()
elif Y == 2:
plt.ylabel("Recovered Cases")
plt.show()
elif Y == 3:
plt.ylabel("Death Cases")
elif Y == 4:
plt.ylabel("Active Cases")
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.legend()
plt.show()
elif Y == 6:
D=np.arange(len(District))
width=0.25
plt.legend()
plt.show()
elif Y==7:
main_menu()
else:
main_menu()
def main_menu():
ch=0
print(" ==============================")
print(" ==============================")
while ch!=9:
print("""
1. Show DataFrame
5. Edit a record
6. Delete a record
7. Line Graph
8. Bar Graph
9. Exit
""")
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