Summary

This is my report on the R Programming Basics for Data Science I did on edX.

Project

The purpose of the project was to practically apply what I’ve learnt throughout the course. The project is summarily about getting data from the web, cleaning the data, and doing some analysis on the cleaned data.

edX Project

The project requires the httr and rvest packages which are used for communicating with websites and extracting data from the webpage, respectively.They are used together in web scraping. The httr package is needed to be able to use the GET function which is used to retrieve a webpage’s content.

library(httr)
library(rvest)

TASK 1: Get a COVID-19 pandemic Wiki page using HTTP request

get_wiki_covid19_page <- function() {
  
  # Our target COVID-19 wiki page URL is: 
  #https://en.wikipedia.org/w/index.php?title=Template:COVID-19_testing_by_country  
  # This URL has two parts; the base URL and the URL parameter, these are separated by question mark ?: 
  # 1) base URL `https://en.wikipedia.org/w/index.php  
  # 2) URL parameter: `title=Template:COVID-19_testing_by_country`, 
  
  # Wiki page base
  wiki_base_url <- "https://en.wikipedia.org/w/index.php"
  
  #I have to create a list;
  #which will contain a title specifying the page I want to get from wiki'
  #in this case, it'll be the URL parameter
  wiki_param <- list(title="Template:COVID-19_testing_by_country")
  
  #use the GET function to get a http response;
  #this function takes in the URL and a query(which is basically the URL parameter)
  wiki_reponse <- GET(wiki_base_url, query=wiki_param)
  
  #use the return function to return the response
  return(wiki_reponse)
}
#the above lines of code creates a function that we use to get an http response;
#the response gives the info we want, and allows R to actually work on it

#To get an http response, we call the function we created above. 
#But we have to assign it to an object because we'd need to pass it into the read_html function when we want to read the root html node, and we can't pass a function into it(ie, read_html expects an object)
wiki_covid19_page_response <- get_wiki_covid19_page()
wiki_covid19_page_response
## Response [https://en.wikipedia.org/w/index.php?title=Template%3ACOVID-19_testing_by_country]
##   Date: 2025-11-19 10:05
##   Status: 200
##   Content-Type: text/html; charset=UTF-8
##   Size: 456 kB
## <!DOCTYPE html>
## <html class="client-nojs vector-feature-language-in-header-enabled vector-fea...
## <head>
## <meta charset="UTF-8">
## <title>Template:COVID-19 testing by country - Wikipedia</title>
## <script>(function(){var className="client-js vector-feature-language-in-heade...
## RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.st...
## <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return...
## }];});});</script>
## <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%...
## ...

TASK 2: Extract COVID-19 testing data table from the wiki HTML page

#the read_html is used to read the root html node from response.
#reading HTML node helps R to parse(analyze) the entire HTML content into a structured object which can now be easily navigated
wiki_covid19_page_rootnode <- read_html(wiki_covid19_page_response)
wiki_covid19_page_rootnode
## {html_document}
## <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available" lang="en" dir="ltr">
## [1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 ...
## [2] <body class="skin--responsive skin-vector skin-vector-search-vue mediawik ...
#to get the table node from the root html node which is the piece of data we want to extract, the html_node is used; it takes in the root node and finds all the table nodes; we use wiki.table to access the table in the wiki page
wiki_covid19_page_table_node <- html_node(wiki_covid19_page_rootnode, "table.wikitable")

#to read the table node as a data frame, we use the html_table function; this function takes in the object that contains the table node; we now have a data frame of the table in the wiki page
wiki_covid19_page_dframe <- html_table(wiki_covid19_page_table_node)
wiki_covid19_page_dframe
## # A tibble: 173 × 9
##    `Country or region` `Date[a]`   Tested      `Units[b]` `Confirmed(cases)`
##    <chr>               <chr>       <chr>       <chr>      <chr>             
##  1 Afghanistan         17 Dec 2020 154,767     samples    49,621            
##  2 Albania             18 Feb 2021 428,654     samples    96,838            
##  3 Algeria             2 Nov 2020  230,553     samples    58,574            
##  4 Andorra             23 Feb 2022 300,307     samples    37,958            
##  5 Angola              2 Feb 2021  399,228     samples    20,981            
##  6 Antigua and Barbuda 6 Mar 2021  15,268      samples    832               
##  7 Argentina           16 Apr 2022 35,716,069  samples    9,060,495         
##  8 Armenia             29 May 2022 3,099,602   samples    422,963           
##  9 Australia           9 Sep 2022  78,548,492  samples    10,112,229        
## 10 Austria             1 Feb 2023  205,817,752 samples    5,789,991         
## # ℹ 163 more rows
## # ℹ 4 more variables: `Confirmed /tested,%` <chr>,
## #   `Tested /population,%` <chr>, `Confirmed /population,%` <chr>, Ref. <chr>

TASK 3: Pre-process and export the extracted data frame

The goal of task 3 is to pre-process the extracted data frame from the previous step, and export it as a csv file.

#to see what our data frame entails, we use the summary function; it helps us see if there is need to remove or replace things
summary(wiki_covid19_page_dframe)
##  Country or region    Date[a]             Tested            Units[b]        
##  Length:173         Length:173         Length:173         Length:173        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##  Confirmed(cases)   Confirmed /tested,% Tested /population,%
##  Length:173         Length:173          Length:173          
##  Class :character   Class :character    Class :character    
##  Mode  :character   Mode  :character    Mode  :character    
##  Confirmed /population,%     Ref.          
##  Length:173              Length:173        
##  Class :character        Class :character  
##  Mode  :character        Mode  :character
names(wiki_covid19_page_dframe) #this tells the column names
## [1] "Country or region"       "Date[a]"                
## [3] "Tested"                  "Units[b]"               
## [5] "Confirmed(cases)"        "Confirmed /tested,%"    
## [7] "Tested /population,%"    "Confirmed /population,%"
## [9] "Ref."
wiki_covid19_page_dframe$`Country or region`
##   [1] "Afghanistan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
##   [2] "Albania"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##   [3] "Algeria"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##   [4] "Andorra"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##   [5] "Angola"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##   [6] "Antigua and Barbuda"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
##   [7] "Argentina"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##   [8] "Armenia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##   [9] "Australia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [10] "Austria"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [11] "Azerbaijan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [12] "Bahamas"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [13] "Bahrain"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [14] "Bangladesh"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [15] "Barbados"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [16] "Belarus"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [17] "Belgium"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [18] "Belize"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [19] "Benin"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [20] "Bhutan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [21] "Bolivia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [22] "Bosnia and Herzegovina"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [23] "Botswana"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [24] "Brazil"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [25] "Brunei"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [26] "Bulgaria"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [27] "Burkina Faso"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
##  [28] "Burundi"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [29] "Cambodia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [30] "Cameroon"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [31] "Canada"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [32] "Chad"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [33] "Chile"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [34] "China[c]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [35] "Colombia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [36] "Costa Rica"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [37] "Croatia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [38] "Cuba"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [39] "Cyprus[d]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [40] "Czechia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [41] "Denmark[e]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [42] "Djibouti"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [43] "Dominica"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [44] "Dominican Republic"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
##  [45] "DR Congo"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [46] "Ecuador"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [47] "Egypt"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [48] "El Salvador"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
##  [49] "Equatorial Guinea"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
##  [50] "Estonia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [51] "Eswatini"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [52] "Ethiopia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [53] "Faroe Islands"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
##  [54] "Fiji"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [55] "Finland"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [56] "France[f][g]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
##  [57] "Gabon"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [58] "Gambia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [59] "Georgia[h]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [60] "Germany"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [61] "Ghana"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [62] "Greece"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [63] "Greenland"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [64] "Grenada"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [65] "Guatemala"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [66] "Guinea"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [67] "Guinea-Bissau"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
##  [68] "Guyana"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [69] "Haiti"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [70] "Honduras"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
##  [71] "Hungary"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [72] "Iceland"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [73] "India"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [74] "Indonesia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [75] "Iran"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [76] "Iraq"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [77] "Ireland"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [78] "Israel"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [79] "Italy"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [80] "Ivory Coast"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
##  [81] "Jamaica"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [82] "Japan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [83] "Jordan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [84] "Kazakhstan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [85] "Kenya"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [86] "Kosovo"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [87] "Kuwait"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [88] "Kyrgyzstan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [89] "Laos"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
##  [90] "Latvia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [91] "Lebanon"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [92] "Lesotho"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [93] "Liberia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
##  [94] "Libya"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
##  [95] "Lithuania"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
##  [96] "Luxembourg[i]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
##  [97] "Madagascar"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
##  [98] "Malawi"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
##  [99] "Malaysia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [100] "Maldives"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [101] "Mali"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
## [102] "Malta"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [103] "Mauritania"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [104] "Mauritius"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [105] "Mexico"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [106] "Moldova[j]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [107] "Mongolia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [108] "Montenegro"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [109] "Morocco"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [110] "Mozambique"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [111] "Myanmar"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [112] "Namibia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [113] "Nepal"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [114] "Netherlands"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [115] "New Caledonia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
## [116] "New Zealand"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [117] "Niger"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [118] "Nigeria"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [119] "North Korea"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [120] "North Macedonia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
## [121] "Northern Cyprus[k]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
## [122] "Norway"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [123] "Oman"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
## [124] "Pakistan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [125] "Palestine"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [126] "Panama"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [127] "Papua New Guinea"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
## [128] "Paraguay"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [129] "Peru"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
## [130] "Philippines"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [131] "Poland"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [132] "Portugal"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [133] "Qatar"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [134] "Romania"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [135] "Russia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [136] "Rwanda"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [137] "Saint Kitts and Nevis"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [138] "Saint Lucia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [139] "Saint Vincent"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
## [140] "San Marino"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [141] "Saudi Arabia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
## [142] "Senegal"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [143] "Serbia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [144] "Singapore"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [145] "Slovakia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [146] "Slovenia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [147] "South Africa"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
## [148] "South Korea"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [149] "South Sudan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
## [150] "Spain"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [151] "Sri Lanka"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [152] "Sudan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
## [153] "Sweden"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [154] "Switzerland[l]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
## [155] "Taiwan[m]"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [156] "Tanzania"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [157] "Thailand"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [158] "Togo"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
## [159] "Trinidad and Tobago"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
## [160] "Tunisia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [161] "Turkey"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [162] "Uganda"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [163] "Ukraine"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [164] "United Arab Emirates"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
## [165] "United Kingdom"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
## [166] "United States"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
## [167] "Uruguay"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [168] "Uzbekistan"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
## [169] "Venezuela"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
## [170] "Vietnam"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
## [171] "Zambia"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
## [172] "Zimbabwe"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
## [173] ".mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}\n^ Local time.\n\n^ For some countries it is unclear whether they report samples or cases. One person tested twice is recorded as one case and two samples.\n\n^ Excluding Taiwan.\n\n^ Excluding Northern Cyprus.\n\n^ Excluding Greenland and the Faroe Islands.\n\n^ Excluding Overseas France.\n\n^ Testing data from 4 May to 12 May is missing because of the transition to the new reporting system SI-DEP.\n\n^ Excluding Abkhazia and South Ossetia.\n\n^ Data for residents only.\n\n^ Excluding Transnistria.\n\n^ Northern Cyprus is not recognized as a sovereign state by any country except Turkey.\n\n^ Includes data for Liechtenstein.\n\n^ Not a United Nations member."
#we need to remove some columns and rename the rest; we also need to change the data types, so we create a function that does all of that.

