COVID19.ipynb - Colab
COVID19.ipynb - Colab
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
url = 'https://covid.ourworldindata.org/data/owid-covid-data.csv'
df = pd.read_csv(url)
df.head()
2020-
0 AFG Asia Afghanistan 0.0 0.0 NaN 0.0
01-05
2020-
1 AFG Asia Afghanistan 0.0 0.0 NaN 0.0
01-06
2020-
2 AFG Asia Afghanistan 0.0 0.0 NaN 0.0
01-07
2020-
3 AFG Asia Afghanistan 0.0 0.0 NaN 0.0
01-08
2020-
4 AFG Asia Afghanistan 0.0 0.0 NaN 0.0
01-09
5 rows × 67 columns
df.info()
df.describe()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 429435 entries, 0 to 429434
Data columns (total 67 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 iso_code 429435 non-null object
1 continent 402910 non-null object
2 location 429435 non-null object
3 date 429435 non-null object
4 total_cases 411804 non-null float64
5 new_cases 410159 non-null float64
6 new_cases_smoothed 408929 non-null float64
7 total_deaths 411804 non-null float64
8 new_deaths 410608 non-null float64
9 new_deaths_smoothed 409378 non-null float64
10 total_cases_per_million 411804 non-null float64
11 new_cases_per_million 410159 non-null float64
12 new_cases_smoothed_per_million 408929 non-null float64
13 total_deaths_per_million 411804 non-null float64
14 new_deaths_per_million 410608 non-null float64
15 new_deaths_smoothed_per_million 409378 non-null float64
16 reproduction_rate 184817 non-null float64
17 icu_patients 39116 non-null float64
18 icu_patients_per_million 39116 non-null float64
19 hosp_patients 40656 non-null float64
20 hosp_patients_per_million 40656 non-null float64
21 weekly_icu_admissions 10993 non-null float64
22 weekly_icu_admissions_per_million 10993 non-null float64
23 weekly_hosp_admissions 24497 non-null float64
24 weekly_hosp_admissions_per_million 24497 non-null float64
25 total_tests 79387 non-null float64
26 new_tests 75403 non-null float64
27 total_tests_per_thousand 79387 non-null float64
28 new_tests_per_thousand 75403 non-null float64
29 new_tests_smoothed 103965 non-null float64
30 new_tests_smoothed_per_thousand 103965 non-null float64
31 positive_rate 95927 non-null float64
32 tests_per_case 94348 non-null float64
33 tests_units 106788 non-null object
34 total_vaccinations 85417 non-null float64
35 people_vaccinated 81132 non-null float64
36 people_fully_vaccinated 78061 non-null float64
37 total_boosters 53600 non-null float64
38 new_vaccinations 70971 non-null float64
39 new_vaccinations_smoothed 195029 non-null float64
40 total_vaccinations_per_hundred 85417 non-null float64
41 people_vaccinated_per_hundred 81132 non-null float64
42 people_fully_vaccinated_per_hundred 78061 non-null float64
43 total_boosters_per_hundred 53600 non-null float64
44 new_vaccinations_smoothed_per_million 195029 non-null float64
45 new_people_vaccinated_smoothed 192177 non-null float64
46 new_people_vaccinated_smoothed_per_hundred 192177 non-null float64
47 stringency_index 196190 non-null float64
48 population_density 360492 non-null float64
49 median_age 334663 non-null float64
50 aged_65_older 323270 non-null float64
51 aged_70_older 331315 non-null float64
52 gdp_per_capita 328292 non-null float64
53 extreme_poverty 211996 non-null float64
54 cardiovasc_death_rate 328865 non-null float64
55 diabetes_prevalence 345911 non-null float64
56 female_smokers 247165 non-null float64
57 male_smokers 243817 non-null float64
58 handwashing_facilities 161741 non-null float64
59 hospital_beds_per_thousand 290689 non-null float64
60 life_expectancy 390299 non-null float64
61 human_development_index 319127 non-null float64
62 population 429435 non-null int64
63 excess_mortality_cumulative_absolute 13411 non-null float64
64 excess_mortality_cumulative 13411 non-null float64
65 excess_mortality 13411 non-null float64
66 excess_mortality_cumulative_per_million 13411 non-null float64
dtypes: float64(61), int64(1), object(5)
memory usage: 219.5+ MB
total_cases new_cases new_cases_smoothed total_deaths new_deaths new_deaths_smo
8 rows × 62 columns
plt.figure(figsize=(12,6))
plt.plot(india_df['date'], india_df['new_cases'], label='Daily New Cases')
plt.title('Daily New COVID-19 Cases in India')
plt.xlabel('Date')
plt.ylabel('Number of Cases')
plt.legend()
plt.xticks(rotation=45)
plt.tight_layout()
plt.show()
plt.figure(figsize=(12,6))
plt.plot(india_df['date'], india_df['total_vaccinations'], color='green', label='Total Vaccinations')
plt.title('Total COVID-19 Vaccinations in India')
plt.xlabel('Date')
plt.ylabel('Number of Vaccinations')
plt.legend()
plt.xticks(rotation=45)
plt.tight_layout()
plt.show()