Révision | c8fe60415f6bc4983d0e30c3799a82ba202c0913 (tree) |
---|---|
l'heure | 2024-12-18 05:24:24 |
Auteur | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I added some extra sectorial analysis.
@@ -432,9 +432,18 @@ | ||
432 | 432 | df_recent_clean_nace_no_covid_ukr <- df_recent_clean_nace |> |
433 | 433 | filter(covid==F, ukraine==F) |
434 | 434 | |
435 | +sector_count_raw <- df_recent_clean_nace_no_covid_ukr$all_sec|>tabyl_new()|>arrange(desc(n)) | |
435 | 436 | |
436 | 437 | df_sec_temp_no_covid_ukr <- extract_nace_codes(df_recent_clean_nace_no_covid_ukr$all_sec) |
437 | 438 | |
439 | +aid_by_many_sectors <- df_recent_clean_nace_no_covid_ukr |> | |
440 | + mutate(sector=df_sec_temp_no_covid_ukr$sector) |> | |
441 | + group_by(sector) |> | |
442 | + summarise(aid_by_sector=sum(aid_element_eur, na.rm=T)) |> | |
443 | + ungroup() |> | |
444 | + arrange(desc(aid_by_sector)) |> | |
445 | + mutate(share=aid_by_sector/sum(aid_by_sector)) | |
446 | + | |
438 | 447 | |
439 | 448 | df_sec_no_covid_ukr <- expenditure_combined_sectors(df_sec_temp_no_covid_ukr, |
440 | 449 | all_nace_sectors, df_recent_clean_nace_no_covid_ukr$expenditure_year, df_recent_clean_nace_no_covid_ukr$aid_element_eur ) |