preprocess_covid_data_frame <- function(data_frame) {
  
  shape <- dim(data_frame)
  
  
  # Remove the last row
  data_frame <- data_frame[1:172, ]
  
  # We don't need the Units and Ref columns, we remove them
  data_frame["Ref."] <- NULL
  data_frame["Units[b]"] <- NULL
  

  # Renaming the columns
  names(data_frame) <- c("country", "date", "tested", "confirmed", "confirmed.tested.ratio", "tested.population.ratio", "confirmed.population.ratio")
  
  # Convert column data types
  data_frame$country <- as.factor(data_frame$country)
  data_frame$date <- as.factor(data_frame$date)
  data_frame$tested <- as.numeric(gsub(",","",data_frame$tested))
  data_frame$confirmed <- as.numeric(gsub(",","",data_frame$confirmed))
  data_frame$'confirmed.tested.ratio' <- as.numeric(gsub(",","",data_frame$`confirmed.tested.ratio`))
  data_frame$'tested.population.ratio' <- as.numeric(gsub(",","",data_frame$`tested.population.ratio`))
  data_frame$'confirmed.population.ratio' <- as.numeric(gsub(",","",data_frame$`confirmed.population.ratio`))
  
  return(data_frame)
}

#we call the function to preprocess the initial data frame,and assign the result to an object.
new_covid19__dframe <- preprocess_covid_data_frame(wiki_covid19_page_dframe)
new_covid19__dframe
## # A tibble: 172 × 7
##    country  date  tested confirmed confirmed.tested.ratio tested.population.ra…¹
##    <fct>    <fct>  <dbl>     <dbl>                  <dbl>                  <dbl>
##  1 Afghani… 17 D… 1.55e5     49621                   32.1                   0.4 
##  2 Albania  18 F… 4.29e5     96838                   22.6                  15   
##  3 Algeria  2 No… 2.31e5     58574                   25.4                   0.53
##  4 Andorra  23 F… 3.00e5     37958                   12.6                 387   
##  5 Angola   2 Fe… 3.99e5     20981                    5.3                   1.3 
##  6 Antigua… 6 Ma… 1.53e4       832                    5.4                  15.9 
##  7 Argenti… 16 A… 3.57e7   9060495                   25.4                  78.3 
##  8 Armenia  29 M… 3.10e6    422963                   13.6                 105   
##  9 Austral… 9 Se… 7.85e7  10112229                   12.9                 313   
## 10 Austria  1 Fe… 2.06e8   5789991                    2.8                2312   
## # ℹ 162 more rows
## # ℹ abbreviated name: ¹​tested.population.ratio
## # ℹ 1 more variable: confirmed.population.ratio <dbl>
head(new_covid19__dframe) #this gives the first 6 entries
## # A tibble: 6 × 7
##   country   date  tested confirmed confirmed.tested.ratio tested.population.ra…¹
##   <fct>     <fct>  <dbl>     <dbl>                  <dbl>                  <dbl>
## 1 Afghanis… 17 D… 154767     49621                   32.1                   0.4 
## 2 Albania   18 F… 428654     96838                   22.6                  15   
## 3 Algeria   2 No… 230553     58574                   25.4                   0.53
## 4 Andorra   23 F… 300307     37958                   12.6                 387   
## 5 Angola    2 Fe… 399228     20981                    5.3                   1.3 
## 6 Antigua … 6 Ma…  15268       832                    5.4                  15.9 
## # ℹ abbreviated name: ¹​tested.population.ratio
## # ℹ 1 more variable: confirmed.population.ratio <dbl>
# Export the data frame to a csv file
write.csv(new_covid19__dframe, "C:/Users/MODEL24/Documents/Covid19.csv")

TASK 4: Get a subset of the extracted data frame

The goal of task 4 is to get the 5th to 10th rows from the data frame with only country and confirmed columns selected

#to get the 5th to 10th rows from the data frame with only country and confirmed columns selected; we first call back the csv file
Covid19_dframe <- read.csv("C:/Users/MODEL24/Documents/Covid19.csv", header=T, sep=",")

#then we subset the data by specifying the rows and columns we want into square brackets
Covid19_dframe[5:10, c("country","confirmed")]
##                country confirmed
## 5               Angola     20981
## 6  Antigua and Barbuda       832
## 7            Argentina   9060495
## 8              Armenia    422963
## 9            Australia  10112229
## 10             Austria   5789991

TASK 5: Calculate worldwide COVID testing positive ratio

The goal of task 5 is to get the total confirmed and tested cases worldwide, and try to figure the overall positive ratio using confirmed cases / tested cases

# Get the total confirmed cases worldwide
total_confirmed_cases <- sum(Covid19_dframe$confirmed)
total_confirmed_cases
## [1] 431434555
# Get the total tested cases worldwide
total_tested_cases <- sum(Covid19_dframe$tested)
total_tested_cases
## [1] 5396881644
# Get the positive ratio (confirmed / tested)
positive_ratio <- total_confirmed_cases/total_tested_cases
positive_ratio
## [1] 0.07994145

TASK 6: Get a country list which reported their testing data

The goal of task 6 is to get a catalog or sorted list of countries;who have reported their COVID-19 testing data

