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

Include population and lockdown dates in xeurope_countries data frame.

parent 76bb83ab
...@@ -96,9 +96,7 @@ loadd( ...@@ -96,9 +96,7 @@ loadd(
wgs84, wgs84,
merc, merc,
eust, eust,
pop_countries_2020,
covid, covid,
lockdown_dates,
lock lock
) )
``` ```
...@@ -135,14 +133,6 @@ covid$name <- standardise_country_names(covid$name) ...@@ -135,14 +133,6 @@ covid$name <- standardise_country_names(covid$name)
country_data <- country_data <-
xeurope_countries %>% xeurope_countries %>%
## filter(name != "Liechtenstein") %>% ## filter(name != "Liechtenstein") %>%
left_join(
lockdown_dates,
by = "name"
) %>%
left_join(
pop_countries_2020,
by = "name"
) %>%
mutate_if(is.character, as.factor) %>% mutate_if(is.character, as.factor) %>%
left_join( left_join(
deaths_by_ctry_dt %>% deaths_by_ctry_dt %>%
......
...@@ -39,20 +39,6 @@ plan <- drake_plan(## raw_data = read_excel( ...@@ -39,20 +39,6 @@ plan <- drake_plan(## raw_data = read_excel(
"Georgia", "Israel", "Jordan", "Lebanon", "Libya", "Georgia", "Israel", "Jordan", "Lebanon", "Libya",
"Moldova", "Morocco", "Syria", "Tunisia", "Ukraine"), "Moldova", "Morocco", "Syria", "Tunisia", "Ukraine"),
xeurope_countries =
enframe(
list(EU28 = eu28, EFTA = efta, Candidates = candi, Non_EU = noneu),
name = "group",
value = "name"
) %>%
unnest(cols = name) %>%
mutate(
name = standardise_country_names(name),
group = fct_inorder(group)
) %>%
select(name, group) %>%
arrange(name),
wca = c("Cameroon", "Central African Republic", "Chad", wca = c("Cameroon", "Central African Republic", "Chad",
"Congo DR", "Congo", "Equatorial Guinea", "Gabon", "Congo DR", "Congo", "Equatorial Guinea", "Gabon",
"Sao Tome and Principe", "Benin", "Burkina Faso", "Sao Tome and Principe", "Benin", "Burkina Faso",
...@@ -143,6 +129,31 @@ plan <- drake_plan(## raw_data = read_excel( ...@@ -143,6 +129,31 @@ plan <- drake_plan(## raw_data = read_excel(
merc = CRS("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs", merc = CRS("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",
doCheckCRSArgs = FALSE), doCheckCRSArgs = FALSE),
## Lock-down dates and population counts by country of the european
## and neighbouring countries
xeurope_countries =
enframe(
list(EU28 = eu28, EFTA = efta, Candidates = candi, Non_EU = noneu),
name = "group",
value = "name"
) %>%
unnest(cols = name) %>%
mutate(
name = standardise_country_names(name),
group = fct_inorder(group)
) %>%
select(name, group) %>%
arrange(name) %>%
left_join(
## Lock-down dates
lockdown_dates,
by = "name"
) %>%
left_join(
## Population counts in number of people
world_population,
by = "name"
),
eust = "MOOD has received funding from the EU Horizon 2020 Research and Innovation programme under grant agreement No 874850.", eust = "MOOD has received funding from the EU Horizon 2020 Research and Innovation programme under grant agreement No 874850.",
......
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