Covid_19
The World Health Organization (WHO) declared the novel human corona virus disease (COVID-19) outbreak, which began in Wuhan China on December 8, 2019, a Public Health Emergency of International Concern (PHEIC) on January 30, 2020 (WHO, 2020)The data is gotten from Our world in data and the data set can be downloaded from here
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.2
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(lubridate)
##
## Attaching package: 'lubridate'
##
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
library(dplyr)
library(scales)
##
## Attaching package: 'scales'
##
## The following object is masked from 'package:purrr':
##
## discard
##
## The following object is masked from 'package:readr':
##
## col_factor
covid_19_data <- read.csv("owid-covid-data.csv")
colnames(covid_19_data)
## [1] "iso_code"
## [2] "continent"
## [3] "location"
## [4] "date"
## [5] "total_cases"
## [6] "new_cases"
## [7] "new_cases_smoothed"
## [8] "total_deaths"
## [9] "new_deaths"
## [10] "new_deaths_smoothed"
## [11] "total_cases_per_million"
## [12] "new_cases_per_million"
## [13] "new_cases_smoothed_per_million"
## [14] "total_deaths_per_million"
## [15] "new_deaths_per_million"
## [16] "new_deaths_smoothed_per_million"
## [17] "reproduction_rate"
## [18] "icu_patients"
## [19] "icu_patients_per_million"
## [20] "hosp_patients"
## [21] "hosp_patients_per_million"
## [22] "weekly_icu_admissions"
## [23] "weekly_icu_admissions_per_million"
## [24] "weekly_hosp_admissions"
## [25] "weekly_hosp_admissions_per_million"
## [26] "total_tests"
## [27] "new_tests"
## [28] "total_tests_per_thousand"
## [29] "new_tests_per_thousand"
## [30] "new_tests_smoothed"
## [31] "new_tests_smoothed_per_thousand"
## [32] "positive_rate"
## [33] "tests_per_case"
## [34] "tests_units"
## [35] "total_vaccinations"
## [36] "people_vaccinated"
## [37] "people_fully_vaccinated"
## [38] "total_boosters"
## [39] "new_vaccinations"
## [40] "new_vaccinations_smoothed"
## [41] "total_vaccinations_per_hundred"
## [42] "people_vaccinated_per_hundred"
## [43] "people_fully_vaccinated_per_hundred"
## [44] "total_boosters_per_hundred"
## [45] "new_vaccinations_smoothed_per_million"
## [46] "new_people_vaccinated_smoothed"
## [47] "new_people_vaccinated_smoothed_per_hundred"
## [48] "stringency_index"
## [49] "population_density"
## [50] "median_age"
## [51] "aged_65_older"
## [52] "aged_70_older"
## [53] "gdp_per_capita"
## [54] "extreme_poverty"
## [55] "cardiovasc_death_rate"
## [56] "diabetes_prevalence"
## [57] "female_smokers"
## [58] "male_smokers"
## [59] "handwashing_facilities"
## [60] "hospital_beds_per_thousand"
## [61] "life_expectancy"
## [62] "human_development_index"
## [63] "population"
## [64] "excess_mortality_cumulative_absolute"
## [65] "excess_mortality_cumulative"
## [66] "excess_mortality"
## [67] "excess_mortality_cumulative_per_million"
str(covid_19_data)
Create a dataframe with the needed columns needed
Covid19_data_v2 <- covid_19_data %>%
select(c(continent,location,date,total_cases,new_cases,total_deaths,new_deaths
,total_tests,new_tests,total_vaccinations,people_vaccinated,people_fully_vaccinated
,total_boosters,gdp_per_capita,life_expectancy,population))
colnames(Covid19_data_v2)
## [1] "continent" "location"
## [3] "date" "total_cases"
## [5] "new_cases" "total_deaths"
## [7] "new_deaths" "total_tests"
## [9] "new_tests" "total_vaccinations"
## [11] "people_vaccinated" "people_fully_vaccinated"
## [13] "total_boosters" "gdp_per_capita"
## [15] "life_expectancy" "population"
Visualization of some of the column to check for over aggregated values and their subsequent removals
unique(Covid19_data_v2$location)
## [1] "Afghanistan" "Africa"
## [3] "Albania" "Algeria"
## [5] "Andorra" "Angola"
## [7] "Anguilla" "Antigua and Barbuda"
## [9] "Argentina" "Armenia"
## [11] "Aruba" "Asia"
## [13] "Australia" "Austria"
## [15] "Azerbaijan" "Bahamas"
## [17] "Bahrain" "Bangladesh"
## [19] "Barbados" "Belarus"
## [21] "Belgium" "Belize"
## [23] "Benin" "Bermuda"
## [25] "Bhutan" "Bolivia"
## [27] "Bonaire Sint Eustatius and Saba" "Bosnia and Herzegovina"
## [29] "Botswana" "Brazil"
## [31] "British Virgin Islands" "Brunei"
## [33] "Bulgaria" "Burkina Faso"
## [35] "Burundi" "Cambodia"
## [37] "Cameroon" "Canada"
## [39] "Cape Verde" "Cayman Islands"
## [41] "Central African Republic" "Chad"
## [43] "Chile" "China"
## [45] "Colombia" "Comoros"
## [47] "Congo" "Cook Islands"
## [49] "Costa Rica" "Cote d'Ivoire"
## [51] "Croatia" "Cuba"
## [53] "Curacao" "Cyprus"
## [55] "Czechia" "Democratic Republic of Congo"
## [57] "Denmark" "Djibouti"
## [59] "Dominica" "Dominican Republic"
## [61] "Ecuador" "Egypt"
## [63] "El Salvador" "England"
## [65] "Equatorial Guinea" "Eritrea"
## [67] "Estonia" "Eswatini"
## [69] "Ethiopia" "Europe"
## [71] "European Union" "Faeroe Islands"
## [73] "Falkland Islands" "Fiji"
## [75] "Finland" "France"
## [77] "French Polynesia" "Gabon"
## [79] "Gambia" "Georgia"
## [81] "Germany" "Ghana"
## [83] "Gibraltar" "Greece"
## [85] "Greenland" "Grenada"
## [87] "Guam" "Guatemala"
## [89] "Guernsey" "Guinea"
## [91] "Guinea-Bissau" "Guyana"
## [93] "Haiti" "High income"
## [95] "Honduras" "Hong Kong"
## [97] "Hungary" "Iceland"
## [99] "India" "Indonesia"
## [101] "International" "Iran"
## [103] "Iraq" "Ireland"
## [105] "Isle of Man" "Israel"
## [107] "Italy" "Jamaica"
## [109] "Japan" "Jersey"
## [111] "Jordan" "Kazakhstan"
## [113] "Kenya" "Kiribati"
## [115] "Kosovo" "Kuwait"
## [117] "Kyrgyzstan" "Laos"
## [119] "Latvia" "Lebanon"
## [121] "Lesotho" "Liberia"
## [123] "Libya" "Liechtenstein"
## [125] "Lithuania" "Low income"
## [127] "Lower middle income" "Luxembourg"
## [129] "Macao" "Madagascar"
## [131] "Malawi" "Malaysia"
## [133] "Maldives" "Mali"
## [135] "Malta" "Marshall Islands"
## [137] "Mauritania" "Mauritius"
## [139] "Mexico" "Micronesia (country)"
## [141] "Moldova" "Monaco"
## [143] "Mongolia" "Montenegro"
## [145] "Montserrat" "Morocco"
## [147] "Mozambique" "Myanmar"
## [149] "Namibia" "Nauru"
## [151] "Nepal" "Netherlands"
## [153] "New Caledonia" "New Zealand"
## [155] "Nicaragua" "Niger"
## [157] "Nigeria" "Niue"
## [159] "North America" "North Korea"
## [161] "North Macedonia" "Northern Cyprus"
## [163] "Northern Ireland" "Northern Mariana Islands"
## [165] "Norway" "Oceania"
## [167] "Oman" "Pakistan"
## [169] "Palau" "Palestine"
## [171] "Panama" "Papua New Guinea"
## [173] "Paraguay" "Peru"
## [175] "Philippines" "Pitcairn"
## [177] "Poland" "Portugal"
## [179] "Puerto Rico" "Qatar"
## [181] "Romania" "Russia"
## [183] "Rwanda" "Saint Helena"
## [185] "Saint Kitts and Nevis" "Saint Lucia"
## [187] "Saint Pierre and Miquelon" "Saint Vincent and the Grenadines"
## [189] "Samoa" "San Marino"
## [191] "Sao Tome and Principe" "Saudi Arabia"
## [193] "Scotland" "Senegal"
## [195] "Serbia" "Seychelles"
## [197] "Sierra Leone" "Singapore"
## [199] "Sint Maarten (Dutch part)" "Slovakia"
## [201] "Slovenia" "Solomon Islands"
## [203] "Somalia" "South Africa"
## [205] "South America" "South Korea"
## [207] "South Sudan" "Spain"
## [209] "Sri Lanka" "Sudan"
## [211] "Suriname" "Sweden"
## [213] "Switzerland" "Syria"
## [215] "Taiwan" "Tajikistan"
## [217] "Tanzania" "Thailand"
## [219] "Timor" "Togo"
## [221] "Tokelau" "Tonga"
## [223] "Trinidad and Tobago" "Tunisia"
## [225] "Turkey" "Turkmenistan"
## [227] "Turks and Caicos Islands" "Tuvalu"
## [229] "Uganda" "Ukraine"
## [231] "United Arab Emirates" "United Kingdom"
## [233] "United States" "United States Virgin Islands"
## [235] "Upper middle income" "Uruguay"
## [237] "Uzbekistan" "Vanuatu"
## [239] "Vatican" "Venezuela"
## [241] "Vietnam" "Wales"
## [243] "Wallis and Futuna" "Western Sahara"
## [245] "World" "Yemen"
## [247] "Zambia" "Zimbabwe"
unique(Covid19_data_v2$continent)
## [1] "Asia" "" "Europe" "Africa"
## [5] "North America" "South America" "Oceania"
Removal of some data from the location(countries) column
Covid19_data_v2 = filter(Covid19_data_v2, !(location %in% c("Africa", "Asia","Europe","International","Lower middle income","North America","South America","Upper middle income","World","United Kingdom","Low income","Oceania","High income","European Union")))
Removal of some data from the continent column
Covid19_data_v2 = filter(Covid19_data_v2, !(continent %in% c("")))
aggregate the data on days, weeks and months
Covid19_data_v2$date<- as.Date(Covid19_data_v2$date)
Covid19_data_v2$Year <- format(as.Date(Covid19_data_v2$date), "%Y")
Covid19_data_v2$Month <- format(as.Date(Covid19_data_v2$date), "%B")
Covid19_data_v2$day_of_the_week <- format(as.Date(Covid19_data_v2$date),"%A")
Data are now stored and aggregated ready for analysis
Covid19_data_v2 %>%
summarise(TotalTest = sum(new_tests, na.rm = TRUE))
## TotalTest
## 1 4571039184
Covid19_data_v2 %>%
summarise(TotalCases = sum(new_cases,na.rm=TRUE))
## TotalCases
## 1 645574973
TotalDeath <- TotalDeath <- Covid19_data_v2 %>%
summarise(TotalDeath = sum(new_deaths,na.rm = TRUE))
Covid19_data_v2 %>%
group_by(Year) %>%
summarise(NumberOfCases = sum(new_cases, na.rm = TRUE))
## # A tibble: 4 × 2
## Year NumberOfCases
## <chr> <dbl>
## 1 2020 80581042
## 2 2021 194825255
## 3 2022 360069314
## 4 2023 10099362
Covid19_data_v2 %>%
group_by(Year,continent) %>%
summarise(NumberOfDeath = sum(new_deaths, na.rm = TRUE)) %>%
arrange(desc(NumberOfDeath))
## `summarise()` has grouped output by 'Year'. You can override using the
## `.groups` argument.
## # A tibble: 24 × 3
## # Groups: Year [4]
## Year continent NumberOfDeath
## <chr> <chr> <dbl>
## 1 2021 Asia 914815
## 2 2021 Europe 911476
## 3 2021 South America 765948
## 4 2021 North America 706613
## 5 2020 North America 508745
## 6 2020 Europe 474152
## 7 2020 South America 413261
## 8 2022 Europe 402732
## 9 2020 Asia 337086
## 10 2022 North America 330828
## # … with 14 more rows
Covid19_data_v2 %>%
group_by(Month) %>%
summarise(NumberOfCases = sum(new_cases, na.rm = TRUE))
## # A tibble: 12 × 2
## Month NumberOfCases
## <chr> <dbl>
## 1 April 49110981
## 2 August 51818814
## 3 December 58657682
## 4 February 67650202
## 5 January 114459973
## 6 July 50836210
## 7 June 32757296
## 8 March 64496021
## 9 May 38447319
## 10 November 43495059
## 11 October 35953286
## 12 September 37892130
Covid19_data_v2 %>%
group_by(day_of_the_week) %>%
summarise(NumberOfCases = sum(new_cases, na.rm = TRUE))
## # A tibble: 7 × 2
## day_of_the_week NumberOfCases
## <chr> <dbl>
## 1 Friday 103561667
## 2 Monday 89908232
## 3 Saturday 74823015
## 4 Sunday 63284464
## 5 Thursday 105473688
## 6 Tuesday 101886172
## 7 Wednesday 106637735
Covid19_data_v2 %>%
group_by(continent) %>%
summarise(covid_death = sum(new_deaths , na.rm = TRUE), covid_cases = sum(new_cases, na.rm = TRUE), deathpercent = (covid_death / TotalDeath) * 100 ) %>%
arrange(desc(covid_death))
## # A tibble: 6 × 4
## continent covid_death covid_cases deathpercent$TotalDeath
## <chr> <dbl> <dbl> <dbl>
## 1 Europe 1805925 222865750 27.5
## 2 Asia 1604314 207721771 24.4
## 3 North America 1564372 121068956 23.8
## 4 South America 1322665 67512924 20.1
## 5 Africa 257686 12486664 3.92
## 6 Oceania 23607 13918908 0.359
Covid19_data_v2 %>%
group_by(location) %>%
filter(!location == "North Korea") %>%
summarise(covid_death = sum(new_deaths , na.rm = TRUE), covid_cases = sum(new_cases, na.rm = TRUE), deathpercent = (covid_death / covid_cases) * 100) %>%
arrange(desc(deathpercent)) %>%
print(n = 234)
## # A tibble: 233 × 4
## location covid_death covid_cases deathpercent
## <chr> <dbl> <dbl> <dbl>
## 1 Yemen 2159 11946 18.1
## 2 Sudan 5001 63755 7.84
## 3 Syria 3164 57453 5.51
## 4 Somalia 1362 27318 4.99
## 5 Peru 219758 4486062 4.90
## 6 Egypt 24805 515645 4.81
## 7 Mexico 325178 7369400 4.41
## 8 China 83201 2023378 4.11
## 9 Bosnia and Herzegovina 16277 401384 4.06
## 10 Afghanistan 7882 208553 3.78
## 11 Liberia 294 8188 3.59
## 12 Niger 315 9512 3.31
## 13 Malawi 2897 88611 3.27
## 14 Macao 120 3751 3.20
## 15 Myanmar 19491 633820 3.08
## 16 Bulgaria 38179 1295426 2.95
## 17 Gambia 372 12686 2.93
## 18 North Macedonia 9639 346452 2.78
## 19 Tunisia 29312 1150929 2.55
## 20 Algeria 6881 271378 2.54
## 21 Chad 194 7652 2.54
## 22 South Africa 102272 4037380 2.53
## 23 Haiti 861 34111 2.52
## 24 Sri Lanka 16828 671989 2.50
## 25 Paraguay 19820 806256 2.46
## 26 Indonesia 160814 6730016 2.39
## 27 Honduras 11198 470777 2.38
## 28 Namibia 4089 171983 2.38
## 29 Trinidad and Tobago 4326 187908 2.30
## 30 Jamaica 3480 153407 2.27
## 31 Mali 743 32783 2.27
## 32 Senegal 1996 88902 2.25
## 33 Colombia 142186 6352923 2.24
## 34 Hungary 48658 2191827 2.22
## 35 Bahamas 833 37539 2.22
## 36 Cambodia 3056 138693 2.20
## 37 Ecuador 23304 1062712 2.19
## 38 Zimbabwe 5652 261612 2.16
## 39 Uganda 3636 170505 2.13
## 40 El Salvador 4230 201877 2.10
## 41 Ukraine 118974 5679371 2.09
## 42 Madagascar 1419 67834 2.09
## 43 Lesotho 723 34790 2.08
## 44 Romania 67576 3325006 2.03
## 45 Tanzania 846 42664 1.98
## 46 Guinea-Bissau 176 8947 1.97
## 47 Armenia 8719 446008 1.95
## 48 Pakistan 30640 1576312 1.94
## 49 Eswatini 1422 74133 1.92
## 50 Iran 144749 7564350 1.91
## 51 Moldova 11369 598673 1.90
## 52 Brazil 697157 36719634 1.90
## 53 Bolivia 22346 1187986 1.88
## 54 Poland 118727 6379391 1.86
## 55 Angola 1934 105184 1.84
## 56 Comoros 163 8992 1.81
## 57 Burkina Faso 396 22025 1.80
## 58 Russia 387113 21640952 1.79
## 59 Guyana 1294 72965 1.77
## 60 Suriname 1398 82020 1.70
## 61 Kyrgyzstan 3434 206592 1.66
## 62 Kenya 5688 342810 1.66
## 63 Congo 419 25375 1.65
## 64 Guatemala 20109 1227853 1.64
## 65 Sierra Leone 126 7760 1.62
## 66 Philippines 65787 4073861 1.61
## 67 Antigua and Barbuda 146 9108 1.60
## 68 Cameroon 1965 123993 1.58
## 69 Nicaragua 246 15569 1.58
## 70 Mauritania 997 63696 1.57
## 71 Democratic Republic of Congo 1463 95514 1.53
## 72 Ethiopia 7572 499531 1.52
## 73 Bangladesh 29442 2037556 1.44
## 74 Papua New Guinea 670 46766 1.43
## 75 Croatia 17877 1267580 1.41
## 76 Saint Lucia 409 29803 1.37
## 77 Argentina 130421 10037135 1.30
## 78 Sao Tome and Principe 81 6283 1.29
## 79 Fiji 885 68820 1.29
## 80 Morocco 16296 1272240 1.28
## 81 Libya 6440 507162 1.27
## 82 Kazakhstan 19346 1556948 1.24
## 83 Guinea 467 38240 1.22
## 84 Azerbaijan 10085 827969 1.22
## 85 Grenada 238 19697 1.21
## 86 Djibouti 189 15690 1.20
## 87 Nepal 12020 1001101 1.20
## 88 Zambia 4047 340763 1.19
## 89 Nigeria 3160 266493 1.19
## 90 Kosovo 3203 272547 1.18
## 91 India 523367 44686058 1.17
## 92 Saudi Arabia 9574 827962 1.16
## 93 Canada 50921 4580075 1.11
## 94 Saint Vincent and the Grenadines 123 11129 1.11
## 95 Rwanda 1468 133116 1.10
## 96 United States 1108990 102345675 1.08
## 97 Albania 3596 334167 1.08
## 98 Oman 4260 399449 1.07
## 99 Venezuela 5851 551587 1.06
## 100 Equatorial Guinea 183 17287 1.06
## 101 Iraq 25375 2465545 1.03
## 102 Eritrea 103 10189 1.01
## 103 Chile 51521 5118981 1.01
## 104 Belize 692 70660 0.979
## 105 Mozambique 2268 232010 0.978
## 106 Montenegro 2798 286355 0.977
## 107 Cote d'Ivoire 833 88016 0.946
## 108 Georgia 16926 1814180 0.933
## 109 Czechia 42337 4603363 0.920
## 110 Lebanon 10790 1228639 0.878
## 111 British Virgin Islands 64 7305 0.876
## 112 Sweden 23535 2693458 0.874
## 113 Botswana 2882 331187 0.870
## 114 Spain 119437 13817949 0.864
## 115 Ghana 1462 171112 0.854
## 116 Bermuda 157 18766 0.837
## 117 Panama 8596 1029701 0.835
## 118 French Polynesia 649 77966 0.832
## 119 Palestine 5708 703228 0.812
## 120 Jordan 14122 1747107 0.808
## 121 Slovakia 20942 2665001 0.786
## 122 Costa Rica 9162 1186176 0.772
## 123 Cuba 8531 1112438 0.767
## 124 Aruba 341 44847 0.760
## 125 South Sudan 138 18368 0.751
## 126 Lithuania 9563 1296852 0.737
## 127 Togo 290 39354 0.737
## 128 Uruguay 7609 1032731 0.737
## 129 Central African Republic 113 15368 0.735
## 130 Italy 186864 25453937 0.734
## 131 Malaysia 36964 5036701 0.734
## 132 Belgium 33674 4691499 0.718
## 133 Thailand 33940 4736324 0.717
## 134 Belarus 7118 994037 0.716
## 135 Serbia 17704 2480618 0.714
## 136 Malta 826 117104 0.705
## 137 Tajikistan 125 17786 0.703
## 138 Saint Kitts and Nevis 46 6592 0.698
## 139 Dominican Republic 4384 660095 0.664
## 140 Cape Verde 414 63229 0.655
## 141 Curacao 301 45986 0.655
## 142 Uzbekistan 1637 250567 0.653
## 143 Montserrat 9 1403 0.641
## 144 Latvia 6221 975282 0.638
## 145 Greece 34779 5548487 0.627
## 146 Solomon Islands 154 24578 0.627
## 147 Turkey 101492 16219497 0.626
## 148 Gabon 306 48981 0.625
## 149 Timor 138 23420 0.589
## 150 Turks and Caicos Islands 38 6523 0.583
## 151 Finland 8455 1458619 0.580
## 152 Benin 163 28198 0.578
## 153 Gibraltar 111 20422 0.544
## 154 Barbados 571 106157 0.538
## 155 Slovenia 7066 1321579 0.535
## 156 San Marino 122 23427 0.521
## 157 Ireland 8481 1708691 0.496
## 158 Estonia 2921 614673 0.475
## 159 Dominica 74 15794 0.469
## 160 Portugal 26022 5564068 0.468
## 161 Hong Kong 13333 2876130 0.464
## 162 Germany 165720 37779833 0.439
## 163 Liechtenstein 90 21353 0.421
## 164 Monaco 68 16161 0.421
## 165 France 164711 40017876 0.412
## 166 Vietnam 43190 10967557 0.394
## 167 New Caledonia 314 80294 0.391
## 168 Kuwait 2570 662858 0.388
## 169 Luxembourg 1213 316079 0.384
## 170 Austria 21794 5793169 0.376
## 171 Bonaire Sint Eustatius and Saba 43 11783 0.365
## 172 Kiribati 18 5012 0.359
## 173 Mauritius 1043 294744 0.354
## 174 Andorra 167 47839 0.349
## 175 Laos 759 217975 0.348
## 176 Seychelles 172 50670 0.339
## 177 Anguilla 13 3904 0.333
## 178 Switzerland 14396 4407915 0.327
## 179 Norway 4771 1477856 0.323
## 180 Isle of Man 116 38008 0.305
## 181 Netherlands 23103 8593371 0.269
## 182 Micronesia (country) 61 23201 0.263
## 183 Israel 12206 4787410 0.255
## 184 Denmark 8091 3401781 0.238
## 185 United Arab Emirates 2348 1049409 0.224
## 186 Bahrain 1543 700452 0.220
## 187 Mongolia 2136 1009288 0.212
## 188 Japan 68109 32555045 0.209
## 189 Wallis and Futuna 7 3427 0.204
## 190 Cyprus 1287 642663 0.200
## 191 Greenland 22 11972 0.184
## 192 Samoa 29 16087 0.180
## 193 Taiwan 16308 9537825 0.171
## 194 Maldives 311 185715 0.167
## 195 Australia 18270 11324876 0.161
## 196 Palau 9 5986 0.150
## 197 Qatar 686 492482 0.139
## 198 Cayman Islands 38 31472 0.121
## 199 Vanuatu 14 12027 0.116
## 200 New Zealand 2494 2183101 0.114
## 201 South Korea 33486 30197065 0.111
## 202 Marshall Islands 17 15585 0.109
## 203 Iceland 206 208962 0.0986
## 204 Brunei 225 276085 0.0815
## 205 Faeroe Islands 28 34658 0.0808
## 206 Tonga 13 16734 0.0777
## 207 Singapore 1722 2217110 0.0777
## 208 Burundi 38 53355 0.0712
## 209 Saint Pierre and Miquelon 2 3454 0.0579
## 210 Bhutan 21 62605 0.0335
## 211 Cook Islands 2 6999 0.0286
## 212 Nauru 1 4621 0.0216
## 213 Falkland Islands 0 1932 0
## 214 Saint Helena 0 2522 0
## 215 Tuvalu 0 2828 0
## 216 Vatican 0 29 0
## 217 England 0 0 NaN
## 218 Guam 0 0 NaN
## 219 Guernsey 0 0 NaN
## 220 Jersey 0 0 NaN
## 221 Niue 0 0 NaN
## 222 Northern Cyprus 0 0 NaN
## 223 Northern Ireland 0 0 NaN
## 224 Northern Mariana Islands 0 0 NaN
## 225 Pitcairn 0 0 NaN
## 226 Puerto Rico 0 0 NaN
## 227 Scotland 0 0 NaN
## 228 Sint Maarten (Dutch part) 0 0 NaN
## 229 Tokelau 0 0 NaN
## 230 Turkmenistan 0 0 NaN
## 231 United States Virgin Islands 0 0 NaN
## 232 Wales 0 0 NaN
## 233 Western Sahara 0 0 NaN
Covid19_data_v2 %>%
group_by(continent) %>%
summarise(totalCases = sum(new_cases,na.rm = TRUE), totalTest = sum(new_tests,na.rm = TRUE), TestpercentagePositive = (totalCases / totalTest) * 100) %>%
arrange(desc(TestpercentagePositive))
## # A tibble: 6 × 4
## continent totalCases totalTest TestpercentagePositive
## <chr> <dbl> <dbl> <dbl>
## 1 South America 67512924 163548802 41.3
## 2 Africa 12486664 61532819 20.3
## 3 Oceania 13918908 78409471 17.8
## 4 Europe 222865750 1452051236 15.3
## 5 North America 121068956 1017159368 11.9
## 6 Asia 207721771 1798337488 11.6
Covid19_data_v2 %>%
group_by(location) %>%
summarise(totalCases = sum(new_cases,na.rm = TRUE), totalTest = sum(new_tests,na.rm = TRUE), PositiveTestpercentage = (totalCases / totalTest) * 100) %>%
arrange(desc(totalTest)) %>%
print(n = 234)
## # A tibble: 234 × 4
## location totalCases totalTest PositiveTestpercentage
## <chr> <dbl> <dbl> <dbl>
## 1 United States 102345675 912769124 11.2
## 2 India 44686058 838798638 5.33
## 3 France 40017876 278234000 14.4
## 4 Italy 25453937 224719845 11.3
## 5 Austria 5793169 188768459 3.07
## 6 United Arab Emirates 1049409 168522672 0.623
## 7 Turkey 16219497 163164533 9.94
## 8 Russia 21640952 156015815 13.9
## 9 South Korea 30197065 100269452 30.1
## 10 Spain 13817949 93162168 14.8
## 11 Australia 11324876 73363499 15.4
## 12 Denmark 3401781 64649913 5.26
## 13 Canada 4580075 62175498 7.37
## 14 Malaysia 5036701 60647556 8.30
## 15 Czechia 4603363 54587458 8.43
## 16 Japan 32555045 53504941 60.8
## 17 Israel 4787410 51780014 9.25
## 18 Indonesia 6730016 51528978 13.1
## 19 Slovakia 2665001 51238482 5.20
## 20 Greece 5548487 48561395 11.4
## 21 Saudi Arabia 827962 43251385 1.91
## 22 Portugal 5564068 42825406 13.0
## 23 Chile 5118981 39773213 12.9
## 24 Brazil 36719634 37005491 99.2
## 25 Argentina 10037135 36663990 27.4
## 26 Belgium 4691499 34315605 13.7
## 27 Colombia 6352923 34044326 18.7
## 28 Netherlands 8593371 30687346 28.0
## 29 Cyprus 642663 29495854 2.18
## 30 Vietnam 10967557 29193899 37.6
## 31 Philippines 4073861 27817521 14.6
## 32 South Africa 4037380 24811256 16.3
## 33 Thailand 4736324 24733803 19.1
## 34 Switzerland 4407915 21277734 20.7
## 35 Pakistan 1576312 21077138 7.48
## 36 Sweden 2693458 18407585 14.6
## 37 Iran 7564350 18074432 41.9
## 38 Mexico 7369400 15569464 47.3
## 39 Singapore 2217110 14598500 15.2
## 40 Bangladesh 2037556 13820904 14.7
## 41 Georgia 1814180 13652505 13.3
## 42 Ukraine 5679371 13377389 42.5
## 43 Taiwan 9537825 13021521 73.2
## 44 Iraq 2465545 12996351 19.0
## 45 Ireland 1708691 12340856 13.8
## 46 Kazakhstan 1556948 11792426 13.2
## 47 Norway 1477856 11154564 13.2
## 48 Finland 1458619 11038890 13.2
## 49 Hungary 2191827 10943720 20.0
## 50 Morocco 1272240 10487705 12.1
## 51 Serbia 2480618 9852866 25.2
## 52 Lithuania 1296852 8718186 14.9
## 53 Sri Lanka 671989 7691045 8.74
## 54 Qatar 492482 7574423 6.50
## 55 Jordan 1747107 7567593 23.1
## 56 Kuwait 662858 7379048 8.98
## 57 Latvia 975282 7263566 13.4
## 58 Nepal 1001101 6402903 15.6
## 59 Uruguay 1032731 6086630 17.0
## 60 Bahrain 700452 5935525 11.8
## 61 Panama 1029701 5650767 18.2
## 62 Mongolia 1009288 5490193 18.4
## 63 Slovenia 1321579 5336373 24.8
## 64 Cuba 1112438 5296244 21.0
## 65 Myanmar 633820 4656460 13.6
## 66 Bolivia 1187986 4438270 26.8
## 67 Luxembourg 316079 4299880 7.35
## 68 New Zealand 2183101 4258074 51.3
## 69 Guatemala 1227853 4067775 30.2
## 70 Rwanda 133116 4029152 3.30
## 71 Costa Rica 1186176 3677525 32.3
## 72 Ethiopia 499531 3585129 13.9
## 73 Bulgaria 1295426 3430255 37.8
## 74 Estonia 614673 3425064 17.9
## 75 Zambia 340763 3412336 9.99
## 76 Armenia 446008 3102267 14.4
## 77 Palestine 703228 3050518 23.1
## 78 Puerto Rico 0 3019115 0
## 79 Ecuador 1062712 2855228 37.2
## 80 Croatia 1267580 2726155 46.5
## 81 Paraguay 806256 2597470 31.0
## 82 Moldova 598673 2560337 23.4
## 83 Maldives 185715 2211113 8.40
## 84 Uganda 170505 2120320 8.04
## 85 Libya 507162 1980537 25.6
## 86 El Salvador 201877 1921625 10.5
## 87 Zimbabwe 261612 1869683 14.0
## 88 Malta 117104 1837038 6.37
## 89 Azerbaijan 827969 1716435 48.2
## 90 Bhutan 62605 1711669 3.66
## 91 Albania 334167 1613870 20.7
## 92 Dominican Republic 660095 1524332 43.3
## 93 Belarus 994037 1448467 68.6
## 94 Iceland 208962 1373785 15.2
## 95 Ghana 171112 1325017 12.9
## 96 Cote d'Ivoire 88016 1210395 7.27
## 97 Senegal 88902 1102099 8.07
## 98 Bosnia and Herzegovina 401384 1043518 38.5
## 99 Laos 217975 1030237 21.2
## 100 Tunisia 1150929 1001807 115.
## 101 Mozambique 232010 944051 24.6
## 102 Namibia 171983 847071 20.3
## 103 North Macedonia 346452 799331 43.3
## 104 Togo 39354 708063 5.56
## 105 Nigeria 266493 702055 38.0
## 106 Trinidad and Tobago 187908 666279 28.2
## 107 Kenya 342810 610432 56.2
## 108 Jamaica 153407 552068 27.8
## 109 Kosovo 272547 421855 64.6
## 110 Fiji 68820 402088 17.1
## 111 Guam 0 323516 0
## 112 Cambodia 138693 320474 43.3
## 113 Cape Verde 63229 284917 22.2
## 114 Lebanon 1228639 237492 517.
## 115 Madagascar 67834 125476 54.1
## 116 United States Virgin Islands 0 115079 0
## 117 Gabon 48981 93986 52.1
## 118 Liechtenstein 21353 90632 23.6
## 119 Suriname 82020 84184 97.4
## 120 Malawi 88611 83230 106.
## 121 Northern Mariana Islands 0 59110 0
## 122 South Sudan 18368 58902 31.2
## 123 Mauritania 63696 45205 141.
## 124 Bahamas 37539 43736 85.8
## 125 Bermuda 18766 41927 44.8
## 126 Angola 105184 28136 374.
## 127 Curacao 45986 22100 208.
## 128 Botswana 331187 19426 1705.
## 129 Burundi 53355 18945 282.
## 130 Equatorial Guinea 17287 17420 99.2
## 131 Saint Kitts and Nevis 6592 15627 42.2
## 132 Cayman Islands 31472 9358 336.
## 133 Timor 23420 9154 256.
## 134 Faeroe Islands 34658 7060 491.
## 135 Barbados 106157 6351 1672.
## 136 Sao Tome and Principe 6283 4694 134.
## 137 Dominica 15794 4032 392.
## 138 North Korea 1 3189 0.0314
## 139 Grenada 19697 3187 618.
## 140 Marshall Islands 15585 3184 489.
## 141 Belize 70660 2924 2417.
## 142 Saint Vincent and the Grenadines 11129 2278 489.
## 143 Niger 9512 1713 555.
## 144 Saint Lucia 29803 1562 1908.
## 145 Djibouti 15690 1233 1273.
## 146 Aruba 44847 793 5655.
## 147 Mali 32783 605 5419.
## 148 Haiti 34111 598 5704.
## 149 Brunei 276085 581 47519.
## 150 Lesotho 34790 553 6291.
## 151 Burkina Faso 22025 547 4027.
## 152 Gibraltar 20422 514 3973.
## 153 Guinea-Bissau 8947 390 2294.
## 154 Eswatini 74133 333 22262.
## 155 Afghanistan 208553 0 Inf
## 156 Algeria 271378 0 Inf
## 157 Andorra 47839 0 Inf
## 158 Anguilla 3904 0 Inf
## 159 Antigua and Barbuda 9108 0 Inf
## 160 Benin 28198 0 Inf
## 161 Bonaire Sint Eustatius and Saba 11783 0 Inf
## 162 British Virgin Islands 7305 0 Inf
## 163 Cameroon 123993 0 Inf
## 164 Central African Republic 15368 0 Inf
## 165 Chad 7652 0 Inf
## 166 China 2023378 0 Inf
## 167 Comoros 8992 0 Inf
## 168 Congo 25375 0 Inf
## 169 Cook Islands 6999 0 Inf
## 170 Democratic Republic of Congo 95514 0 Inf
## 171 Egypt 515645 0 Inf
## 172 England 0 0 NaN
## 173 Eritrea 10189 0 Inf
## 174 Falkland Islands 1932 0 Inf
## 175 French Polynesia 77966 0 Inf
## 176 Gambia 12686 0 Inf
## 177 Germany 37779833 0 Inf
## 178 Greenland 11972 0 Inf
## 179 Guernsey 0 0 NaN
## 180 Guinea 38240 0 Inf
## 181 Guyana 72965 0 Inf
## 182 Honduras 470777 0 Inf
## 183 Hong Kong 2876130 0 Inf
## 184 Isle of Man 38008 0 Inf
## 185 Jersey 0 0 NaN
## 186 Kiribati 5012 0 Inf
## 187 Kyrgyzstan 206592 0 Inf
## 188 Liberia 8188 0 Inf
## 189 Macao 3751 0 Inf
## 190 Mauritius 294744 0 Inf
## 191 Micronesia (country) 23201 0 Inf
## 192 Monaco 16161 0 Inf
## 193 Montenegro 286355 0 Inf
## 194 Montserrat 1403 0 Inf
## 195 Nauru 4621 0 Inf
## 196 New Caledonia 80294 0 Inf
## 197 Nicaragua 15569 0 Inf
## 198 Niue 0 0 NaN
## 199 Northern Cyprus 0 0 NaN
## 200 Northern Ireland 0 0 NaN
## 201 Oman 399449 0 Inf
## 202 Palau 5986 0 Inf
## 203 Papua New Guinea 46766 0 Inf
## 204 Peru 4486062 0 Inf
## 205 Pitcairn 0 0 NaN
## 206 Poland 6379391 0 Inf
## 207 Romania 3325006 0 Inf
## 208 Saint Helena 2522 0 Inf
## 209 Saint Pierre and Miquelon 3454 0 Inf
## 210 Samoa 16087 0 Inf
## 211 San Marino 23427 0 Inf
## 212 Scotland 0 0 NaN
## 213 Seychelles 50670 0 Inf
## 214 Sierra Leone 7760 0 Inf
## 215 Sint Maarten (Dutch part) 0 0 NaN
## 216 Solomon Islands 24578 0 Inf
## 217 Somalia 27318 0 Inf
## 218 Sudan 63755 0 Inf
## 219 Syria 57453 0 Inf
## 220 Tajikistan 17786 0 Inf
## 221 Tanzania 42664 0 Inf
## 222 Tokelau 0 0 NaN
## 223 Tonga 16734 0 Inf
## 224 Turkmenistan 0 0 NaN
## 225 Turks and Caicos Islands 6523 0 Inf
## 226 Tuvalu 2828 0 Inf
## 227 Uzbekistan 250567 0 Inf
## 228 Vanuatu 12027 0 Inf
## 229 Vatican 29 0 Inf
## 230 Venezuela 551587 0 Inf
## 231 Wales 0 0 NaN
## 232 Wallis and Futuna 3427 0 Inf
## 233 Western Sahara 0 0 NaN
## 234 Yemen 11946 0 Inf
Covid19_data_v2 %>%
group_by(continent) %>%
summarise(fullyVacp = mean(people_fully_vaccinated, na.rm = TRUE), death = mean(new_deaths,na.rm = TRUE)) %>%
arrange(desc(death))
## # A tibble: 6 × 3
## continent fullyVacp death
## <chr> <dbl> <dbl>
## 1 South America 22502001. 105.
## 2 North America 23562816. 49.6
## 3 Europe 9208617. 37.1
## 4 Asia 49749172. 33.5
## 5 Africa 4125716. 4.70
## 6 Oceania 4467711. 2.56
Covid19_data_v2 %>%
group_by(location) %>%
summarise(Covidcase = sum(new_cases,na.rm = TRUE),Population = mean(population)) %>%
arrange(desc(Population)) %>%
print(n = 234 )
## # A tibble: 234 × 3
## location Covidcase Population
## <chr> <dbl> <dbl>
## 1 China 2023378 1425887360
## 2 India 44686058 1417173120
## 3 United States 102345675 338289856
## 4 Indonesia 6730016 275501344
## 5 Pakistan 1576312 235824864
## 6 Nigeria 266493 218541216
## 7 Brazil 36719634 215313504
## 8 Bangladesh 2037556 171186368
## 9 Russia 21640952 144713312
## 10 Mexico 7369400 127504120
## 11 Japan 32555045 123951696
## 12 Ethiopia 499531 123379928
## 13 Philippines 4073861 115559008
## 14 Egypt 515645 110990096
## 15 Democratic Republic of Congo 95514 99010216
## 16 Vietnam 10967557 98186856
## 17 Iran 7564350 88550568
## 18 Turkey 16219497 85341248
## 19 Germany 37779833 83369840
## 20 Thailand 4736324 71697024
## 21 France 40017876 67813000
## 22 Tanzania 42664 65497752
## 23 South Africa 4037380 59893884
## 24 Italy 25453937 59037472
## 25 England 0 56550000
## 26 Myanmar 633820 54179312
## 27 Kenya 342810 54027484
## 28 Colombia 6352923 51874028
## 29 South Korea 30197065 51815808
## 30 Spain 13817949 47558632
## 31 Uganda 170505 47249588
## 32 Sudan 63755 46874200
## 33 Argentina 10037135 45510324
## 34 Algeria 271378 44903228
## 35 Iraq 2465545 44496124
## 36 Afghanistan 208553 41128772
## 37 Poland 6379391 39857144
## 38 Ukraine 5679371 39701744
## 39 Canada 4580075 38454328
## 40 Morocco 1272240 37457976
## 41 Saudi Arabia 827962 36408824
## 42 Angola 105184 35588996
## 43 Uzbekistan 250567 34627648
## 44 Peru 4486062 34049588
## 45 Malaysia 5036701 33938216
## 46 Yemen 11946 33696612
## 47 Ghana 171112 33475870
## 48 Mozambique 232010 32969520
## 49 Nepal 1001101 30547586
## 50 Madagascar 67834 29611718
## 51 Venezuela 551587 28301700
## 52 Cote d'Ivoire 88016 28160548
## 53 Cameroon 123993 27914542
## 54 Niger 9512 26207982
## 55 Australia 11324876 26177410
## 56 North Korea 1 26069416
## 57 Taiwan 9537825 23893396
## 58 Burkina Faso 22025 22673764
## 59 Mali 32783 22593598
## 60 Syria 57453 22125242
## 61 Sri Lanka 671989 21832150
## 62 Malawi 88611 20405318
## 63 Zambia 340763 20017670
## 64 Romania 3325006 19659270
## 65 Chile 5118981 19603736
## 66 Kazakhstan 1556948 19397998
## 67 Ecuador 1062712 18001002
## 68 Guatemala 1227853 17843914
## 69 Chad 7652 17723312
## 70 Somalia 27318 17597508
## 71 Netherlands 8593371 17564020
## 72 Senegal 88902 17316452
## 73 Cambodia 138693 16767851
## 74 Zimbabwe 261612 16320539
## 75 Guinea 38240 13859349
## 76 Rwanda 133116 13776702
## 77 Benin 28198 13352864
## 78 Burundi 53355 12889583
## 79 Tunisia 1150929 12356116
## 80 Bolivia 1187986 12224114
## 81 Belgium 4691499 11655923
## 82 Haiti 34111 11585003
## 83 Jordan 1747107 11285875
## 84 Dominican Republic 660095 11228821
## 85 Cuba 1112438 11212198
## 86 South Sudan 18368 10913172
## 87 Sweden 2693458 10549349
## 88 Czechia 4603363 10493990
## 89 Honduras 470777 10432858
## 90 Greece 5548487 10384972
## 91 Azerbaijan 827969 10358078
## 92 Portugal 5564068 10270857
## 93 Papua New Guinea 46766 10142625
## 94 Hungary 2191827 9967304
## 95 Tajikistan 17786 9952789
## 96 Belarus 994037 9534956
## 97 Israel 4787410 9449000
## 98 United Arab Emirates 1049409 9441138
## 99 Austria 5793169 8939617
## 100 Togo 39354 8848700
## 101 Switzerland 4407915 8740471
## 102 Sierra Leone 7760 8605723
## 103 Laos 217975 7529477
## 104 Hong Kong 2876130 7488863
## 105 Nicaragua 15569 6948395
## 106 Serbia 2480618 6871547
## 107 Libya 507162 6812344
## 108 Bulgaria 1295426 6781955
## 109 Paraguay 806256 6780745
## 110 Kyrgyzstan 206592 6630621
## 111 Turkmenistan 0 6430777
## 112 El Salvador 201877 6336393
## 113 Congo 25375 5970430
## 114 Denmark 3401781 5882259
## 115 Slovakia 2665001 5643455
## 116 Singapore 2217110 5637022
## 117 Central African Republic 15368 5579148
## 118 Finland 1458619 5540745
## 119 Lebanon 1228639 5489744
## 120 Scotland 0 5466000
## 121 Norway 1477856 5434324
## 122 Liberia 8188 5302690
## 123 Palestine 703228 5250076
## 124 New Zealand 2183101 5185289
## 125 Costa Rica 1186176 5180836
## 126 Ireland 1708691 5023108
## 127 Mauritania 63696 4736146
## 128 Oman 399449 4576300
## 129 Panama 1029701 4408582
## 130 Kuwait 662858 4268886
## 131 Croatia 1267580 4030361
## 132 Georgia 1814180 3744385
## 133 Eritrea 10189 3684041
## 134 Uruguay 1032731 3422796
## 135 Mongolia 1009288 3398373
## 136 Moldova 598673 3272993
## 137 Puerto Rico 0 3252412
## 138 Bosnia and Herzegovina 401384 3233530
## 139 Wales 0 3170000
## 140 Albania 334167 2842318
## 141 Jamaica 153407 2827382
## 142 Armenia 446008 2780472
## 143 Lithuania 1296852 2750058
## 144 Gambia 12686 2705995
## 145 Qatar 492482 2695131
## 146 Botswana 331187 2630300
## 147 Namibia 171983 2567024
## 148 Gabon 48981 2388997
## 149 Lesotho 34790 2305826
## 150 Slovenia 1321579 2119843
## 151 Guinea-Bissau 8947 2105580
## 152 North Macedonia 346452 2093606
## 153 Northern Ireland 0 1896000
## 154 Latvia 975282 1850654
## 155 Kosovo 272547 1782115
## 156 Equatorial Guinea 17287 1674916
## 157 Trinidad and Tobago 187908 1531043
## 158 Bahrain 700452 1472237
## 159 Timor 23420 1341298
## 160 Estonia 614673 1326064
## 161 Mauritius 294744 1299478
## 162 Eswatini 74133 1201680
## 163 Djibouti 15690 1120851
## 164 Fiji 68820 929769
## 165 Cyprus 642663 896007
## 166 Comoros 8992 836783
## 167 Guyana 72965 808727
## 168 Bhutan 62605 782457
## 169 Solomon Islands 24578 724272
## 170 Macao 3751 695180
## 171 Luxembourg 316079 647601
## 172 Montenegro 286355 627082
## 173 Suriname 82020 618046
## 174 Cape Verde 63229 593162
## 175 Western Sahara 0 576005
## 176 Malta 117104 533293
## 177 Maldives 185715 523798
## 178 Brunei 276085 449002
## 179 Bahamas 37539 409989
## 180 Belize 70660 405285
## 181 Northern Cyprus 0 382836
## 182 Iceland 208962 372903
## 183 Vanuatu 12027 326744
## 184 French Polynesia 77966 306292
## 185 New Caledonia 80294 289959
## 186 Barbados 106157 281646
## 187 Sao Tome and Principe 6283 227393
## 188 Samoa 16087 222390
## 189 Curacao 45986 191173
## 190 Saint Lucia 29803 179872
## 191 Guam 0 171783
## 192 Kiribati 5012 131237
## 193 Grenada 19697 125459
## 194 Micronesia (country) 23201 114178
## 195 Jersey 0 110796
## 196 Seychelles 50670 107135
## 197 Tonga 16734 106867
## 198 Aruba 44847 106459
## 199 Saint Vincent and the Grenadines 11129 103959
## 200 United States Virgin Islands 0 99479
## 201 Antigua and Barbuda 9108 93772
## 202 Isle of Man 38008 84534
## 203 Andorra 47839 79843
## 204 Dominica 15794 72758
## 205 Cayman Islands 31472 68722
## 206 Bermuda 18766 64207
## 207 Guernsey 0 63329
## 208 Greenland 11972 56494
## 209 Faeroe Islands 34658 53117
## 210 Northern Mariana Islands 0 49574
## 211 Saint Kitts and Nevis 6592 47681
## 212 Turks and Caicos Islands 6523 45726
## 213 Sint Maarten (Dutch part) 0 44192
## 214 Marshall Islands 15585 41593
## 215 Liechtenstein 21353 39355
## 216 Monaco 16161 36491
## 217 San Marino 23427 33690
## 218 Gibraltar 20422 32677
## 219 British Virgin Islands 7305 31332
## 220 Bonaire Sint Eustatius and Saba 11783 27052
## 221 Palau 5986 18084
## 222 Cook Islands 6999 17032
## 223 Anguilla 3904 15877
## 224 Nauru 4621 12691
## 225 Wallis and Futuna 3427 11596
## 226 Tuvalu 2828 11335
## 227 Saint Pierre and Miquelon 3454 5885
## 228 Saint Helena 2522 5401
## 229 Montserrat 1403 4413
## 230 Falkland Islands 1932 3801
## 231 Niue 0 1952
## 232 Tokelau 0 1893
## 233 Vatican 29 808
## 234 Pitcairn 0 47
####Data visualisation
Covid19_data_v2 %>%
group_by(Year,continent) %>%
summarise(NumberOfDeath = sum(new_deaths, na.rm = TRUE)) %>%
ggplot(aes( x = Year, y = NumberOfDeath)) +
geom_line() + geom_point()+
labs(x = "Year",y = 'Number of deaths', title = "Total Number of covid-19 deaths by year", subtitle = "Covid-19 death by Year")
## `summarise()` has grouped output by 'Year'. You can override using the
## `.groups` argument.
Covid19_data_v2 %>%
group_by(Year,continent) %>%
summarise(NumberOfCases = sum(new_cases, na.rm = TRUE)) %>%
ggplot(aes( x = Year, y =NumberOfCases , fill = continent)) +
geom_col(position = "dodge") +
scale_y_continuous(labels = function(x) format(x, scientific = FALSE))+
labs(y ='Number of cases (millions)' , title = "Total Number of covid-19 cases by year", subtitle = "Covid-19 cases by Year")
## `summarise()` has grouped output by 'Year'. You can override using the
## `.groups` argument.
Covid19_data_v2 %>%
group_by(Month) %>%
summarise(NumberOfCases = sum(new_cases, na.rm = TRUE)) %>%
ggplot(aes( x = Month, y =NumberOfCases )) +
geom_col(position = "dodge") +
theme(axis.text.x = element_text(angle = 50, vjust = 0.5, hjust=1))+
scale_y_continuous(labels = function(x) format(x, scientific = FALSE))+
labs(y ='Number of cases (millions)' ,title = "Total Number of covid-19 cases by Months", subtitle = "Covid-19 cases by Months")
Covid19_data_v2 %>%
group_by(continent) %>%
summarise(covid_death = sum(new_deaths, na.rm = TRUE), covid_cases = sum(new_cases, na.rm = TRUE), deathpercent = (covid_death / TotalDeath) * 100 ) %>%
arrange(desc(covid_death)) %>%
ggplot(aes( x = continent, y =covid_death)) +
geom_col(position = "dodge") +
labs(title = "Total Number of covid-19 cases by continents", subtitle = "Covid-19 death in each continent")
Covid19_data_v2 %>%
group_by(location) %>%
summarise(TotalCovidcase = sum(new_cases,na.rm = TRUE),TotalPopulation = mean(population)) %>%
ggplot(aes(x=TotalPopulation,y=TotalCovidcase)) +
scale_x_continuous(labels = function(x) format(x, scientific = FALSE))+
scale_y_continuous(labels = function(x) format(x, scientific = FALSE))+
geom_point()+
labs( x ='Countries population', y='COvid cases (millions)', title = "Correlation between countries total population and number of covid infections", subtitle = "Total covid cases Vs countries population")