# Get the `country` column
country <- Covid19_dframe$country
country
##   [1] "Afghanistan"            "Albania"                "Algeria"               
##   [4] "Andorra"                "Angola"                 "Antigua and Barbuda"   
##   [7] "Argentina"              "Armenia"                "Australia"             
##  [10] "Austria"                "Azerbaijan"             "Bahamas"               
##  [13] "Bahrain"                "Bangladesh"             "Barbados"              
##  [16] "Belarus"                "Belgium"                "Belize"                
##  [19] "Benin"                  "Bhutan"                 "Bolivia"               
##  [22] "Bosnia and Herzegovina" "Botswana"               "Brazil"                
##  [25] "Brunei"                 "Bulgaria"               "Burkina Faso"          
##  [28] "Burundi"                "Cambodia"               "Cameroon"              
##  [31] "Canada"                 "Chad"                   "Chile"                 
##  [34] "China[c]"               "Colombia"               "Costa Rica"            
##  [37] "Croatia"                "Cuba"                   "Cyprus[d]"             
##  [40] "Czechia"                "Denmark[e]"             "Djibouti"              
##  [43] "Dominica"               "Dominican Republic"     "DR Congo"              
##  [46] "Ecuador"                "Egypt"                  "El Salvador"           
##  [49] "Equatorial Guinea"      "Estonia"                "Eswatini"              
##  [52] "Ethiopia"               "Faroe Islands"          "Fiji"                  
##  [55] "Finland"                "France[f][g]"           "Gabon"                 
##  [58] "Gambia"                 "Georgia[h]"             "Germany"               
##  [61] "Ghana"                  "Greece"                 "Greenland"             
##  [64] "Grenada"                "Guatemala"              "Guinea"                
##  [67] "Guinea-Bissau"          "Guyana"                 "Haiti"                 
##  [70] "Honduras"               "Hungary"                "Iceland"               
##  [73] "India"                  "Indonesia"              "Iran"                  
##  [76] "Iraq"                   "Ireland"                "Israel"                
##  [79] "Italy"                  "Ivory Coast"            "Jamaica"               
##  [82] "Japan"                  "Jordan"                 "Kazakhstan"            
##  [85] "Kenya"                  "Kosovo"                 "Kuwait"                
##  [88] "Kyrgyzstan"             "Laos"                   "Latvia"                
##  [91] "Lebanon"                "Lesotho"                "Liberia"               
##  [94] "Libya"                  "Lithuania"              "Luxembourg[i]"         
##  [97] "Madagascar"             "Malawi"                 "Malaysia"              
## [100] "Maldives"               "Mali"                   "Malta"                 
## [103] "Mauritania"             "Mauritius"              "Mexico"                
## [106] "Moldova[j]"             "Mongolia"               "Montenegro"            
## [109] "Morocco"                "Mozambique"             "Myanmar"               
## [112] "Namibia"                "Nepal"                  "Netherlands"           
## [115] "New Caledonia"          "New Zealand"            "Niger"                 
## [118] "Nigeria"                "North Korea"            "North Macedonia"       
## [121] "Northern Cyprus[k]"     "Norway"                 "Oman"                  
## [124] "Pakistan"               "Palestine"              "Panama"                
## [127] "Papua New Guinea"       "Paraguay"               "Peru"                  
## [130] "Philippines"            "Poland"                 "Portugal"              
## [133] "Qatar"                  "Romania"                "Russia"                
## [136] "Rwanda"                 "Saint Kitts and Nevis"  "Saint Lucia"           
## [139] "Saint Vincent"          "San Marino"             "Saudi Arabia"          
## [142] "Senegal"                "Serbia"                 "Singapore"             
## [145] "Slovakia"               "Slovenia"               "South Africa"          
## [148] "South Korea"            "South Sudan"            "Spain"                 
## [151] "Sri Lanka"              "Sudan"                  "Sweden"                
## [154] "Switzerland[l]"         "Taiwan[m]"              "Tanzania"              
## [157] "Thailand"               "Togo"                   "Trinidad and Tobago"   
## [160] "Tunisia"                "Turkey"                 "Uganda"                
## [163] "Ukraine"                "United Arab Emirates"   "United Kingdom"        
## [166] "United States"          "Uruguay"                "Uzbekistan"            
## [169] "Venezuela"              "Vietnam"                "Zambia"                
## [172] "Zimbabwe"
# Check its class (should be character)
class(country)
## [1] "character"
# Sort the countries AtoZ
Covid19_dframe[order(country, decreasing = F),]
##       X                country        date    tested confirmed
## 1     1            Afghanistan 17 Dec 2020    154767     49621
## 2     2                Albania 18 Feb 2021    428654     96838
## 3     3                Algeria  2 Nov 2020    230553     58574
## 4     4                Andorra 23 Feb 2022    300307     37958
## 5     5                 Angola  2 Feb 2021    399228     20981
## 6     6    Antigua and Barbuda  6 Mar 2021     15268       832
## 7     7              Argentina 16 Apr 2022  35716069   9060495
## 8     8                Armenia 29 May 2022   3099602    422963
## 9     9              Australia  9 Sep 2022  78548492  10112229
## 10   10                Austria  1 Feb 2023 205817752   5789991
## 11   11             Azerbaijan 11 May 2022   6838458    792638
## 12   12                Bahamas 28 Nov 2022    259366     37483
## 13   13                Bahrain  3 Dec 2022  10578766    696614
## 14   14             Bangladesh 24 Jul 2021   7417714   1151644
## 15   15               Barbados 14 Oct 2022    770100    103014
## 16   16                Belarus  9 May 2022  13217569    982809
## 17   17                Belgium 24 Jan 2023  36548544   4691499
## 18   18                 Belize  8 Jun 2022    572900     60694
## 19   19                  Benin  4 May 2021    595112      7884
## 20   20                 Bhutan 28 Feb 2022   1736168     12702
## 21   21                Bolivia  5 Jun 2022   4358669    910228
## 22   22 Bosnia and Herzegovina 27 Sep 2022   1872934    399887
## 23   23               Botswana 11 Jan 2022   2026898    232432
## 24   24                 Brazil 19 Feb 2021  23561497  10081676
## 25   25                 Brunei  2 Aug 2021    153804       338
## 26   26               Bulgaria  2 Feb 2023  10993239   1295524
## 27   27           Burkina Faso  4 Mar 2021    158777     12123
## 28   28                Burundi  5 Jan 2021     90019       884
## 29   29               Cambodia  1 Aug 2021   1812706     77914
## 30   30               Cameroon 18 Feb 2021    942685     32681
## 31   31                 Canada 26 Nov 2022  66343123   4423053
## 32   32                   Chad  2 Mar 2021     99027      4020
## 33   33                  Chile  1 Feb 2023  48154268   5123007
## 34   34               China[c] 31 Jul 2020 160000000     87655
## 35   35               Colombia 24 Nov 2022  36875818   6314769
## 36   36             Costa Rica  2 Nov 2021   2575363    561054
## 37   37                Croatia  2 Feb 2023   5481285   1267798
## 38   38                   Cuba  2 Feb 2023  14301394   1112470
## 39   39              Cyprus[d] 29 Jan 2023  27820163    644160
## 40   40                Czechia  1 Feb 2023  22544928   4590529
## 41   41             Denmark[e] 31 Jan 2023  67682707   3399947
## 42   42               Djibouti 28 Apr 2022    305941     15631
## 43   43               Dominica 20 Jun 2022    209803     14821
## 44   44     Dominican Republic 22 Jul 2022   3574665    626030
## 45   45               DR Congo 28 Feb 2021    124838     25961
## 46   46                Ecuador 23 Jul 2021   1627189    480720
## 47   47                  Egypt 23 Jul 2021   3137519    283947
## 48   48            El Salvador 18 Mar 2022   1847861    161052
## 49   49      Equatorial Guinea 30 Jan 2023    403773     17113
## 50   50                Estonia 31 Jan 2023   3637908    613954
## 51   51               Eswatini  8 Dec 2021    415110     49253
## 52   52               Ethiopia 24 Jun 2021   2981185    278446
## 53   53          Faroe Islands 27 Feb 2022    774000     34237
## 54   54                   Fiji  2 Jan 2023    667953     68848
## 55   55                Finland 14 Jan 2022   9042453    371135
## 56   56           France[f][g] 15 May 2022 272417258  29183646
## 57   57                  Gabon 23 Jul 2021    958807     25325
## 58   58                 Gambia 15 Feb 2021     43217      4469
## 59   59             Georgia[h]  3 Nov 2021   4888787    732965
## 60   60                Germany  7 Jul 2021  65247345   3733519
## 61   61                  Ghana  3 Jul 2021   1305749     96708
## 62   62                 Greece 18 Dec 2022 101576831   5548487
## 63   63              Greenland 30 Jan 2022    164573     10662
## 64   64                Grenada 11 May 2021     28684       161
## 65   65              Guatemala  6 Jan 2023   6800560   1230098
## 66   66                 Guinea 21 Jul 2021    494898     24878
## 67   67          Guinea-Bissau  7 Jul 2022    145231      8400
## 68   68                 Guyana 15 Jun 2022    648569     66129
## 69   69                  Haiti 26 Nov 2022    223475     33874
## 70   70               Honduras 26 Nov 2021   1133782    377859
## 71   71                Hungary 10 May 2022  11394556   1909948
## 72   72                Iceland  9 Aug 2022   1988652    203162
## 73   73                  India  8 Jul 2022 866177937  43585554
## 74   74              Indonesia  3 Jul 2023  76062770   6812127
## 75   75                   Iran 31 May 2022  52269202   7232268
## 76   76                   Iraq  3 Aug 2022  19090652   2448484
## 77   77                Ireland 31 Jan 2023  12990476   1700817
## 78   78                 Israel 17 Jan 2022  41373364   1792137
## 79   79                  Italy 16 Mar 2023 269127054  25651205
## 80   80            Ivory Coast  3 Mar 2021    429177     33285
## 81   81                Jamaica 30 Sep 2022   1184973    151931
## 82   82                  Japan  1 Mar 2021   8487288    432773
## 83   83                 Jordan  6 Jun 2021   7407053    739847
## 84   84             Kazakhstan 28 May 2021  11575012    385144
## 85   85                  Kenya  5 Mar 2021   1322806    107729
## 86   86                 Kosovo 31 May 2021    611357    107410
## 87   87                 Kuwait  9 Mar 2022   7754247    624573
## 88   88             Kyrgyzstan 10 Feb 2021    695415     85253
## 89   89                   Laos  1 Mar 2021    114030        45
## 90   90                 Latvia  5 Sep 2021   3630095    144518
## 91   91                Lebanon 14 Jun 2021   4599186    542649
## 92   92                Lesotho 30 Mar 2022    431221     32910
## 93   93                Liberia 17 Jul 2021    128246      5396
## 94   94                  Libya 14 Apr 2022   2578215    501862
## 95   95              Lithuania 31 Jan 2023   9046584   1170108
## 96   96          Luxembourg[i] 12 May 2022   4248188    244182
## 97   97             Madagascar 19 Feb 2021    119608     19831
## 98   98                 Malawi 29 Nov 2022    624784     88086
## 99   99               Malaysia  7 Sep 2021  23705425   1880734
## 100 100               Maldives 13 Mar 2022   2216560    174658
## 101 101                   Mali  7 Jul 2021    322504     14449
## 102 102                  Malta  8 Sep 2021   1211456     36606
## 103 103             Mauritania 16 Apr 2021    268093     18103
## 104 104              Mauritius 22 Nov 2020    289552       494
## 105 105                 Mexico 15 Oct 2021  10503678   3749860
## 106 106             Moldova[j] 20 Apr 2022   3213594    516864
## 107 107               Mongolia 10 Jul 2021   3354200    136053
## 108 108             Montenegro 10 May 2021    394388     98449
## 109 109                Morocco  6 Jan 2023  14217563   1272299
## 110 110             Mozambique 22 Jul 2021    688570    105866
## 111 111                Myanmar 16 Sep 2021   4047680    440741
## 112 112                Namibia  4 Jul 2022   1062663    166229
## 113 113                  Nepal 26 Jul 2022   5804358    984475
## 114 114            Netherlands  6 Jul 2021  14526293   1692834
## 115 115          New Caledonia  3 Sep 2021     41962       136
## 116 116            New Zealand 29 Jan 2023   7757935   2136662
## 117 117                  Niger 22 Feb 2021     79321      4740
## 118 118                Nigeria 28 Feb 2021   1544008    155657
## 119 119            North Korea 25 Nov 2020     16914         0
## 120 120        North Macedonia  1 Jul 2021    881870    155689
## 121 121     Northern Cyprus[k] 12 Jul 2022   7096998    103034
## 122 122                 Norway 20 Jan 2022   9811888    554778
## 123 123                   Oman 28 Oct 2020    509959    114434
## 124 124               Pakistan  5 Mar 2021   9173593    588728
## 125 125              Palestine  5 Feb 2022   3078533    574105
## 126 126                 Panama 28 Jan 2023   7475016   1029701
## 127 127       Papua New Guinea 17 Feb 2021     47490       961
## 128 128               Paraguay 27 Mar 2022   2609819    647950
## 129 129                   Peru 17 Nov 2022  36073768   4177786
## 130 130            Philippines  7 Jan 2023  34402980   4073980
## 131 131                 Poland 27 Apr 2022  36064311   5993861
## 132 132               Portugal  5 Jan 2022  27515490   1499976
## 133 133                  Qatar 11 Nov 2022   4061988    473440
## 134 134                Romania 29 Jan 2021   5405393    724250
## 135 135                 Russia  6 Jun 2022 295542733  18358459
## 136 136                 Rwanda  6 Oct 2021   2885812     98209
## 137 137  Saint Kitts and Nevis 26 Aug 2021     30231       995
## 138 138            Saint Lucia  7 Oct 2022    212132     29550
## 139 139          Saint Vincent 28 Jan 2023    113504      9585
## 140 140             San Marino 29 Jan 2023    192613     23427
## 141 141           Saudi Arabia 26 Apr 2022  41849069    753632
## 142 142                Senegal 12 Jul 2021    624502     46509
## 143 143                 Serbia  2 Feb 2023  12185475   2473599
## 144 144              Singapore  3 Aug 2021  16206203     65315
## 145 145               Slovakia  2 Feb 2023   7391882   1861034
## 146 146               Slovenia  2 Feb 2023   2826117   1322282
## 147 147           South Africa 24 May 2021  11378282   1637848
## 148 148            South Korea  1 Mar 2021   6592010     90029
## 149 149            South Sudan 26 May 2021    164472     10688
## 150 150                  Spain  1 Jul 2021  54128524   3821305
## 151 151              Sri Lanka 30 Mar 2021   2384745     93128
## 152 152                  Sudan  7 Jan 2021    158804     23316
## 153 153                 Sweden 24 May 2021   9996795   1074751
## 154 154         Switzerland[l]  7 Nov 2022  23283909   4276836
## 155 155              Taiwan[m]  3 Feb 2023  30275725   8622129
## 156 156               Tanzania 18 Nov 2020      3880       509
## 157 157               Thailand  4 Mar 2021   1579597     26162
## 158 158                   Togo  6 Jan 2023    807269     39358
## 159 159    Trinidad and Tobago  3 Jan 2022    512730     92997
## 160 160                Tunisia 23 Aug 2021   2893625    703732
## 161 161                 Turkey  2 Jul 2021  61236294   5435831
## 162 162                 Uganda 11 Feb 2021    852444     39979
## 163 163                Ukraine 24 Nov 2021  15648456   3367461
## 164 164   United Arab Emirates  1 Feb 2023 198685717   1049537
## 165 165         United Kingdom 19 May 2022 522526476  22232377
## 166 166          United States 29 Jul 2022 929349291  90749469
## 167 167                Uruguay 16 Apr 2022   6089116    895592
## 168 168             Uzbekistan  7 Sep 2020   2630000     43975
## 169 169              Venezuela 30 Mar 2021   3179074    159149
## 170 170                Vietnam 28 Aug 2022  45772571  11403302
## 171 171                 Zambia 10 Mar 2022   3301860    314850
## 172 172               Zimbabwe 15 Oct 2022   2529087    257893
##     confirmed.tested.ratio tested.population.ratio confirmed.population.ratio
## 1                   32.100                  0.4000                    0.13000
## 2                   22.600                 15.0000                    3.40000
## 3                   25.400                  0.5300                    0.13000
## 4                   12.600                387.0000                   49.00000
## 5                    5.300                  1.3000                    0.06700
## 6                    5.400                 15.9000                    0.86000
## 7                   25.400                 78.3000                   20.00000
## 8                   13.600                105.0000                   14.30000
## 9                   12.900                313.0000                   40.30000
## 10                   2.800               2312.0000                   65.00000
## 11                  11.600                 69.1000                    8.00000
## 12                  14.500                 67.3000                    9.70000
## 13                   6.600                674.0000                   44.40000
## 14                  15.500                  4.5000                    0.70000
## 15                  13.400                268.0000                   35.90000
## 16                   7.400                139.0000                   10.40000
## 17                  12.800                317.0000                   40.70000
## 18                  10.600                140.0000                   14.90000
## 19                   1.300                  5.1000                    0.06700
## 20                   0.730                234.0000                    1.71000
## 21                  20.900                 38.1000                    8.00000
## 22                  21.400                 54.7000                   11.70000
## 23                  11.500                 89.9000                   10.30000
## 24                  42.800                 11.2000                    4.80000
## 25                   0.220                 33.5000                    0.07400
## 26                  11.800                158.0000                   18.60000
## 27                   7.600                  0.7600                    0.05800
## 28                   0.980                  0.7600                    0.00740
## 29                   4.300                 11.2000                    0.48000
## 30                   3.500                  3.6000                    0.12000
## 31                   6.700                175.0000                   11.70000
## 32                   4.100                  0.7200                    0.02900
## 33                  10.600                252.0000                   26.90000
## 34                   0.055                 11.1000                    0.00610
## 35                  17.100                 76.4000                   13.10000
## 36                  21.800                 51.5000                   11.20000
## 37                  23.100                134.0000                   31.10000
## 38                   7.800                126.0000                    9.80000
## 39                   2.300               3223.0000                   74.40000
## 40                  20.400                211.0000                   42.90000
## 41                   5.000               1162.0000                   58.40000
## 42                   5.100                 33.2000                    1.70000
## 43                   7.100                293.0000                   20.70000
## 44                  17.500                 32.9000                    5.80000
## 45                  20.800                  0.1400                    0.02900
## 46                  29.500                  9.5000                    2.80000
## 47                   9.100                  3.1000                    0.28000
## 48                   8.700                 28.5000                    2.50000
## 49                   4.200                 30.8000                    1.30000
## 50                  16.900                274.0000                   46.20000
## 51                  11.900                 36.5000                    4.30000
## 52                   9.300                  2.6000                    0.24000
## 53                   4.400               1493.0000                   65.70000
## 54                  10.300                 74.5000                    7.70000
## 55                   4.100                163.0000                    6.70000
## 56                  10.700                417.0000                   44.70000
## 57                   2.600                  3.1000                    0.08200
## 58                  10.300                  2.0000                    0.21000
## 59                  15.000                132.0000                   19.70000
## 60                   5.700                 77.8000                    4.50000
## 61                   7.400                  4.2000                    0.31000
## 62                   5.500                943.0000                   51.50000
## 63                   6.500                293.0000                   19.00000
## 64                   0.560                 25.7000                    0.14000
## 65                  18.100                 39.4000                    7.10000
## 66                   5.000                  3.8000                    0.19000
## 67                   5.800                  7.7000                    0.45000
## 68                  10.200                 82.5000                    8.40000
## 69                  15.200                  2.0000                    0.30000
## 70                  33.300                 11.8000                    3.90000
## 71                  16.800                118.0000                   19.80000
## 72                  10.200                546.0000                   55.80000
## 73                   5.000                 63.0000                   31.70000
## 74                   9.000                 28.2000                    2.50000
## 75                  13.800                 62.8000                    8.70000
## 76                  12.800                 47.5000                    6.10000
## 77                  13.100                264.0000                   34.60000
## 78                   4.300                451.0000                   19.50000
## 79                   9.500                446.0000                   42.50000
## 80                   7.800                  1.6000                    0.13000
## 81                  12.800                 43.5000                    5.60000
## 82                   5.100                  6.7000                    0.34000
## 83                  10.000                 69.5000                    6.90000
## 84                   3.300                 62.1000                    2.10000
## 85                   8.100                  2.8000                    0.23000
## 86                  17.600                 33.8000                    5.90000
## 87                   8.100                181.0000                   14.60000
## 88                  12.300                 10.7000                    1.30000
## 89                   0.039                  1.6000                    0.00063
## 90                   4.000                189.0000                    7.50000
## 91                  11.800                 67.4000                    8.00000
## 92                   7.600                 21.5000                    1.60000
## 93                   4.200                  2.5000                    0.11000
## 94                  19.500                 37.6000                    7.30000
## 95                  12.900                324.0000                   41.90000
## 96                   5.700                679.0000                   39.00000
## 97                  16.600                  0.4600                    0.07600
## 98                  14.100                  3.3000                    0.46000
## 99                   7.900                 72.3000                    5.70000
## 100                  7.900                398.0000                   31.30000
## 101                  4.500                  1.6000                    0.07100
## 102                  3.000                245.0000                    7.40000
## 103                  6.800                  6.1000                    0.41000
## 104                  0.170                 22.9000                    0.03900
## 105                 35.700                  8.2000                    2.90000
## 106                 16.100                122.0000                   19.60000
## 107                  4.100                100.0000                    4.10000
## 108                 25.000                 62.5000                   15.60000
## 109                  8.900                 38.5000                    3.40000
## 110                 15.400                  2.2000                    0.34000
## 111                 10.900                  7.4000                    0.81000
## 112                 15.600                 38.7000                    6.10000
## 113                 17.000                 20.7000                    3.50000
## 114                 11.700                 83.4000                    9.70000
## 115                  0.320                 15.7000                    0.05000
## 116                 27.500                156.0000                   42.90000
## 117                  6.000                  0.3500                    0.02100
## 118                 10.100                  0.7500                    0.07600
## 119                  0.000                  0.0660                    0.00000
## 120                 17.700                 42.5000                    7.50000
## 121                  1.500               2177.0000                   31.60000
## 122                  5.700                183.0000                   10.30000
## 123                 22.400                 11.0000                    2.50000
## 124                  6.400                  4.2000                    0.27000
## 125                 18.600                 60.9000                   11.40000
## 126                 13.800                179.0000                   24.70000
## 127                  2.000                  0.5300                    0.01100
## 128                 24.800                 36.6000                    9.10000
## 129                 11.600                109.9000                   12.70000
## 130                 11.800                 34.1000                    4.00000
## 131                 16.600                 94.0000                   15.60000
## 132                  5.500                268.0000                   14.60000
## 133                 11.700                141.0000                   16.40000
## 134                 13.400                 27.9000                    3.70000
## 135                  6.200                201.0000                   12.50000
## 136                  3.400                 22.3000                    0.76000
## 137                  3.300                 57.6000                    1.90000
## 138                 13.900                116.6000                   16.20000
## 139                  8.400                103.0000                    8.70000
## 140                 12.200                563.0000                   68.40000
## 141                  1.800                120.0000                    2.20000
## 142                  7.400                  3.9000                    0.29000
## 143                 20.300                175.0000                   35.50000
## 144                  0.400                284.0000                    1.10000
## 145                 25.200                135.0000                   34.10000
## 146                 46.800                135.0000                   63.10000
## 147                 14.400                 19.2000                    2.80000
## 148                  1.400                 12.7000                    0.17000
## 149                  6.500                  1.3000                    0.08400
## 150                  7.100                116.0000                    8.20000
## 151                  3.900                 10.9000                    0.43000
## 152                 14.700                  0.3600                    0.05300
## 153                 10.800                 96.8000                   10.40000
## 154                 18.400                270.0000                   49.70000
## 155                 28.480                128.3000                   36.52800
## 156                 13.100                  0.0065                    0.00085
## 157                  1.700                  2.3000                    0.03800
## 158                  4.900                  9.4000                    0.46000
## 159                 18.100                 37.6000                    6.80000
## 160                 24.300                 24.5000                    6.00000
## 161                  8.900                 73.6000                    6.50000
## 162                  4.700                  1.9000                    0.08700
## 163                 21.500                 37.2000                    8.00000
## 164                  0.530               2070.0000                   10.90000
## 165                  4.300                774.0000                   32.90000
## 166                  9.800                281.0000                   27.40000
## 167                 14.700                175.0000                   25.80000
## 168                  1.700                  7.7000                    0.13000
## 169                  5.000                 11.0000                    0.55000
## 170                 24.900                 46.4000                   11.60000
## 171                  9.500                 19.0000                    1.80000
## 172                 10.200                 17.0000                    1.70000
# Sort the countries ZtoA
countries_ZtoA <- Covid19_dframe[order(country, decreasing = T),]

