Commit c79ac84c authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

Report using data up to 2020-07-22.

parent 29678d19
Pipeline #17727 passed with stage
in 4 minutes and 11 seconds
......@@ -124,9 +124,6 @@ Lock <- do.call(
# pull(n) %>%
# identical(rep(1L, length(.)))
data_update_date <- format(Sys.Date() - 1,
"%d %b %Y")
## clean the data
covid$name <- standardise_country_names(covid$name)
......@@ -354,7 +351,7 @@ sharing similar mortality patterns.
## Main results {-}
As per `r data_update_date`, in the `r length(xeurope_countries$name)` countries
As per `r sdt`, in the `r length(xeurope_countries$name)` countries
accounted for, the total number of deaths is `r sttnd` for an overall
population size of `r round(ttpop/1e6)` millions representing a
cumulative death rate of `r sttcdr` deaths $10^{-5}$ inhabitants.
......@@ -451,7 +448,7 @@ study countries.
cap <- paste("Cumulative apparent COVID-19 death rate (total",
"deaths in braces) from the start of the epidemic to",
data_update_date,
sdt,
"in Europe, as reported by the nationak public-health agencies.",
"South-western European countries are labelled in red.")
......@@ -500,7 +497,7 @@ cap <- paste0(
"Cumulative apparent mortality rate (deaths / 100,000 inh.) ",
"attributed to COVID-19 as reported by the national ",
"public-health agencies in Europe: situation on ",
data_update_date,
sdt,
". Countries are listed in the legend, and numbered on ",
"the map (cumulative reported deaths in braces).")
......@@ -1145,7 +1142,7 @@ Bosnia and Herzegovina), versus others on the right (e.g.,
Ireland). Countries are ordered along the second (vertical) axis,
according to their daily death rate at the peak (highest rate at the
top: e.g., Belgium, lowest rate at the bottom, e.g., Montenegro). Greece
seems to be in the most favorable situation, with low death rate at
seems to be in the most favourable situation, with low death rate at
the peak, and fast mortality decay after the peak. However, it is
bordered by countries with a persisting virus transmission, like
Bulgaria, North Macedonia, or even Turkey. Therefore, even in the case
......
## Interactive workflow
library(drake)
## ## source("packages.R")
## source("src/packages.R")
## ## source("functions.R")
## source("src/functions.R")
## ## loadd()
# # Interactive workflow
# source("src/packages.R")
# source("src/functions.R")
# loadd()
# The workflow plan data frame outlines what you are going to do.
plan <- drake_plan(## raw_data = read_excel(
......@@ -58,12 +55,12 @@ plan <- drake_plan(## raw_data = read_excel(
## ),
## ECDC Covid19 geographic distribution data
last_day = Sys.Date() - 1,
# last_day = Sys.Date() - 1,
last_day = as.Date("2020-07-22"),
## string for today
sdt = format(Sys.Date(),
"%d %b %Y"),
sdt = format(last_day, "%d %b %Y"),
covid = ecdc_covid19(Sys.Date() - 1) %>%
covid = ecdc_covid19(last_day) %>%
# rm some negative records that are obvious errors
# should we use NA instead?
filter(deaths >= 0),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment