• 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ón4d45b9364cd538879a3045eee9c03444c8324821 (tree)
Tiempo2023-05-04 00:25:25
AutorLorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

Now I also recode the instruments.

Cambiar Resumen

Diferencia incremental

diff -r 149f52fc5c39 -r 4d45b9364cd5 R-codes/read_polish_tam_new.R
--- a/R-codes/read_polish_tam_new.R Wed May 03 13:59:31 2023 +0200
+++ b/R-codes/read_polish_tam_new.R Wed May 03 17:25:25 2023 +0200
@@ -6,7 +6,7 @@
66 library(stringr)
77 library(lubridate)
88 library(RJSDMX)
9-library(haven)
9+## library(haven)
1010 library(arrow)
1111
1212
@@ -142,30 +142,34 @@
142142
143143
144144
145-aid_instr_new <- c(
146-"Interest subsidy",
147-"Direct grant/ Interest rate subsidy",
148-"Guarantee",
149-"Other",
150-"Soft loan",
151-"Other forms of tax advantage",
152-"Other forms of tax advantage",
153-"Other",
154-"Other",
155-"Other forms of tax advantage",
156-"Loan/ Repayable advances",
157-"Loan/ Repayable advances",
158-"Direct grant/ Interest rate subsidy",
159-"Other",
160-"Other forms of tax advantage",
161-"Other forms of tax advantage",
162-"Soft loan",
163-"Provision of risk capital",
164-"Repayable advances",
165-"Other",
166-"Direct grant",
167-"Tax advantage or tax exemption"
168-)
145+## aid_instr_new <- c(
146+## "Interest subsidy",
147+## "Direct grant/ Interest rate subsidy",
148+## "Guarantee",
149+## "Other",
150+## "Soft loan",
151+## "Other forms of tax advantage",
152+## "Other forms of tax advantage",
153+## "Other",
154+## "Other",
155+## "Other forms of tax advantage",
156+## "Loan/ Repayable advances",
157+## "Loan/ Repayable advances",
158+## "Direct grant/ Interest rate subsidy",
159+## "Other",
160+## "Other forms of tax advantage",
161+## "Other forms of tax advantage",
162+## "Soft loan",
163+## "Provision of risk capital",
164+## "Repayable advances",
165+## "Other",
166+## "Direct grant",
167+## "Tax advantage or tax exemption"
168+## )
169+
170+
171+aid_instr_new <- read_csv("instruments.csv") |>
172+ pull(Interpretation)
169173
170174
171175 aid_instr <- df_sel |>
@@ -207,8 +211,8 @@
207211
208212 df_sel2 <- df_sel |>
209213 mutate(aid_award_ga_original=df_ini$udzielajacy_nazwa) |>
210- ## mutate(aid_award_instrument=recode_many(aid_award_instrument, aid_instr,
211- ## aid_instr_new)) |>
214+ mutate(aid_award_instrument=recode_many(aid_award_instrument, aid_instr,
215+ aid_instr_new)) |>
212216 mutate(beneficiary_type=if_else(beneficiary_type %in% c("0","1","2"),
213217 "Small and medium-sized enterprises",
214218 "Only large enterprises")) |>