# Print the sorted ZtoA list
countries_ZtoA
##       X                country        date    tested confirmed
## 172 172               Zimbabwe 15 Oct 2022   2529087    257893
## 171 171                 Zambia 10 Mar 2022   3301860    314850
## 170 170                Vietnam 28 Aug 2022  45772571  11403302
## 169 169              Venezuela 30 Mar 2021   3179074    159149
## 168 168             Uzbekistan  7 Sep 2020   2630000     43975
## 167 167                Uruguay 16 Apr 2022   6089116    895592
## 166 166          United States 29 Jul 2022 929349291  90749469
## 165 165         United Kingdom 19 May 2022 522526476  22232377
## 164 164   United Arab Emirates  1 Feb 2023 198685717   1049537
## 163 163                Ukraine 24 Nov 2021  15648456   3367461
## 162 162                 Uganda 11 Feb 2021    852444     39979
## 161 161                 Turkey  2 Jul 2021  61236294   5435831
## 160 160                Tunisia 23 Aug 2021   2893625    703732
## 159 159    Trinidad and Tobago  3 Jan 2022    512730     92997
## 158 158                   Togo  6 Jan 2023    807269     39358
## 157 157               Thailand  4 Mar 2021   1579597     26162
## 156 156               Tanzania 18 Nov 2020      3880       509
## 155 155              Taiwan[m]  3 Feb 2023  30275725   8622129
## 154 154         Switzerland[l]  7 Nov 2022  23283909   4276836
## 153 153                 Sweden 24 May 2021   9996795   1074751
## 152 152                  Sudan  7 Jan 2021    158804     23316
## 151 151              Sri Lanka 30 Mar 2021   2384745     93128
## 150 150                  Spain  1 Jul 2021  54128524   3821305
## 149 149            South Sudan 26 May 2021    164472     10688
## 148 148            South Korea  1 Mar 2021   6592010     90029
## 147 147           South Africa 24 May 2021  11378282   1637848
## 146 146               Slovenia  2 Feb 2023   2826117   1322282
## 145 145               Slovakia  2 Feb 2023   7391882   1861034
## 144 144              Singapore  3 Aug 2021  16206203     65315
## 143 143                 Serbia  2 Feb 2023  12185475   2473599
## 142 142                Senegal 12 Jul 2021    624502     46509
## 141 141           Saudi Arabia 26 Apr 2022  41849069    753632
## 140 140             San Marino 29 Jan 2023    192613     23427
## 139 139          Saint Vincent 28 Jan 2023    113504      9585
## 138 138            Saint Lucia  7 Oct 2022    212132     29550
## 137 137  Saint Kitts and Nevis 26 Aug 2021     30231       995
## 136 136                 Rwanda  6 Oct 2021   2885812     98209
## 135 135                 Russia  6 Jun 2022 295542733  18358459
## 134 134                Romania 29 Jan 2021   5405393    724250
## 133 133                  Qatar 11 Nov 2022   4061988    473440
## 132 132               Portugal  5 Jan 2022  27515490   1499976
## 131 131                 Poland 27 Apr 2022  36064311   5993861
## 130 130            Philippines  7 Jan 2023  34402980   4073980
## 129 129                   Peru 17 Nov 2022  36073768   4177786
## 128 128               Paraguay 27 Mar 2022   2609819    647950
## 127 127       Papua New Guinea 17 Feb 2021     47490       961
## 126 126                 Panama 28 Jan 2023   7475016   1029701
## 125 125              Palestine  5 Feb 2022   3078533    574105
## 124 124               Pakistan  5 Mar 2021   9173593    588728
## 123 123                   Oman 28 Oct 2020    509959    114434
## 122 122                 Norway 20 Jan 2022   9811888    554778
## 121 121     Northern Cyprus[k] 12 Jul 2022   7096998    103034
## 120 120        North Macedonia  1 Jul 2021    881870    155689
## 119 119            North Korea 25 Nov 2020     16914         0
## 118 118                Nigeria 28 Feb 2021   1544008    155657
## 117 117                  Niger 22 Feb 2021     79321      4740
## 116 116            New Zealand 29 Jan 2023   7757935   2136662
## 115 115          New Caledonia  3 Sep 2021     41962       136
## 114 114            Netherlands  6 Jul 2021  14526293   1692834
## 113 113                  Nepal 26 Jul 2022   5804358    984475
## 112 112                Namibia  4 Jul 2022   1062663    166229
## 111 111                Myanmar 16 Sep 2021   4047680    440741
## 110 110             Mozambique 22 Jul 2021    688570    105866
## 109 109                Morocco  6 Jan 2023  14217563   1272299
## 108 108             Montenegro 10 May 2021    394388     98449
## 107 107               Mongolia 10 Jul 2021   3354200    136053
## 106 106             Moldova[j] 20 Apr 2022   3213594    516864
## 105 105                 Mexico 15 Oct 2021  10503678   3749860
## 104 104              Mauritius 22 Nov 2020    289552       494
## 103 103             Mauritania 16 Apr 2021    268093     18103
## 102 102                  Malta  8 Sep 2021   1211456     36606
## 101 101                   Mali  7 Jul 2021    322504     14449
## 100 100               Maldives 13 Mar 2022   2216560    174658
## 99   99               Malaysia  7 Sep 2021  23705425   1880734
## 98   98                 Malawi 29 Nov 2022    624784     88086
## 97   97             Madagascar 19 Feb 2021    119608     19831
## 96   96          Luxembourg[i] 12 May 2022   4248188    244182
## 95   95              Lithuania 31 Jan 2023   9046584   1170108
## 94   94                  Libya 14 Apr 2022   2578215    501862
## 93   93                Liberia 17 Jul 2021    128246      5396
## 92   92                Lesotho 30 Mar 2022    431221     32910
## 91   91                Lebanon 14 Jun 2021   4599186    542649
## 90   90                 Latvia  5 Sep 2021   3630095    144518
## 89   89                   Laos  1 Mar 2021    114030        45
## 88   88             Kyrgyzstan 10 Feb 2021    695415     85253
## 87   87                 Kuwait  9 Mar 2022   7754247    624573
## 86   86                 Kosovo 31 May 2021    611357    107410
## 85   85                  Kenya  5 Mar 2021   1322806    107729
## 84   84             Kazakhstan 28 May 2021  11575012    385144
## 83   83                 Jordan  6 Jun 2021   7407053    739847
## 82   82                  Japan  1 Mar 2021   8487288    432773
## 81   81                Jamaica 30 Sep 2022   1184973    151931
## 80   80            Ivory Coast  3 Mar 2021    429177     33285
## 79   79                  Italy 16 Mar 2023 269127054  25651205
## 78   78                 Israel 17 Jan 2022  41373364   1792137
## 77   77                Ireland 31 Jan 2023  12990476   1700817
## 76   76                   Iraq  3 Aug 2022  19090652   2448484
## 75   75                   Iran 31 May 2022  52269202   7232268
## 74   74              Indonesia  3 Jul 2023  76062770   6812127
## 73   73                  India  8 Jul 2022 866177937  43585554
## 72   72                Iceland  9 Aug 2022   1988652    203162
## 71   71                Hungary 10 May 2022  11394556   1909948
## 70   70               Honduras 26 Nov 2021   1133782    377859
## 69   69                  Haiti 26 Nov 2022    223475     33874
## 68   68                 Guyana 15 Jun 2022    648569     66129
## 67   67          Guinea-Bissau  7 Jul 2022    145231      8400
## 66   66                 Guinea 21 Jul 2021    494898     24878
## 65   65              Guatemala  6 Jan 2023   6800560   1230098
## 64   64                Grenada 11 May 2021     28684       161
## 63   63              Greenland 30 Jan 2022    164573     10662
## 62   62                 Greece 18 Dec 2022 101576831   5548487
## 61   61                  Ghana  3 Jul 2021   1305749     96708
## 60   60                Germany  7 Jul 2021  65247345   3733519
## 59   59             Georgia[h]  3 Nov 2021   4888787    732965
## 58   58                 Gambia 15 Feb 2021     43217      4469
## 57   57                  Gabon 23 Jul 2021    958807     25325
## 56   56           France[f][g] 15 May 2022 272417258  29183646
## 55   55                Finland 14 Jan 2022   9042453    371135
## 54   54                   Fiji  2 Jan 2023    667953     68848
## 53   53          Faroe Islands 27 Feb 2022    774000     34237
## 52   52               Ethiopia 24 Jun 2021   2981185    278446
## 51   51               Eswatini  8 Dec 2021    415110     49253
## 50   50                Estonia 31 Jan 2023   3637908    613954
## 49   49      Equatorial Guinea 30 Jan 2023    403773     17113
## 48   48            El Salvador 18 Mar 2022   1847861    161052
## 47   47                  Egypt 23 Jul 2021   3137519    283947
## 46   46                Ecuador 23 Jul 2021   1627189    480720
## 45   45               DR Congo 28 Feb 2021    124838     25961
## 44   44     Dominican Republic 22 Jul 2022   3574665    626030
## 43   43               Dominica 20 Jun 2022    209803     14821
## 42   42               Djibouti 28 Apr 2022    305941     15631
## 41   41             Denmark[e] 31 Jan 2023  67682707   3399947
## 40   40                Czechia  1 Feb 2023  22544928   4590529
## 39   39              Cyprus[d] 29 Jan 2023  27820163    644160
## 38   38                   Cuba  2 Feb 2023  14301394   1112470
## 37   37                Croatia  2 Feb 2023   5481285   1267798
## 36   36             Costa Rica  2 Nov 2021   2575363    561054
## 35   35               Colombia 24 Nov 2022  36875818   6314769
## 34   34               China[c] 31 Jul 2020 160000000     87655
## 33   33                  Chile  1 Feb 2023  48154268   5123007
## 32   32                   Chad  2 Mar 2021     99027      4020
## 31   31                 Canada 26 Nov 2022  66343123   4423053
## 30   30               Cameroon 18 Feb 2021    942685     32681
## 29   29               Cambodia  1 Aug 2021   1812706     77914
## 28   28                Burundi  5 Jan 2021     90019       884
## 27   27           Burkina Faso  4 Mar 2021    158777     12123
## 26   26               Bulgaria  2 Feb 2023  10993239   1295524
## 25   25                 Brunei  2 Aug 2021    153804       338
## 24   24                 Brazil 19 Feb 2021  23561497  10081676
## 23   23               Botswana 11 Jan 2022   2026898    232432
## 22   22 Bosnia and Herzegovina 27 Sep 2022   1872934    399887
## 21   21                Bolivia  5 Jun 2022   4358669    910228
## 20   20                 Bhutan 28 Feb 2022   1736168     12702
## 19   19                  Benin  4 May 2021    595112      7884
## 18   18                 Belize  8 Jun 2022    572900     60694
## 17   17                Belgium 24 Jan 2023  36548544   4691499
## 16   16                Belarus  9 May 2022  13217569    982809
## 15   15               Barbados 14 Oct 2022    770100    103014
## 14   14             Bangladesh 24 Jul 2021   7417714   1151644
## 13   13                Bahrain  3 Dec 2022  10578766    696614
## 12   12                Bahamas 28 Nov 2022    259366     37483
## 11   11             Azerbaijan 11 May 2022   6838458    792638
## 10   10                Austria  1 Feb 2023 205817752   5789991
## 9     9              Australia  9 Sep 2022  78548492  10112229
## 8     8                Armenia 29 May 2022   3099602    422963
## 7     7              Argentina 16 Apr 2022  35716069   9060495
## 6     6    Antigua and Barbuda  6 Mar 2021     15268       832
## 5     5                 Angola  2 Feb 2021    399228     20981
## 4     4                Andorra 23 Feb 2022    300307     37958
## 3     3                Algeria  2 Nov 2020    230553     58574
## 2     2                Albania 18 Feb 2021    428654     96838
## 1     1            Afghanistan 17 Dec 2020    154767     49621
##     confirmed.tested.ratio tested.population.ratio confirmed.population.ratio
## 172                 10.200                 17.0000                    1.70000
## 171                  9.500                 19.0000                    1.80000
## 170                 24.900                 46.4000                   11.60000
## 169                  5.000                 11.0000                    0.55000
## 168                  1.700                  7.7000                    0.13000
## 167                 14.700                175.0000                   25.80000
## 166                  9.800                281.0000                   27.40000
## 165                  4.300                774.0000                   32.90000
## 164                  0.530               2070.0000                   10.90000
## 163                 21.500                 37.2000                    8.00000
## 162                  4.700                  1.9000                    0.08700
## 161                  8.900                 73.6000                    6.50000
## 160                 24.300                 24.5000                    6.00000
## 159                 18.100                 37.6000                    6.80000
## 158                  4.900                  9.4000                    0.46000
## 157                  1.700                  2.3000                    0.03800
## 156                 13.100                  0.0065                    0.00085
## 155                 28.480                128.3000                   36.52800
## 154                 18.400                270.0000                   49.70000
## 153                 10.800                 96.8000                   10.40000
## 152                 14.700                  0.3600                    0.05300
## 151                  3.900                 10.9000                    0.43000
## 150                  7.100                116.0000                    8.20000
## 149                  6.500                  1.3000                    0.08400
## 148                  1.400                 12.7000                    0.17000
## 147                 14.400                 19.2000                    2.80000
## 146                 46.800                135.0000                   63.10000
## 145                 25.200                135.0000                   34.10000
## 144                  0.400                284.0000                    1.10000
## 143                 20.300                175.0000                   35.50000
## 142                  7.400                  3.9000                    0.29000
## 141                  1.800                120.0000                    2.20000
## 140                 12.200                563.0000                   68.40000
## 139                  8.400                103.0000                    8.70000
## 138                 13.900                116.6000                   16.20000
## 137                  3.300                 57.6000                    1.90000
## 136                  3.400                 22.3000                    0.76000
## 135                  6.200                201.0000                   12.50000
## 134                 13.400                 27.9000                    3.70000
## 133                 11.700                141.0000                   16.40000
## 132                  5.500                268.0000                   14.60000
## 131                 16.600                 94.0000                   15.60000
## 130                 11.800                 34.1000                    4.00000
## 129                 11.600                109.9000                   12.70000
## 128                 24.800                 36.6000                    9.10000
## 127                  2.000                  0.5300                    0.01100
## 126                 13.800                179.0000                   24.70000
## 125                 18.600                 60.9000                   11.40000
## 124                  6.400                  4.2000                    0.27000
## 123                 22.400                 11.0000                    2.50000
## 122                  5.700                183.0000                   10.30000
## 121                  1.500               2177.0000                   31.60000
## 120                 17.700                 42.5000                    7.50000
## 119                  0.000                  0.0660                    0.00000
## 118                 10.100                  0.7500                    0.07600
## 117                  6.000                  0.3500                    0.02100
## 116                 27.500                156.0000                   42.90000
## 115                  0.320                 15.7000                    0.05000
## 114                 11.700                 83.4000                    9.70000
## 113                 17.000                 20.7000                    3.50000
## 112                 15.600                 38.7000                    6.10000
## 111                 10.900                  7.4000                    0.81000
## 110                 15.400                  2.2000                    0.34000
## 109                  8.900                 38.5000                    3.40000
## 108                 25.000                 62.5000                   15.60000
## 107                  4.100                100.0000                    4.10000
## 106                 16.100                122.0000                   19.60000
## 105                 35.700                  8.2000                    2.90000
## 104                  0.170                 22.9000                    0.03900
## 103                  6.800                  6.1000                    0.41000
## 102                  3.000                245.0000                    7.40000
## 101                  4.500                  1.6000                    0.07100
## 100                  7.900                398.0000                   31.30000
## 99                   7.900                 72.3000                    5.70000
## 98                  14.100                  3.3000                    0.46000
## 97                  16.600                  0.4600                    0.07600
## 96                   5.700                679.0000                   39.00000
## 95                  12.900                324.0000                   41.90000
## 94                  19.500                 37.6000                    7.30000
## 93                   4.200                  2.5000                    0.11000
## 92                   7.600                 21.5000                    1.60000
## 91                  11.800                 67.4000                    8.00000
## 90                   4.000                189.0000                    7.50000
## 89                   0.039                  1.6000                    0.00063
## 88                  12.300                 10.7000                    1.30000
## 87                   8.100                181.0000                   14.60000
## 86                  17.600                 33.8000                    5.90000
## 85                   8.100                  2.8000                    0.23000
## 84                   3.300                 62.1000                    2.10000
## 83                  10.000                 69.5000                    6.90000
## 82                   5.100                  6.7000                    0.34000
## 81                  12.800                 43.5000                    5.60000
## 80                   7.800                  1.6000                    0.13000
## 79                   9.500                446.0000                   42.50000
## 78                   4.300                451.0000                   19.50000
## 77                  13.100                264.0000                   34.60000
## 76                  12.800                 47.5000                    6.10000
## 75                  13.800                 62.8000                    8.70000
## 74                   9.000                 28.2000                    2.50000
## 73                   5.000                 63.0000                   31.70000
## 72                  10.200                546.0000                   55.80000
## 71                  16.800                118.0000                   19.80000
## 70                  33.300                 11.8000                    3.90000
## 69                  15.200                  2.0000                    0.30000
## 68                  10.200                 82.5000                    8.40000
## 67                   5.800                  7.7000                    0.45000
## 66                   5.000                  3.8000                    0.19000
## 65                  18.100                 39.4000                    7.10000
## 64                   0.560                 25.7000                    0.14000
## 63                   6.500                293.0000                   19.00000
## 62                   5.500                943.0000                   51.50000
## 61                   7.400                  4.2000                    0.31000
## 60                   5.700                 77.8000                    4.50000
## 59                  15.000                132.0000                   19.70000
## 58                  10.300                  2.0000                    0.21000
## 57                   2.600                  3.1000                    0.08200
## 56                  10.700                417.0000                   44.70000
## 55                   4.100                163.0000                    6.70000
## 54                  10.300                 74.5000                    7.70000
## 53                   4.400               1493.0000                   65.70000
## 52                   9.300                  2.6000                    0.24000
## 51                  11.900                 36.5000                    4.30000
## 50                  16.900                274.0000                   46.20000
## 49                   4.200                 30.8000                    1.30000
## 48                   8.700                 28.5000                    2.50000
## 47                   9.100                  3.1000                    0.28000
## 46                  29.500                  9.5000                    2.80000
## 45                  20.800                  0.1400                    0.02900
## 44                  17.500                 32.9000                    5.80000
## 43                   7.100                293.0000                   20.70000
## 42                   5.100                 33.2000                    1.70000
## 41                   5.000               1162.0000                   58.40000
## 40                  20.400                211.0000                   42.90000
## 39                   2.300               3223.0000                   74.40000
## 38                   7.800                126.0000                    9.80000
## 37                  23.100                134.0000                   31.10000
## 36                  21.800                 51.5000                   11.20000
## 35                  17.100                 76.4000                   13.10000
## 34                   0.055                 11.1000                    0.00610
## 33                  10.600                252.0000                   26.90000
## 32                   4.100                  0.7200                    0.02900
## 31                   6.700                175.0000                   11.70000
## 30                   3.500                  3.6000                    0.12000
## 29                   4.300                 11.2000                    0.48000
## 28                   0.980                  0.7600                    0.00740
## 27                   7.600                  0.7600                    0.05800
## 26                  11.800                158.0000                   18.60000
## 25                   0.220                 33.5000                    0.07400
## 24                  42.800                 11.2000                    4.80000
## 23                  11.500                 89.9000                   10.30000
## 22                  21.400                 54.7000                   11.70000
## 21                  20.900                 38.1000                    8.00000
## 20                   0.730                234.0000                    1.71000
## 19                   1.300                  5.1000                    0.06700
## 18                  10.600                140.0000                   14.90000
## 17                  12.800                317.0000                   40.70000
## 16                   7.400                139.0000                   10.40000
## 15                  13.400                268.0000                   35.90000
## 14                  15.500                  4.5000                    0.70000
## 13                   6.600                674.0000                   44.40000
## 12                  14.500                 67.3000                    9.70000
## 11                  11.600                 69.1000                    8.00000
## 10                   2.800               2312.0000                   65.00000
## 9                   12.900                313.0000                   40.30000
## 8                   13.600                105.0000                   14.30000
## 7                   25.400                 78.3000                   20.00000
## 6                    5.400                 15.9000                    0.86000
## 5                    5.300                  1.3000                    0.06700
## 4                   12.600                387.0000                   49.00000
## 3                   25.400                  0.5300                    0.13000
## 2                   22.600                 15.0000                    3.40000
## 1                   32.100                  0.4000                    0.13000

