• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisión0eeeca691bae73b56cb039d6881c5d01ea5b26ff (tree)
Tiempo2024-03-21 20:50:49
AutorLorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

I modified the obfuscated data set.

Cambiar Resumen

Diferencia incremental

diff -r 4e6f14cc0e4e -r 0eeeca691bae R-codes/aggregate_scoreboard.R
--- a/R-codes/aggregate_scoreboard.R Wed Mar 20 17:40:57 2024 +0100
+++ b/R-codes/aggregate_scoreboard.R Thu Mar 21 12:50:49 2024 +0100
@@ -245,25 +245,33 @@
245245
246246 df_disagg_obfuscated <- df_ini |>
247247 ## mutate(type_of_aid=if_else(type_of_aid %in% c("Ad Hoc Case" , "Individual Application within scheme") , "Other", type_of_aid )) |>
248- filter(type_of_aid %!in% c("Ad Hoc Case" , "Individual Application within scheme"), expenditure_year>=2018) |>
249- summarise(expenditure_eur=sum(aid_element_eur, na.rm=T),
250- expenditure_national_currency=sum(aid_element, na.rm=T),
248+ filter(type_of_aid %!in% c("Ad Hoc Case" , "Individual Application within scheme")## , expenditure_year>=2018
249+ ) |>
250+ summarise(expenditure_eur=sum(aid_element_eur, na.rm=T)## ,
251+ ## expenditure_national_currency=sum(aid_element, na.rm=T)
252+ ,
251253 .by=c(expenditure_year,member_state_2_letter_codes, aid_instrument , scoreboard_objective, sa_case_number, type_of_aid,case_type)) |>
252- filter(expenditure_eur>0 | expenditure_national_currency>0) |>
253- arrange(member_state_2_letter_codes, expenditure_year,sa_case_number )
254+ filter(expenditure_eur>0 ## | expenditure_national_currency>0
255+ ) |>
256+ arrange(member_state_2_letter_codes, expenditure_year,sa_case_number ) |>
257+ select(member_state_2_letter_codes,sa_case_number,expenditure_year, everything() ) |>
258+ rename("member_state"="member_state_2_letter_codes",
259+ "state_aid_case_number"="sa_case_number",
260+ "year_of_expenditure"="expenditure_year",
261+ "expenditure_in_million_EUR"="expenditure_eur")
254262
255263
256264 save_csv(df_disagg_obfuscated, "disaggregated_data.csv")
257265
258-set.seed(1234)
266+## set.seed(1234)
259267
260-df_sample <- df_disagg_obfuscated[sample(nrow(df_disagg_obfuscated), 2e4) ,] |>
261- arrange(expenditure_year, member_state_2_letter_codes,
262- sa_case_number, aid_instrument,
263- scoreboard_objective, type_of_aid, case_type)
268+## df_sample <- df_disagg_obfuscated[sample(nrow(df_disagg_obfuscated), 2e4) ,] |>
269+## arrange(expenditure_year, member_state_2_letter_codes,
270+## sa_case_number, aid_instrument,
271+## scoreboard_objective, type_of_aid, case_type)
264272
265273
266-save_excel(df_sample, "sample_obfuscated_data.xlsx")
274+## save_excel(df_sample, "sample_obfuscated_data.xlsx")
267275
268276
269277