Revision | 7086a511dbccda2d8d05ba3890f8736eb462f710 (tree) |
---|---|
Time | 2024-11-22 17:50:33 |
Author | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
Further development of the script.
@@ -298,6 +298,38 @@ | ||
298 | 298 | df_recent_clean_nace1_no_ukr_covid <- df_recent_clean_nace1 |> |
299 | 299 | filter(covid==F, ukraine==F) |
300 | 300 | |
301 | +expenditure_no_covid_no_ukr_nace <- df_recent_clean_nace1_no_ukr_covid |> | |
302 | + group_by(expenditure_year) |> | |
303 | + summarise(total_nace=sum(aid_element_eur, na.rm=T) , .groups= "drop") | |
304 | + | |
305 | + | |
306 | +expenditure_no_covid_no_ukr <- df_recent |> | |
307 | + filter(covid==F, ukraine==F) |> | |
308 | + group_by(expenditure_year) |> | |
309 | + summarise(total=sum(aid_element_eur, na.rm=T) , .groups="drop") |> | |
310 | + left_join(y=expenditure_no_covid_no_ukr_nace, by=c("expenditure_year")) |> | |
311 | + mutate(ratio=total_nace/total) | |
312 | + | |
313 | + | |
314 | +expenditure_covid_ukr_nace <- df_recent_clean_nace1 |> | |
315 | + filter(ukraine==T | covid==T) |> | |
316 | + group_by(expenditure_year) |> | |
317 | + summarise(total_nace=sum(aid_element_eur, na.rm=T) , .groups= "drop") | |
318 | + | |
319 | + | |
320 | +expenditure_covid_ukr <- df_recent |> | |
321 | + filter(covid==T | ukraine==T) |> | |
322 | + group_by(expenditure_year) |> | |
323 | + summarise(total=sum(aid_element_eur, na.rm=T) , .groups="drop") |> | |
324 | + left_join(y=expenditure_covid_ukr_nace, by=c("expenditure_year")) |> | |
325 | + mutate(ratio=total_nace/total) | |
326 | + | |
327 | + | |
328 | +tt<- df_recent |> | |
329 | + filter(covid==T | ukraine==T) |> | |
330 | + mutate(extra=covid+ukraine) | |
331 | + | |
332 | + | |
301 | 333 | list_sector_names <- df_recent_clean_nace1 |> |
302 | 334 | select(all_sector_names) |> |
303 | 335 | distinct() |> |