TASK 7: Identify countries names with a specific pattern

The goal of task 7 is using a regular expression to find any countries start with “United”

# Use a regular expression `United.+` to find matches
#grep is used to extract out strings that match the specified condition, in this case, any country with "United something" (the .+ reps every other characters after the United)
country_united <- grep("United.+", country, value = T) #value set to be T tells R to give the countries and not the index

# Print the matched country names
country_united
## [1] "United Arab Emirates" "United Kingdom"       "United States"

TASK 8: Pick two countries you are interested, and then review their testing data

The goal of task 8 is to compare the COVID-19 test data between two countries

# Select a subset (should be only one row) of data frame based on a selected country name and columns
which(Covid19_dframe$country == "Nigeria") #this gives the index for Nigeria
## [1] 118
Nigeria <- Covid19_dframe[118,c(2,5,8)]
Nigeria
##     country confirmed confirmed.population.ratio
## 118 Nigeria    155657                      0.076
# Select a subset (should be only one row) of data frame based on a selected country name and columns
which(Covid19_dframe$country == "Niger")  #this gives the index for Niger
## [1] 117
Niger <- Covid19_dframe[117,c(2,5,8)]
Niger
##     country confirmed confirmed.population.ratio
## 117   Niger      4740                      0.021
#bringing them together
Covid19_dframe[c(117,118),c(2,5,8)]
##     country confirmed confirmed.population.ratio
## 117   Niger      4740                      0.021
## 118 Nigeria    155657                      0.076

