リビジョン | c198afa4ce92a530891334fddc93b6506436d579 (tree) |
---|---|
日時 | 2021-03-18 05:21:13 |
作者 | Lorenzo Isella <lorenzo.isella@gmai...> |
コミッター | Lorenzo Isella |
Improvements to the bar plot and to the report.
@@ -17,6 +17,17 @@ | ||
17 | 17 | library(scales) |
18 | 18 | library(treemap) |
19 | 19 | |
20 | +iso_map <- tibble(iso3=c("AUT", "BEL", "BGR", "CYP", "CZE", "DEU", "DNK", "ESP", "EST", "FIN", | |
21 | +"FRA", | |
22 | +"GRC", "HRV", "HUN", "IRL", "ITA", "LTU", "LUX", "LVA", "MLT", | |
23 | +"NLD", "POL", "PRT", | |
24 | +"ROM", "SVK", "SVN", "SWE"), | |
25 | +country=c("Austria", "Belgium", "Bulgaria", "Cyprus", "Czech Republic", "Germany", | |
26 | + "Denmark", "Spain", "Estonia", "Finland", "France", "Greece", | |
27 | + "Croatia", "Hungary", "Ireland","Italy", "Lituania", "Luxembourg", | |
28 | + "Latvia", "Malta", "Netherlands", "Poland", "Portugal", | |
29 | + "Romania", "Slovakia", "Slovenia", "Sweden") | |
30 | +) | |
20 | 31 | |
21 | 32 | |
22 | 33 | # Suppress summarise info |
@@ -97,8 +108,16 @@ | ||
97 | 108 | |
98 | 109 | |
99 | 110 | |
100 | -MS <- "AUT" | |
101 | - | |
111 | +MS <- "FRA" | |
112 | + | |
113 | +ms3 <- iso_map %>% | |
114 | + filter(iso3==MS) %>% | |
115 | + pull(country) %>% | |
116 | + as.character | |
117 | + | |
118 | + | |
119 | + | |
120 | + | |
102 | 121 | scoreboard <- readRDS("../scoreboard.RDS") |
103 | 122 | |
104 | 123 | scoreboard_ms <- scoreboard %>% |
@@ -243,7 +262,9 @@ | ||
243 | 262 | filter(year==max(year), |
244 | 263 | ## duration_end>=max(year), |
245 | 264 | amount_spent_aid_element_in_eur_million>0 |
246 | - )%>% | |
265 | + )%>% | |
266 | + mutate(scoreboard_objective=recode(scoreboard_objective, | |
267 | + "Other"="Other policy objectives" )) %>% | |
247 | 268 | group_by(scoreboard_objective) %>% |
248 | 269 | summarise(expenditure_objective=sum(amount_spent_aid_element_in_eur_million)) %>% |
249 | 270 | ungroup %>% |
@@ -294,7 +315,7 @@ | ||
294 | 315 | |
295 | 316 | |
296 | 317 | --- |
297 | -title: "Country Focus on `r MS` in the Year `r year_focus`." | |
318 | +title: "Country Focus on `r ms3` in the Year `r year_focus`." | |
298 | 319 | --- |
299 | 320 | |
300 | 321 |
@@ -304,13 +325,13 @@ | ||
304 | 325 | `r year_focus` of which `r stat_cases$n[2]` GBER (X), `r stat_cases$n[3]` |
305 | 326 | notified (N) and `r stat_cases$n[1]` BER. |
306 | 327 | |
307 | -In `r year_focus`, the share of GBER measures in `r MS` reached | |
328 | +In `r year_focus`, the share of GBER measures in `r ms3` reached | |
308 | 329 | `r stat_cases$percent[2]`% of the total, with |
309 | 330 | `r stat_cases_new$percent[1]`% of all newly implemented measured falling |
310 | 331 | under GBER. |
311 | 332 | |
312 | 333 | # State Aid Spending - Overview |
313 | -Between `r ini_focus` and `r year_focus` `r MS` spent | |
334 | +Between `r ini_focus` and `r year_focus` `r ms3` spent | |
314 | 335 | `r total_expenditure` billion EUR for non-agricultural State aid, of |
315 | 336 | which around `r stat_cases3$expenditure[2]` billion EUR under notified |
316 | 337 | measures and around `r stat_cases3$expenditure[1]` billion EUR under |
@@ -328,7 +349,7 @@ | ||
328 | 349 | |
329 | 350 | ggplot(data = stat_cases2, aes(x = year, y=expenditure, |
330 | 351 | fill=procedure_name)) + |
331 | - geom_bar(position="dodge", stat="identity", alpha=1, color="black")+ | |
352 | + geom_bar(position=position_dodge2(preserve="single"), stat="identity", alpha=1, color="black")+ | |
332 | 353 | ## scale_fill_viridis("Vehicle Brand\nOrigin",breaks=mybreaks, labels= mylabels, discrete=T)+ |
333 | 354 | ## scale_colour_viridis("Vehicle Brand\nOrigin",breaks=mybreaks, labels= mylabels, discrete=T)+ |
334 | 355 |
@@ -355,10 +376,10 @@ | ||
355 | 376 | |
356 | 377 | |
357 | 378 | In `r year_focus`, State aid spending for the 5 biggest State aid |
358 | - measures in `r MS` absorbed `r top5_share`% of the total spending | |
379 | + measures in `r ms3` absorbed `r top5_share`% of the total spending | |
359 | 380 | (around `r total_expenditure_last` billion EUR). |
360 | 381 | |
361 | - Finally, the amount of co-financed in `r MS` corresponded to | |
382 | + Finally, the amount of co-financed in `r ms3` corresponded to | |
362 | 383 | `r cofinancing_expenditure` million EUR (around |
363 | 384 | `r share_cofinancing`% of the total non-agricultural spending)and |
364 | 385 | was mostly concentrated in |
@@ -394,13 +415,13 @@ | ||
394 | 415 | |
395 | 416 | |
396 | 417 | Around `r sum(expenditure_by_objective$share2[1:2])`% of State aid |
397 | - spending in `r MS` was concentrated in two main policy objectives. Around | |
418 | + spending in `r ms3` was concentrated in two main policy objectives. Around | |
398 | 419 | `r expenditure_by_objective$share2[1]`% was directed towards |
399 | 420 | "`r expenditure_by_objective$objectives_reduced[1]`" while |
400 | 421 | `r expenditure_by_objective$share2[2]`% to |
401 | 422 | "`r expenditure_by_objective$objectives_reduced[2]`". |
402 | 423 | |
403 | -`r MS` devoted around | |
424 | +`r ms3` devoted around | |
404 | 425 | `r expenditure_by_objective$share2[3]`% towards |
405 | 426 | "`r expenditure_by_objective$objectives_reduced[3]`" and |
406 | 427 | `r expenditure_by_objective$share2[4]`% to |
@@ -428,13 +449,13 @@ | ||
428 | 449 | "`r expenditure_gber$all_objective_names_gber_only[4]`", |
429 | 450 | (`r expenditure_gber$share2[4]`%). |
430 | 451 | |
431 | -In terms of State aid instruments, `r MS` privileged the use of | |
452 | +In terms of State aid instruments, `r ms3` privileged the use of | |
432 | 453 | "`r expenditure_aid$aid_instrument_name[1]`" (around |
433 | 454 | `r expenditure_aid$expenditure2[1]` million EUR, |
434 | 455 | `r expenditure_aid$share2[1]`% of total State aid spending), |
435 | 456 | followed by |
436 | -"`r expenditure_aid$aid_instrument_name[2]`" ( | |
437 | -`r expenditure_aid$expenditure2[2]` million EUR, | |
457 | +"`r expenditure_aid$aid_instrument_name[2]`" | |
458 | +(`r expenditure_aid$expenditure2[2]` million EUR, | |
438 | 459 | `r expenditure_aid$share2[2]`% of total State aid spending), |
439 | 460 | and |
440 | 461 | "`r expenditure_aid$aid_instrument_name[3]`" (around |