Revisión | 4d45b9364cd538879a3045eee9c03444c8324821 (tree) |
---|---|
Tiempo | 2023-05-04 00:25:25 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
Now I also recode the instruments.
@@ -6,7 +6,7 @@ | ||
6 | 6 | library(stringr) |
7 | 7 | library(lubridate) |
8 | 8 | library(RJSDMX) |
9 | -library(haven) | |
9 | +## library(haven) | |
10 | 10 | library(arrow) |
11 | 11 | |
12 | 12 |
@@ -142,30 +142,34 @@ | ||
142 | 142 | |
143 | 143 | |
144 | 144 | |
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) | |
169 | 173 | |
170 | 174 | |
171 | 175 | aid_instr <- df_sel |> |
@@ -207,8 +211,8 @@ | ||
207 | 211 | |
208 | 212 | df_sel2 <- df_sel |> |
209 | 213 | 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)) |> | |
212 | 216 | mutate(beneficiary_type=if_else(beneficiary_type %in% c("0","1","2"), |
213 | 217 | "Small and medium-sized enterprises", |
214 | 218 | "Only large enterprises")) |> |