TASK 9: Compare which one of the selected countries has a larger ratio of confirmed cases to population

The goal of task 9 is to find out which country you have selected before has larger ratio of; confirmed cases to population, which may indicate that country has higher COVID-19 infection risk

# Use if-else statement
if (Nigeria[,3] > Niger[,3]) {
   print( "Going to Nigeria puts you at a high risk of getting Covid")
    } else {
    print("Niger isn't safe at the moment; reschedule your tour!")
    }
## [1] "Going to Nigeria puts you at a high risk of getting Covid"

TASK 10: Find countries with confirmed to population ratio rate less than a threshold

The goal of task 10 is to find out which countries have the confirmed to population ratio less than 1%, it may indicate the risk of those countries are relatively low

# Get a subset of any countries with `confirmed.population.ratio` less than the threshold
Covid19_dframe[which(Covid19_dframe$confirmed.population.ratio < 1), 2]
##  [1] "Afghanistan"         "Algeria"             "Angola"             
##  [4] "Antigua and Barbuda" "Bangladesh"          "Benin"              
##  [7] "Brunei"              "Burkina Faso"        "Burundi"            
## [10] "Cambodia"            "Cameroon"            "Chad"               
## [13] "China[c]"            "DR Congo"            "Egypt"              
## [16] "Ethiopia"            "Gabon"               "Gambia"             
## [19] "Ghana"               "Grenada"             "Guinea"             
## [22] "Guinea-Bissau"       "Haiti"               "Ivory Coast"        
## [25] "Japan"               "Kenya"               "Laos"               
## [28] "Liberia"             "Madagascar"          "Malawi"             
## [31] "Mali"                "Mauritania"          "Mauritius"          
## [34] "Mozambique"          "Myanmar"             "New Caledonia"      
## [37] "Niger"               "Nigeria"             "North Korea"        
## [40] "Pakistan"            "Papua New Guinea"    "Rwanda"             
## [43] "Senegal"             "South Korea"         "South Sudan"        
## [46] "Sri Lanka"           "Sudan"               "Tanzania"           
## [49] "Thailand"            "Togo"                "Uganda"             
## [52] "Uzbekistan"          "Venezuela"

Extra insights (Not part of the project).

#Trying to give insights from the Covid data; based on the fact that a high CPR means the infection risk is high
results <- ifelse(Covid19_dframe$confirmed.population.ratio < 1,
                  "This country is a better option",
                  "Retreat!")

# To add the results as a new column to your dataframe
Covid19_dframe$Advice <- results

