• R/O
  • SSH

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョンc198afa4ce92a530891334fddc93b6506436d579 (tree)
日時2021-03-18 05:21:13
作者Lorenzo Isella <lorenzo.isella@gmai...>
コミッターLorenzo Isella

ログメッセージ

Improvements to the bar plot and to the report.

変更サマリ

差分

diff -r 7f9aa6cadca4 -r c198afa4ce92 markdown/fiches.Rmd
--- a/markdown/fiches.Rmd Wed Mar 17 21:18:41 2021 +0100
+++ b/markdown/fiches.Rmd Wed Mar 17 21:21:13 2021 +0100
@@ -17,6 +17,17 @@
1717 library(scales)
1818 library(treemap)
1919
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+)
2031
2132
2233 # Suppress summarise info
@@ -97,8 +108,16 @@
97108
98109
99110
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+
102121 scoreboard <- readRDS("../scoreboard.RDS")
103122
104123 scoreboard_ms <- scoreboard %>%
@@ -243,7 +262,9 @@
243262 filter(year==max(year),
244263 ## duration_end>=max(year),
245264 amount_spent_aid_element_in_eur_million>0
246- )%>%
265+ )%>%
266+ mutate(scoreboard_objective=recode(scoreboard_objective,
267+ "Other"="Other policy objectives" )) %>%
247268 group_by(scoreboard_objective) %>%
248269 summarise(expenditure_objective=sum(amount_spent_aid_element_in_eur_million)) %>%
249270 ungroup %>%
@@ -294,7 +315,7 @@
294315
295316
296317 ---
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`."
298319 ---
299320
300321
@@ -304,13 +325,13 @@
304325 `r year_focus` of which `r stat_cases$n[2]` GBER (X), `r stat_cases$n[3]`
305326 notified (N) and `r stat_cases$n[1]` BER.
306327
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
308329 `r stat_cases$percent[2]`% of the total, with
309330 `r stat_cases_new$percent[1]`% of all newly implemented measured falling
310331 under GBER.
311332
312333 # 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
314335 `r total_expenditure` billion EUR for non-agricultural State aid, of
315336 which around `r stat_cases3$expenditure[2]` billion EUR under notified
316337 measures and around `r stat_cases3$expenditure[1]` billion EUR under
@@ -328,7 +349,7 @@
328349
329350 ggplot(data = stat_cases2, aes(x = year, y=expenditure,
330351 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")+
332353 ## scale_fill_viridis("Vehicle Brand\nOrigin",breaks=mybreaks, labels= mylabels, discrete=T)+
333354 ## scale_colour_viridis("Vehicle Brand\nOrigin",breaks=mybreaks, labels= mylabels, discrete=T)+
334355
@@ -355,10 +376,10 @@
355376
356377
357378 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
359380 (around `r total_expenditure_last` billion EUR).
360381
361- Finally, the amount of co-financed in `r MS` corresponded to
382+ Finally, the amount of co-financed in `r ms3` corresponded to
362383 `r cofinancing_expenditure` million EUR (around
363384 `r share_cofinancing`% of the total non-agricultural spending)and
364385 was mostly concentrated in
@@ -394,13 +415,13 @@
394415
395416
396417 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
398419 `r expenditure_by_objective$share2[1]`% was directed towards
399420 "`r expenditure_by_objective$objectives_reduced[1]`" while
400421 `r expenditure_by_objective$share2[2]`% to
401422 "`r expenditure_by_objective$objectives_reduced[2]`".
402423
403-`r MS` devoted around
424+`r ms3` devoted around
404425 `r expenditure_by_objective$share2[3]`% towards
405426 "`r expenditure_by_objective$objectives_reduced[3]`" and
406427 `r expenditure_by_objective$share2[4]`% to
@@ -428,13 +449,13 @@
428449 "`r expenditure_gber$all_objective_names_gber_only[4]`",
429450 (`r expenditure_gber$share2[4]`%).
430451
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
432453 "`r expenditure_aid$aid_instrument_name[1]`" (around
433454 `r expenditure_aid$expenditure2[1]` million EUR,
434455 `r expenditure_aid$share2[1]`% of total State aid spending),
435456 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,
438459 `r expenditure_aid$share2[2]`% of total State aid spending),
439460 and
440461 "`r expenditure_aid$aid_instrument_name[3]`" (around