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

Use data of update of covid data for update notice, rather than data of compilation of report.

parent 9d439189
Pipeline #14034 passed with stage
in 8 minutes and 29 seconds
......@@ -54,7 +54,8 @@ loadd(
pop_countries_2019,
covid,
lockdown_dates,
deaths_by_ctry_dt # deaths by country and date
deaths_by_ctry_dt, # deaths by country and date
data_update_date, # date of update of covid data
)
```
......@@ -71,10 +72,6 @@ european_countries <- sort(c(eu28, efta, candi, noneu)) %>%
```{r mydata, include = F}
## string for today
sdt <- format(Sys.Date(), "%d %b %Y")
## Deaths by country and date of European countries
## with population and lockdown date added
Dfr <- deaths_by_ctry_dt %>%
......@@ -164,7 +161,7 @@ sttcdr <- format(ttcdr, digits = 3)
## Main results {-}
As per `r sdt`, in the `r length(european_countries)` countries
As per `r data_update_date`, in the `r length(european_countries)` countries
accounted for, the total number of deaths is now `r sttnd` for an
overall population size of `r sttpop` millions, representing a
cumulative death rate of `r sttcdr` deaths $10^{-5}$ inhabitants.
......@@ -307,7 +304,7 @@ the total number of deaths is now `r sttnd` for an overall population size of
```{r cumul, include = T, fig.asp = 23/15, fig.cap = cap}
cap <- paste("Cumulative COVID-19 related death rate from the start",
"of the epidemic to", sdt, "in Europe. South-western",
"of the epidemic to", data_update_date, "in Europe. South-western",
"European countries are labelled in red.",
"Total deaths are indicated within braces at the",
"right of each data point.")
......@@ -376,7 +373,7 @@ for(i in seq_along(onam)){
cap <- paste0(
"Cumulative mortality rate (deaths / 100,000 inh.) ",
"attributed to COVID-19 in Europe: situation on ", sdt,
"attributed to COVID-19 in Europe: situation on ", data_update_date,
". The countries are listed in the legend and numbered on ",
"the map (number of deaths in braces).\n")
......
......@@ -32,6 +32,9 @@ plan <- drake_plan(
last_day = Sys.Date() - 1,
covid = ecdc_covid19(last_day),
## String notice for data update
data_update_date = format(last_day, "%d %b %Y"),
## Lock-down dates
lockdown_dates = read_excel(file_in("data/lockdown.xlsx")) %>%
transmute(
......
Supports Markdown
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