• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修订版53c5a2fbc6b200fcc9d003e3f0e8a0d7740389aa (tree)
时间2024-02-07 01:52:35
作者Lorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

Another script to obtain a special granular aggregation from the scoreboard.

更改概述

差异

diff -r 625e15fc0af9 -r 53c5a2fbc6b2 R-codes/process_scoreboard_eeag.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/R-codes/process_scoreboard_eeag.R Tue Feb 06 17:52:35 2024 +0100
@@ -0,0 +1,37 @@
1+rm(list=ls())
2+
3+library(tidyverse)
4+library(janitor)
5+library(openxlsx)
6+
7+
8+
9+source("/home/lorenzo/myprojects-hg/R-codes/stat_lib.R")
10+
11+df_ini <- readRDS("../scoreboard.RDS")
12+
13+
14+
15+df <- df_ini |>
16+ filter(scoreboard_objective=="Environmental protection including energy savings") |>
17+ filter(type_of_aid %!in% c( "Ad Hoc Case", "Individual Application within scheme" )) |>
18+ group_by(member_state,member_state_2_letter_codes, expenditure_year,
19+ sa_case_number, type_of_aid, working_title, case_type,
20+ aid_instrument,record_type,
21+ co_financed, primary_objective, scoreboard_objective,
22+ all_gber_obj,all_sec_obj,
23+ harmonised_aid_instrument,
24+ harmonised_primary_obj
25+ ) |>
26+ summarise(aid_element_million_eur=sum(aid_element_eur, na.rm=T),
27+ nominal_amount_million_eur=sum(nominal_amount_eur, na.rm=T)) |>
28+ ungroup() |>
29+ filter(aid_element_million_eur>0 | nominal_amount_million_eur >0 ) |>
30+ rename("GBER_objective"="all_gber_obj",
31+ "sector_objective"="all_sec_obj",
32+ "harmonised_primary_objective"="harmonised_primary_obj")
33+
34+save_excel(df,"EEAG_extraction.xlsx")
35+
36+
37+print("So far so good")