Return the data behind The Economist’s tracker for covid-19 excess deaths (which is free to read)

economist_excess_deaths()

Value

a data.frame

Author

Sean Davis seandavi@gmail.com

Examples

res = economist_excess_deaths()
colnames(res)
#>  [1] "country"         "region"          "region_code"     "start_date"     
#>  [5] "end_date"        "days"            "year"            "month"          
#>  [9] "population"      "total_deaths"    "covid_deaths"    "expected_deaths"
#> [13] "quarter"         "week"           
dplyr::glimpse(res)
#> Rows: 19,420
#> Columns: 14
#> $ country         <chr> "Albania", "Albania", "Albania", "Albania", "Albania",…
#> $ region          <chr> "Albania", "Albania", "Albania", "Albania", "Albania",…
#> $ region_code     <chr> "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",…
#> $ start_date      <date> 2020-01-01, 2020-02-01, 2020-03-01, 2020-04-01, 2020-…
#> $ end_date        <date> 2020-01-31, 2020-02-29, 2020-03-31, 2020-04-30, 2020-…
#> $ days            <int> 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28…
#> $ year            <int> 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, …
#> $ month           <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, …
#> $ population      <int> 2872934, 2872934, 2872934, 2872934, 2872934, 2872934, …
#> $ total_deaths    <dbl> 2187, 2018, 1993, 1804, 1803, 1779, 2166, 2476, 1982, …
#> $ covid_deaths    <dbl> 0, 0, 15, 16, 2, 29, 95, 127, 103, 122, 301, 371, 199,…
#> $ expected_deaths <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ quarter         <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ week            <int> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
res
#>           country     region region_code start_date   end_date days year month
#>     1:    Albania    Albania           0 2020-01-01 2020-01-31   31 2020     1
#>     2:    Albania    Albania           0 2020-02-01 2020-02-29   29 2020     2
#>     3:    Albania    Albania           0 2020-03-01 2020-03-31   31 2020     3
#>     4:    Albania    Albania           0 2020-04-01 2020-04-30   30 2020     4
#>     5:    Albania    Albania           0 2020-05-01 2020-05-31   31 2020     5
#>    ---                                                                        
#> 19416: Uzbekistan Uzbekistan           0 2021-11-01 2021-11-30   30 2021    11
#> 19417: Uzbekistan Uzbekistan           0 2021-12-01 2021-12-31   31 2021    12
#> 19418: Uzbekistan Uzbekistan           0 2022-01-01 2022-01-31   31 2022     1
#> 19419: Uzbekistan Uzbekistan           0 2022-02-01 2022-02-28   28 2022     2
#> 19420: Uzbekistan Uzbekistan           0 2022-03-01 2022-03-31   31 2022     3
#>        population total_deaths covid_deaths expected_deaths quarter week
#>     1:    2872934         2187            0              NA      NA   NA
#>     2:    2872934         2018            0              NA      NA   NA
#>     3:    2872934         1993           15              NA      NA   NA
#>     4:    2872934         1804           16              NA      NA   NA
#>     5:    2872934         1803            2              NA      NA   NA
#>    ---                                                                  
#> 19416:   33935765        12981           79              NA      NA   NA
#> 19417:   33935765        15797           83              NA      NA   NA
#> 19418:   33935765        11854           79              NA      NA   NA
#> 19419:   33935765        14613           71              NA      NA   NA
#> 19420:   33935765        13946            2              NA      NA   NA
unique(res$country)
#>   [1] "Albania"                "Algeria"                "Andorra"               
#>   [4] "Antigua and Barbuda"    "Argentina"              "Armenia"               
#>   [7] "Aruba"                  "Azerbaijan"             "Barbados"              
#>  [10] "Belarus"                "Belize"                 "Bermuda"               
#>  [13] "Bolivia"                "Bosnia and Herzegovina" "Brazil"                
#>  [16] "Brunei"                 "Cape Verde"             "Costa Rica"            
#>  [19] "Cuba"                   "Dominican Republic"     "Egypt"                 
#>  [22] "El Salvador"            "Faroe Islands"          "French Polynesia"      
#>  [25] "Georgia"                "Gibraltar"              "Greenland"             
#>  [28] "Hong Kong"              "Ireland"                "Jamaica"               
#>  [31] "Japan"                  "Jordan"                 "Kazakhstan"            
#>  [34] "Kosovo"                 "Kuwait"                 "Kyrgyzstan"            
#>  [37] "Lebanon"                "Liechtenstein"          "Macao"                 
#>  [40] "Malaysia"               "Maldives"               "Mauritius"             
#>  [43] "Moldova"                "Monaco"                 "Mongolia"              
#>  [46] "Nicaragua"              "North Macedonia"        "Oman"                  
#>  [49] "Palestine"              "Panama"                 "Paraguay"              
#>  [52] "Philippines"            "Qatar"                  "Russia"                
#>  [55] "Saint Kitts and Nevis"  "San Marino"             "Serbia"                
#>  [58] "Seychelles"             "Singapore"              "Suriname"              
#>  [61] "Taiwan"                 "Thailand"               "Ukraine"               
#>  [64] "Uruguay"                "Uzbekistan"             "Tajikistan"            
#>  [67] "Australia"              "Austria"                "Belgium"               
#>  [70] "Britain"                "Bulgaria"               "Canada"                
#>  [73] "Chile"                  "Colombia"               "Croatia"               
#>  [76] "Cyprus"                 "Czech Republic"         "Denmark"               
#>  [79] "Ecuador"                "Estonia"                "Finland"               
#>  [82] "France"                 "Germany"                "Greece"                
#>  [85] "Guatemala"              "Hungary"                "Iceland"               
#>  [88] "Iran"                   "Israel"                 "Italy"                 
#>  [91] "Latvia"                 "Lithuania"              "Luxembourg"            
#>  [94] "Malta"                  "Mexico"                 "Montenegro"            
#>  [97] "Netherlands"            "New Zealand"            "Norway"                
#> [100] "Peru"                   "Poland"                 "Portugal"              
#> [103] "Romania"                "Slovakia"               "Slovenia"              
#> [106] "South Africa"           "South Korea"            "Spain"                 
#> [109] "Sweden"                 "Switzerland"            "Tunisia"               
#> [112] "United States"          "Indonesia"              "Turkey"