Revision | e9de0a7c981397f5b585ea06e830c7b6b7ddcb88 (tree) |
---|---|
Time | 2022-06-24 18:37:34 |
Author | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
Minor modifications to the code to fix some parts not working with the latest scoreboard.
@@ -1,6 +1,6 @@ | ||
1 | 1 | rm(list=ls()) |
2 | 2 | |
3 | -## last saved on Time-stamp: "2022-06-07 12:05:46 lorenzo" | |
3 | +## last saved on Time-stamp: "2022-06-24 11:34:15 lorenzo" | |
4 | 4 | |
5 | 5 | |
6 | 6 | library(tidyverse) |
@@ -31,7 +31,7 @@ | ||
31 | 31 | "IT" , "LT","LU", "LV", "MT", "NL", "PL", |
32 | 32 | "PT", "RO", "SK", "SI", "SE"), |
33 | 33 | |
34 | -country=c("Austria", "Belgium", "Bulgaria", "Cyprus", "Czech Republic", "Germany", | |
34 | +country=c("Austria", "Belgium", "Bulgaria", "Cyprus", "Czechia", "Germany", | |
35 | 35 | "Denmark", "Spain", "Estonia", "Finland", "France", "Greece", |
36 | 36 | "Croatia", "Hungary", "Ireland","Italy", "Lithuania", "Luxembourg", |
37 | 37 | "Latvia", "Malta", "Netherlands", "Poland", "Portugal", |
@@ -56,13 +56,14 @@ | ||
56 | 56 | select(scoreboard_objective,case_no, |
57 | 57 | amount_spent_aid_element_in_eur_million, |
58 | 58 | member_state, working_title ) %>% |
59 | - left_join(y=iso_map_uk, by=c("member_state"="iso3")) %>% | |
59 | + left_join(y=iso_map_uk, by=c("member_state"="country")) %>% | |
60 | 60 | filter(amount_spent_aid_element_in_eur_million>0) %>% |
61 | 61 | group_by(scoreboard_objective,case_no, |
62 | 62 | member_state, |
63 | 63 | working_title, |
64 | - iso2, | |
65 | - country) %>% | |
64 | + iso2## , | |
65 | + ## country | |
66 | + ) %>% | |
66 | 67 | summarise(amount_spent_aid_element_in_eur_million= |
67 | 68 | sum(amount_spent_aid_element_in_eur_million,na.rm=T)) %>% |
68 | 69 | ungroup %>% |