#To see the whole data frame
Covid19_dframe
##       X                country        date    tested confirmed
## 1     1            Afghanistan 17 Dec 2020    154767     49621
## 2     2                Albania 18 Feb 2021    428654     96838
## 3     3                Algeria  2 Nov 2020    230553     58574
## 4     4                Andorra 23 Feb 2022    300307     37958
## 5     5                 Angola  2 Feb 2021    399228     20981
## 6     6    Antigua and Barbuda  6 Mar 2021     15268       832
## 7     7              Argentina 16 Apr 2022  35716069   9060495
## 8     8                Armenia 29 May 2022   3099602    422963
## 9     9              Australia  9 Sep 2022  78548492  10112229
## 10   10                Austria  1 Feb 2023 205817752   5789991
## 11   11             Azerbaijan 11 May 2022   6838458    792638
## 12   12                Bahamas 28 Nov 2022    259366     37483
## 13   13                Bahrain  3 Dec 2022  10578766    696614
## 14   14             Bangladesh 24 Jul 2021   7417714   1151644
## 15   15               Barbados 14 Oct 2022    770100    103014
## 16   16                Belarus  9 May 2022  13217569    982809
## 17   17                Belgium 24 Jan 2023  36548544   4691499
## 18   18                 Belize  8 Jun 2022    572900     60694
## 19   19                  Benin  4 May 2021    595112      7884
## 20   20                 Bhutan 28 Feb 2022   1736168     12702
## 21   21                Bolivia  5 Jun 2022   4358669    910228
## 22   22 Bosnia and Herzegovina 27 Sep 2022   1872934    399887
## 23   23               Botswana 11 Jan 2022   2026898    232432
## 24   24                 Brazil 19 Feb 2021  23561497  10081676
## 25   25                 Brunei  2 Aug 2021    153804       338
## 26   26               Bulgaria  2 Feb 2023  10993239   1295524
## 27   27           Burkina Faso  4 Mar 2021    158777     12123
## 28   28                Burundi  5 Jan 2021     90019       884
## 29   29               Cambodia  1 Aug 2021   1812706     77914
## 30   30               Cameroon 18 Feb 2021    942685     32681
## 31   31                 Canada 26 Nov 2022  66343123   4423053
## 32   32                   Chad  2 Mar 2021     99027      4020
## 33   33                  Chile  1 Feb 2023  48154268   5123007
## 34   34               China[c] 31 Jul 2020 160000000     87655
## 35   35               Colombia 24 Nov 2022  36875818   6314769
## 36   36             Costa Rica  2 Nov 2021   2575363    561054
## 37   37                Croatia  2 Feb 2023   5481285   1267798
## 38   38                   Cuba  2 Feb 2023  14301394   1112470
## 39   39              Cyprus[d] 29 Jan 2023  27820163    644160
## 40   40                Czechia  1 Feb 2023  22544928   4590529
## 41   41             Denmark[e] 31 Jan 2023  67682707   3399947
## 42   42               Djibouti 28 Apr 2022    305941     15631
## 43   43               Dominica 20 Jun 2022    209803     14821
## 44   44     Dominican Republic 22 Jul 2022   3574665    626030
## 45   45               DR Congo 28 Feb 2021    124838     25961
## 46   46                Ecuador 23 Jul 2021   1627189    480720
## 47   47                  Egypt 23 Jul 2021   3137519    283947
## 48   48            El Salvador 18 Mar 2022   1847861    161052
## 49   49      Equatorial Guinea 30 Jan 2023    403773     17113
## 50   50                Estonia 31 Jan 2023   3637908    613954
## 51   51               Eswatini  8 Dec 2021    415110     49253
## 52   52               Ethiopia 24 Jun 2021   2981185    278446
## 53   53          Faroe Islands 27 Feb 2022    774000     34237
## 54   54                   Fiji  2 Jan 2023    667953     68848
## 55   55                Finland 14 Jan 2022   9042453    371135
## 56   56           France[f][g] 15 May 2022 272417258  29183646
## 57   57                  Gabon 23 Jul 2021    958807     25325
## 58   58                 Gambia 15 Feb 2021     43217      4469
## 59   59             Georgia[h]  3 Nov 2021   4888787    732965
## 60   60                Germany  7 Jul 2021  65247345   3733519
## 61   61                  Ghana  3 Jul 2021   1305749     96708
## 62   62                 Greece 18 Dec 2022 101576831   5548487
## 63   63              Greenland 30 Jan 2022    164573     10662
## 64   64                Grenada 11 May 2021     28684       161
## 65   65              Guatemala  6 Jan 2023   6800560   1230098
## 66   66                 Guinea 21 Jul 2021    494898     24878
## 67   67          Guinea-Bissau  7 Jul 2022    145231      8400
## 68   68                 Guyana 15 Jun 2022    648569     66129
## 69   69                  Haiti 26 Nov 2022    223475     33874
## 70   70               Honduras 26 Nov 2021   1133782    377859
## 71   71                Hungary 10 May 2022  11394556   1909948
## 72   72                Iceland  9 Aug 2022   1988652    203162
## 73   73                  India  8 Jul 2022 866177937  43585554
## 74   74              Indonesia  3 Jul 2023  76062770   6812127
## 75   75                   Iran 31 May 2022  52269202   7232268
## 76   76                   Iraq  3 Aug 2022  19090652   2448484
## 77   77                Ireland 31 Jan 2023  12990476   1700817
## 78   78                 Israel 17 Jan 2022  41373364   1792137
## 79   79                  Italy 16 Mar 2023 269127054  25651205
## 80   80            Ivory Coast  3 Mar 2021    429177     33285
## 81   81                Jamaica 30 Sep 2022   1184973    151931
## 82   82                  Japan  1 Mar 2021   8487288    432773
## 83   83                 Jordan  6 Jun 2021   7407053    739847
## 84   84             Kazakhstan 28 May 2021  11575012    385144
## 85   85                  Kenya  5 Mar 2021   1322806    107729
## 86   86                 Kosovo 31 May 2021    611357    107410
## 87   87                 Kuwait  9 Mar 2022   7754247    624573
## 88   88             Kyrgyzstan 10 Feb 2021    695415     85253
## 89   89                   Laos  1 Mar 2021    114030        45
## 90   90                 Latvia  5 Sep 2021   3630095    144518
## 91   91                Lebanon 14 Jun 2021   4599186    542649
## 92   92                Lesotho 30 Mar 2022    431221     32910
## 93   93                Liberia 17 Jul 2021    128246      5396
## 94   94                  Libya 14 Apr 2022   2578215    501862
## 95   95              Lithuania 31 Jan 2023   9046584   1170108
## 96   96          Luxembourg[i] 12 May 2022   4248188    244182
## 97   97             Madagascar 19 Feb 2021    119608     19831
## 98   98                 Malawi 29 Nov 2022    624784     88086
## 99   99               Malaysia  7 Sep 2021  23705425   1880734
## 100 100               Maldives 13 Mar 2022   2216560    174658
## 101 101                   Mali  7 Jul 2021    322504     14449
## 102 102                  Malta  8 Sep 2021   1211456     36606
## 103 103             Mauritania 16 Apr 2021    268093     18103
## 104 104              Mauritius 22 Nov 2020    289552       494
## 105 105                 Mexico 15 Oct 2021  10503678   3749860
## 106 106             Moldova[j] 20 Apr 2022   3213594    516864
## 107 107               Mongolia 10 Jul 2021   3354200    136053
## 108 108             Montenegro 10 May 2021    394388     98449
## 109 109                Morocco  6 Jan 2023  14217563   1272299
## 110 110             Mozambique 22 Jul 2021    688570    105866
## 111 111                Myanmar 16 Sep 2021   4047680    440741
## 112 112                Namibia  4 Jul 2022   1062663    166229
## 113 113                  Nepal 26 Jul 2022   5804358    984475
## 114 114            Netherlands  6 Jul 2021  14526293   1692834
## 115 115          New Caledonia  3 Sep 2021     41962       136
## 116 116            New Zealand 29 Jan 2023   7757935   2136662
## 117 117                  Niger 22 Feb 2021     79321      4740
## 118 118                Nigeria 28 Feb 2021   1544008    155657
## 119 119            North Korea 25 Nov 2020     16914         0
## 120 120        North Macedonia  1 Jul 2021    881870    155689
## 121 121     Northern Cyprus[k] 12 Jul 2022   7096998    103034
## 122 122                 Norway 20 Jan 2022   9811888    554778
## 123 123                   Oman 28 Oct 2020    509959    114434
## 124 124               Pakistan  5 Mar 2021   9173593    588728
## 125 125              Palestine  5 Feb 2022   3078533    574105
## 126 126                 Panama 28 Jan 2023   7475016   1029701
## 127 127       Papua New Guinea 17 Feb 2021     47490       961
## 128 128               Paraguay 27 Mar 2022   2609819    647950
## 129 129                   Peru 17 Nov 2022  36073768   4177786
## 130 130            Philippines  7 Jan 2023  34402980   4073980
## 131 131                 Poland 27 Apr 2022  36064311   5993861
## 132 132               Portugal  5 Jan 2022  27515490   1499976
## 133 133                  Qatar 11 Nov 2022   4061988    473440
## 134 134                Romania 29 Jan 2021   5405393    724250
## 135 135                 Russia  6 Jun 2022 295542733  18358459
## 136 136                 Rwanda  6 Oct 2021   2885812     98209
## 137 137  Saint Kitts and Nevis 26 Aug 2021     30231       995
## 138 138            Saint Lucia  7 Oct 2022    212132     29550
## 139 139          Saint Vincent 28 Jan 2023    113504      9585
## 140 140             San Marino 29 Jan 2023    192613     23427
## 141 141           Saudi Arabia 26 Apr 2022  41849069    753632
## 142 142                Senegal 12 Jul 2021    624502     46509
## 143 143                 Serbia  2 Feb 2023  12185475   2473599
## 144 144              Singapore  3 Aug 2021  16206203     65315
## 145 145               Slovakia  2 Feb 2023   7391882   1861034
## 146 146               Slovenia  2 Feb 2023   2826117   1322282
## 147 147           South Africa 24 May 2021  11378282   1637848
## 148 148            South Korea  1 Mar 2021   6592010     90029
## 149 149            South Sudan 26 May 2021    164472     10688
## 150 150                  Spain  1 Jul 2021  54128524   3821305
## 151 151              Sri Lanka 30 Mar 2021   2384745     93128
## 152 152                  Sudan  7 Jan 2021    158804     23316
## 153 153                 Sweden 24 May 2021   9996795   1074751
## 154 154         Switzerland[l]  7 Nov 2022  23283909   4276836
## 155 155              Taiwan[m]  3 Feb 2023  30275725   8622129
## 156 156               Tanzania 18 Nov 2020      3880       509
## 157 157               Thailand  4 Mar 2021   1579597     26162
## 158 158                   Togo  6 Jan 2023    807269     39358
## 159 159    Trinidad and Tobago  3 Jan 2022    512730     92997
## 160 160                Tunisia 23 Aug 2021   2893625    703732
## 161 161                 Turkey  2 Jul 2021  61236294   5435831
## 162 162                 Uganda 11 Feb 2021    852444     39979
## 163 163                Ukraine 24 Nov 2021  15648456   3367461
## 164 164   United Arab Emirates  1 Feb 2023 198685717   1049537
## 165 165         United Kingdom 19 May 2022 522526476  22232377
## 166 166          United States 29 Jul 2022 929349291  90749469
## 167 167                Uruguay 16 Apr 2022   6089116    895592
## 168 168             Uzbekistan  7 Sep 2020   2630000     43975
## 169 169              Venezuela 30 Mar 2021   3179074    159149
## 170 170                Vietnam 28 Aug 2022  45772571  11403302
## 171 171                 Zambia 10 Mar 2022   3301860    314850
## 172 172               Zimbabwe 15 Oct 2022   2529087    257893
##     confirmed.tested.ratio tested.population.ratio confirmed.population.ratio
## 1                   32.100                  0.4000                    0.13000
## 2                   22.600                 15.0000                    3.40000
## 3                   25.400                  0.5300                    0.13000
## 4                   12.600                387.0000                   49.00000
## 5                    5.300                  1.3000                    0.06700
## 6                    5.400                 15.9000                    0.86000
## 7                   25.400                 78.3000                   20.00000
## 8                   13.600                105.0000                   14.30000
## 9                   12.900                313.0000                   40.30000
## 10                   2.800               2312.0000                   65.00000
## 11                  11.600                 69.1000                    8.00000
## 12                  14.500                 67.3000                    9.70000
## 13                   6.600                674.0000                   44.40000
## 14                  15.500                  4.5000                    0.70000
## 15                  13.400                268.0000                   35.90000
## 16                   7.400                139.0000                   10.40000
## 17                  12.800                317.0000                   40.70000
## 18                  10.600                140.0000                   14.90000
## 19                   1.300                  5.1000                    0.06700
## 20                   0.730                234.0000                    1.71000
## 21                  20.900                 38.1000                    8.00000
## 22                  21.400                 54.7000                   11.70000
## 23                  11.500                 89.9000                   10.30000
## 24                  42.800                 11.2000                    4.80000
## 25                   0.220                 33.5000                    0.07400
## 26                  11.800                158.0000                   18.60000
## 27                   7.600                  0.7600                    0.05800
## 28                   0.980                  0.7600                    0.00740
## 29                   4.300                 11.2000                    0.48000
## 30                   3.500                  3.6000                    0.12000
## 31                   6.700                175.0000                   11.70000
## 32                   4.100                  0.7200                    0.02900
## 33                  10.600                252.0000                   26.90000
## 34                   0.055                 11.1000                    0.00610
## 35                  17.100                 76.4000                   13.10000
## 36                  21.800                 51.5000                   11.20000
## 37                  23.100                134.0000                   31.10000
## 38                   7.800                126.0000                    9.80000
## 39                   2.300               3223.0000                   74.40000
## 40                  20.400                211.0000                   42.90000
## 41                   5.000               1162.0000                   58.40000
## 42                   5.100                 33.2000                    1.70000
## 43                   7.100                293.0000                   20.70000
## 44                  17.500                 32.9000                    5.80000
## 45                  20.800                  0.1400                    0.02900
## 46                  29.500                  9.5000                    2.80000
## 47                   9.100                  3.1000                    0.28000
## 48                   8.700                 28.5000                    2.50000
## 49                   4.200                 30.8000                    1.30000
## 50                  16.900                274.0000                   46.20000
## 51                  11.900                 36.5000                    4.30000
## 52                   9.300                  2.6000                    0.24000
## 53                   4.400               1493.0000                   65.70000
## 54                  10.300                 74.5000                    7.70000
## 55                   4.100                163.0000                    6.70000
## 56                  10.700                417.0000                   44.70000
## 57                   2.600                  3.1000                    0.08200
## 58                  10.300                  2.0000                    0.21000
## 59                  15.000                132.0000                   19.70000
## 60                   5.700                 77.8000                    4.50000
## 61                   7.400                  4.2000                    0.31000
## 62                   5.500                943.0000                   51.50000
## 63                   6.500                293.0000                   19.00000
## 64                   0.560                 25.7000                    0.14000
## 65                  18.100                 39.4000                    7.10000
## 66                   5.000                  3.8000                    0.19000
## 67                   5.800                  7.7000                    0.45000
## 68                  10.200                 82.5000                    8.40000
## 69                  15.200                  2.0000                    0.30000
## 70                  33.300                 11.8000                    3.90000
## 71                  16.800                118.0000                   19.80000
## 72                  10.200                546.0000                   55.80000
## 73                   5.000                 63.0000                   31.70000
## 74                   9.000                 28.2000                    2.50000
## 75                  13.800                 62.8000                    8.70000
## 76                  12.800                 47.5000                    6.10000
## 77                  13.100                264.0000                   34.60000
## 78                   4.300                451.0000                   19.50000
## 79                   9.500                446.0000                   42.50000
## 80                   7.800                  1.6000                    0.13000
## 81                  12.800                 43.5000                    5.60000
## 82                   5.100                  6.7000                    0.34000
## 83                  10.000                 69.5000                    6.90000
## 84                   3.300                 62.1000                    2.10000
## 85                   8.100                  2.8000                    0.23000
## 86                  17.600                 33.8000                    5.90000
## 87                   8.100                181.0000                   14.60000
## 88                  12.300                 10.7000                    1.30000
## 89                   0.039                  1.6000                    0.00063
## 90                   4.000                189.0000                    7.50000
## 91                  11.800                 67.4000                    8.00000
## 92                   7.600                 21.5000                    1.60000
## 93                   4.200                  2.5000                    0.11000
## 94                  19.500                 37.6000                    7.30000
## 95                  12.900                324.0000                   41.90000
## 96                   5.700                679.0000                   39.00000
## 97                  16.600                  0.4600                    0.07600
## 98                  14.100                  3.3000                    0.46000
## 99                   7.900                 72.3000                    5.70000
## 100                  7.900                398.0000                   31.30000
## 101                  4.500                  1.6000                    0.07100
## 102                  3.000                245.0000                    7.40000
## 103                  6.800                  6.1000                    0.41000
## 104                  0.170                 22.9000                    0.03900
## 105                 35.700                  8.2000                    2.90000
## 106                 16.100                122.0000                   19.60000
## 107                  4.100                100.0000                    4.10000
## 108                 25.000                 62.5000                   15.60000
## 109                  8.900                 38.5000                    3.40000
## 110                 15.400                  2.2000                    0.34000
## 111                 10.900                  7.4000                    0.81000
## 112                 15.600                 38.7000                    6.10000
## 113                 17.000                 20.7000                    3.50000
## 114                 11.700                 83.4000                    9.70000
## 115                  0.320                 15.7000                    0.05000
## 116                 27.500                156.0000                   42.90000
## 117                  6.000                  0.3500                    0.02100
## 118                 10.100                  0.7500                    0.07600
## 119                  0.000                  0.0660                    0.00000
## 120                 17.700                 42.5000                    7.50000
## 121                  1.500               2177.0000                   31.60000
## 122                  5.700                183.0000                   10.30000
## 123                 22.400                 11.0000                    2.50000
## 124                  6.400                  4.2000                    0.27000
## 125                 18.600                 60.9000                   11.40000
## 126                 13.800                179.0000                   24.70000
## 127                  2.000                  0.5300                    0.01100
## 128                 24.800                 36.6000                    9.10000
## 129                 11.600                109.9000                   12.70000
## 130                 11.800                 34.1000                    4.00000
## 131                 16.600                 94.0000                   15.60000
## 132                  5.500                268.0000                   14.60000
## 133                 11.700                141.0000                   16.40000
## 134                 13.400                 27.9000                    3.70000
## 135                  6.200                201.0000                   12.50000
## 136                  3.400                 22.3000                    0.76000
## 137                  3.300                 57.6000                    1.90000
## 138                 13.900                116.6000                   16.20000
## 139                  8.400                103.0000                    8.70000
## 140                 12.200                563.0000                   68.40000
## 141                  1.800                120.0000                    2.20000
## 142                  7.400                  3.9000                    0.29000
## 143                 20.300                175.0000                   35.50000
## 144                  0.400                284.0000                    1.10000
## 145                 25.200                135.0000                   34.10000
## 146                 46.800                135.0000                   63.10000
## 147                 14.400                 19.2000                    2.80000
## 148                  1.400                 12.7000                    0.17000
## 149                  6.500                  1.3000                    0.08400
## 150                  7.100                116.0000                    8.20000
## 151                  3.900                 10.9000                    0.43000
## 152                 14.700                  0.3600                    0.05300
## 153                 10.800                 96.8000                   10.40000
## 154                 18.400                270.0000                   49.70000
## 155                 28.480                128.3000                   36.52800
## 156                 13.100                  0.0065                    0.00085
## 157                  1.700                  2.3000                    0.03800
## 158                  4.900                  9.4000                    0.46000
## 159                 18.100                 37.6000                    6.80000
## 160                 24.300                 24.5000                    6.00000
## 161                  8.900                 73.6000                    6.50000
## 162                  4.700                  1.9000                    0.08700
## 163                 21.500                 37.2000                    8.00000
## 164                  0.530               2070.0000                   10.90000
## 165                  4.300                774.0000                   32.90000
## 166                  9.800                281.0000                   27.40000
## 167                 14.700                175.0000                   25.80000
## 168                  1.700                  7.7000                    0.13000
## 169                  5.000                 11.0000                    0.55000
## 170                 24.900                 46.4000                   11.60000
## 171                  9.500                 19.0000                    1.80000
## 172                 10.200                 17.0000                    1.70000
##                              Advice
## 1   This country is a better option
## 2                          Retreat!
## 3   This country is a better option
## 4                          Retreat!
## 5   This country is a better option
## 6   This country is a better option
## 7                          Retreat!
## 8                          Retreat!
## 9                          Retreat!
## 10                         Retreat!
## 11                         Retreat!
## 12                         Retreat!
## 13                         Retreat!
## 14  This country is a better option
## 15                         Retreat!
## 16                         Retreat!
## 17                         Retreat!
## 18                         Retreat!
## 19  This country is a better option
## 20                         Retreat!
## 21                         Retreat!
## 22                         Retreat!
## 23                         Retreat!
## 24                         Retreat!
## 25  This country is a better option
## 26                         Retreat!
## 27  This country is a better option
## 28  This country is a better option
## 29  This country is a better option
## 30  This country is a better option
## 31                         Retreat!
## 32  This country is a better option
## 33                         Retreat!
## 34  This country is a better option
## 35                         Retreat!
## 36                         Retreat!
## 37                         Retreat!
## 38                         Retreat!
## 39                         Retreat!
## 40                         Retreat!
## 41                         Retreat!
## 42                         Retreat!
## 43                         Retreat!
## 44                         Retreat!
## 45  This country is a better option
## 46                         Retreat!
## 47  This country is a better option
## 48                         Retreat!
## 49                         Retreat!
## 50                         Retreat!
## 51                         Retreat!
## 52  This country is a better option
## 53                         Retreat!
## 54                         Retreat!
## 55                         Retreat!
## 56                         Retreat!
## 57  This country is a better option
## 58  This country is a better option
## 59                         Retreat!
## 60                         Retreat!
## 61  This country is a better option
## 62                         Retreat!
## 63                         Retreat!
## 64  This country is a better option
## 65                         Retreat!
## 66  This country is a better option
## 67  This country is a better option
## 68                         Retreat!
## 69  This country is a better option
## 70                         Retreat!
## 71                         Retreat!
## 72                         Retreat!
## 73                         Retreat!
## 74                         Retreat!
## 75                         Retreat!
## 76                         Retreat!
## 77                         Retreat!
## 78                         Retreat!
## 79                         Retreat!
## 80  This country is a better option
## 81                         Retreat!
## 82  This country is a better option
## 83                         Retreat!
## 84                         Retreat!
## 85  This country is a better option
## 86                         Retreat!
## 87                         Retreat!
## 88                         Retreat!
## 89  This country is a better option
## 90                         Retreat!
## 91                         Retreat!
## 92                         Retreat!
## 93  This country is a better option
## 94                         Retreat!
## 95                         Retreat!
## 96                         Retreat!
## 97  This country is a better option
## 98  This country is a better option
## 99                         Retreat!
## 100                        Retreat!
## 101 This country is a better option
## 102                        Retreat!
## 103 This country is a better option
## 104 This country is a better option
## 105                        Retreat!
## 106                        Retreat!
## 107                        Retreat!
## 108                        Retreat!
## 109                        Retreat!
## 110 This country is a better option
## 111 This country is a better option
## 112                        Retreat!
## 113                        Retreat!
## 114                        Retreat!
## 115 This country is a better option
## 116                        Retreat!
## 117 This country is a better option
## 118 This country is a better option
## 119 This country is a better option
## 120                        Retreat!
## 121                        Retreat!
## 122                        Retreat!
## 123                        Retreat!
## 124 This country is a better option
## 125                        Retreat!
## 126                        Retreat!
## 127 This country is a better option
## 128                        Retreat!
## 129                        Retreat!
## 130                        Retreat!
## 131                        Retreat!
## 132                        Retreat!
## 133                        Retreat!
## 134                        Retreat!
## 135                        Retreat!
## 136 This country is a better option
## 137                        Retreat!
## 138                        Retreat!
## 139                        Retreat!
## 140                        Retreat!
## 141                        Retreat!
## 142 This country is a better option
## 143                        Retreat!
## 144                        Retreat!
## 145                        Retreat!
## 146                        Retreat!
## 147                        Retreat!
## 148 This country is a better option
## 149 This country is a better option
## 150                        Retreat!
## 151 This country is a better option
## 152 This country is a better option
## 153                        Retreat!
## 154                        Retreat!
## 155                        Retreat!
## 156 This country is a better option
## 157 This country is a better option
## 158 This country is a better option
## 159                        Retreat!
## 160                        Retreat!
## 161                        Retreat!
## 162 This country is a better option
## 163                        Retreat!
## 164                        Retreat!
## 165                        Retreat!
## 166                        Retreat!
## 167                        Retreat!
## 168 This country is a better option
## 169 This country is a better option
## 170                        Retreat!
## 171                        Retreat!
## 172                        Retreat!
#To export this insightful data set
write.csv(Covid19_dframe, "C:/Users/MODEL24/Documents/Covid19_Insight.csv")