100% found this document useful (1 vote)
6K views34 pages

Project-Report-Covid Data Analysis (Program)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 34

THE LEARNING STEM INTERNATIONAL SCHOOL

Board Practical Exam 2022-23


INFORMATICS PRACTICES (065)-XII

PROJECT REPORT

Submitted By- Submitted To-


Durgesh Chouhan Mr.Sudhir Ghagre
Roll no- (PGT)
Class-XII (A)

Page 1
DECLARATION

I Durgesh Chouhan, bearing roll no 1010, a student of Class XII The Learning Stem
International School hereby declare that I own the full responsibility for the

information, results etc. provided in this PROJECT titled “Covid Data Analysis”. It
has been developed successfully by using the Data Handling concepts like data
management, data visualization etc. provided in the programming language Python at
The Learning Stem International School in complete fulfillment of project (curriculum
of Central Board of Secondary Education CBSE of Informatics Practices (065)
conducted by CBSE, New Delhi for the academic session 2022-23.

I also declare that this project work has neither been submitted to any other board nor
published at any time by me in the past.

Durgesh
Chouhan
Roll No: 1010
Class 12
The Learning Stem International School

Page 2
This is to certify that the Informatics Practices project on Covid Data

Analysis has been successfully completed by Durgesh Chouhan of Class


XII, The Learning Stem International School for consideration in partial
fulfillment of curriculum of Central Board of Secondary Education (CBSE)
of Informatics Practices (065) for the award of Board Practical
Examination 2022-23.

I certify that this project is up to my expectation and as per the guidelines


issued by the CBSE.

(External Examiner)

(Internal Examiner) (Principal)

Page 3
ACKNOWLEDGEMENT

I take this opportunity to express my deep sense of gratitude to all those who
have been instrumental in preparation of this project.

I feel great pleasure to express my obligation to Ms. Kaushal Singh, Principal of


The Learning Stem International School.

I am also sincerely grateful to Mr. Sudhir Ghagre PGT (Informatics Practices),


The Learning Stem International School for his encouragement and valuable guidance
during the entire period of work.

I would also thank all of my parents and friends for their whole hearted support
and encouragement without with this project would not have been successful.

I could not forget Internet, Textbooks which provided me with sufficient matter
for reference.

Page 4
TABLE OF CONTENT

Sr No Topic Page No

Introduction 6

Problem Statement 7

Objective 8

Project Scope 9

System Requirement and Specification 10

Overview of Python 11

Overview of SQL 12

Project Module 13

Data Flow Diagram 14

Database Design and Table Structure 15

Python Code 19

Outputs 32

Data Analysis (using different graphs) 39

Conclusion 41

Bibliography 42

Page 5
INTRODUCTION

Corona virus disease 2019 (COVID-19) is a contagious disease caused by a virus,


the severe acute respiratory syndrome corona virus (SARS-CoV-2).The first known case
was identified in Wuhan, China, in December 2019.The disease quickly spread
worldwide, resulting in the COVID-19 pandemic.
Covid Data Analysis is all about COVID-19 pandemic and has done some analysis
on the data provided by Gujarat State. We also have seen some visualization of data
that is currently available, and also tried to predict the number of cases that are likely
to occur in future. These are just simple examples of possible reports that can help to
comprehend more easily the magnitude of what is happening. There are many factors
that can change these predictions. How the data is collected could affect the
predictions and in this dataset, currently, there are missing features that could help,
like statistics about age intervals of positives, recovers and deaths.

Covid Data Analysis is an application which refers to the data is updated daily,
for convenience. It can be used by Government to manage Covid using a computerized
system where they can manage details of districts, confirmed cases, recovered cases,
death and active cases. They can also analyze covid data by visualization.

Page 6
PROBLEM STATEMENT

For any Government Covid crisis management is one of the most important
department that must be well managed in order to run daily covid vaccination activity
smoothly. But mostly this is not able to manage data as they do not have good
computerized system. As a result they lacks in

 Security of data, documents or certificates related to covid vaccinations.


 Duplication of Data.
 Unable to keep single copy of data at single location which increases data
complexity
 Managing data consistency
 Accessing and referencing or search data quickly
 Unable to analyze data as there is no mechanism to visualize data

Page 7
OBJECTIVE

The objective of project is to build an application program to:

 Provide function to manage records of a people by government.


 Provide searching facility based on various factors.
 Reduce time and cost to control and manage Covid crisis reports.
 Reduce paperwork.
 Increased accuracy and reliability.
 Increased Data Consistency.
 Increased Data security.

This application program can be used easily by non-programming personals.

Page 8
PROJECT SCOPE

Managing all Covid crisis reports, districts, active case, death, confirmed cases and
recovered cases is a tedious job for anyone. To do it more effectively and correctly a
good Covid Data Analysis Application is required. This is provided by our application
which have following scope:

 ensures effective report on covid crisis control.


 manage daily recovery records easily and precisely
 can perform death, active, recovered, case analysis at the time of covid.
 user friendly interface
 very easy to use
 High level security of data.

Page 9
SYSTEM REQUIREMENT AND SPECIFICATIONS

Software Requirements:
Operating System Window-7 and later versions (32bit, 64 bit)
Language Python
Platform Python IDLE 3.7 (min)
Database CSV
MS Office MS Excel
Plotting Matplotlib

Hardware Requirements:
Processor Pentium Dual Core (min) 32bit or 64 bit
Hard-Disk 160GB (min)
RAM 1GB (min)

Input/output Requirements:
Input Mouse (any)
Input Keyboard (any)
Output Monitor (any)
Output Printer (any)

Page 10
OVERVIEW OF PYTHON

Python is a general purpose, dynamic, high-level, and interpreted programming


language. It supports Object Oriented programming approach to develop applications.
It is simple and easy to learn and provides lots of high-level data structures. Guido Van
Rossum is known as the founder of Python programming.

Features of Python:

 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 TECHTIPNOW, 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.

Page 11
OVERVIEW OF MYSQL

MySQL is a relational database management system (RDBMS). It is pronounced


as "My Sequel”. MySQL was originally founded and developed in Sweden by David
Axmark, Allan Larsson and Michael Widenius, who had worked together since the
1980s.

Characteristics of MySQL:

 MySQL is released under an open-source license so it is customizable.


 It requires no cost or payment for its usage.
 MySQL has superior speed, is easy to use and is reliable.
 MySQL uses a standard form of the well-known ANSI-SQL standards.
 MySQL is a platform independent application which works on many operating
systems like
 Windows, UNIX, LINUX etc. and have compatibility with many languages
including JAVA, C++, PHP, PERL, etc.
 MySQL is an easy to install RDBMS and is capable of handling large data sets.

Since MySQL is released under an open-source license, it does not require any cost or
payment for its usage. Anyone can download and use this software from specific
location on Internet.

Instead of MY SQL we can also use CSV Files for Data storage.

Page 12
PROJECT MODULES

Covid Data Analysis is divided into following modules:

Show Data Frame module: This module helps you to show data in Data Frame.

Data without index module: This module helps you to add, modify, and delete supplier
data.

Data in ascending order of Confirmed cases module: This module helps you to show data
In ascending order of confirmed cases.

Add district data into CSV module: This module is used to add
district data into CSV file.

Edit a record module: This module is used to edit records.

Delete a record Module: This module is used to delete records.

Line/Bar Graph: This module is used to generate visualize data by plotting charts.

Page 13
DATA FLOW DIAGRAM

PYTHON INTERFACE

ADMIN LOGIN

d fail
LOGIN CHECK
Success
MENU

DaFr Data Index Ascen District Exit


a ddin

ADD UDATE GRAPH DELETE

CSV File Data Store

Page 14
DATABASE DESIGN AND TABLE
STRUCTURES

Page 15
PYTHON
SOURCE CODE

Page 16
MAIN MODULE
import 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...")
Page 17
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")

Page 18
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.")

Page 19
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()

Page 20
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()

Page 21
elif ch==9:
print("Thank you for using our App, Bye Bye, See you again!!")
break
main_menu()

Page 22
PROGRAM
OUTPUT

Page 23
MAIN MENU

Page 24
DATA IN DATAFRAME

Page 25
DATA WITHOUT INDEX

Page 26
DATA IN ASCENDING ORDER OF CONFIRMED CASES

Page 27
ADD DISTRICT DATA INTO CSV

Page 28
EDIT A RECORD

Page 29
DELETE RECORD

Page 30
DATA
ANALYSIS
USING
LINE AND BAR
GRAPH

Page 31
Page 32
CONCLUSION

This Covid Data Analysis System is a simple desktop based application basically suitable
for small state. It has all basic elements which are used for managing data of small
state. We are successful in making the application where we can insert, delete,
update, search and analyze records as per need. This application also provides a
report including chart of people records to analyze the performance.

We strongly believe that the implementation of this system will surely benefit the
government organization.

Page 33
BIBLIOGRAPHY

References and Bibliography:

 Informatics Practices Class-XII NCERT Publication


 Informatics Practices Class-XII by Sumita Arora
 MySQL in a nutshell by Russell J. T. Dyer
 YouTube Channel techtipnow.
 www.geeksforgeeks.org
 www.ncert.co.in

Page 34

You might also like