Revisão | c57a57167e7885829874fc2e4dc2fbac0935d3a1 (tree) |
---|---|
Hora | 2024-12-18 21:02:11 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I added extra stats.
@@ -434,6 +434,21 @@ | ||
434 | 434 | |
435 | 435 | sector_count_raw <- df_recent_clean_nace_no_covid_ukr$all_sec|>tabyl_new()|>arrange(desc(n)) |
436 | 436 | |
437 | +count_nace_codes <- df_recent_clean_nace_no_covid_ukr |> | |
438 | + group_by(expenditure_year) |> | |
439 | + count(all_sec) |> | |
440 | + mutate(share=n/sum(n)) |> | |
441 | + ungroup() |> | |
442 | + arrange(desc(expenditure_year), desc(n)) | |
443 | + | |
444 | + | |
445 | +count_nace_codes_wide <- count_nace_codes |> | |
446 | + rename("number_occurrences"="n") |> | |
447 | + pivot_wider(values_from=c(number_occurrences, share), names_from=expenditure_year) | |
448 | + | |
449 | + | |
450 | +save_excel(count_nace_codes_wide, "../output/sectors_no_covid_no_ukraine.xlsx") | |
451 | + | |
437 | 452 | df_sec_temp_no_covid_ukr <- extract_nace_codes(df_recent_clean_nace_no_covid_ukr$all_sec) |
438 | 453 | |
439 | 454 | aid_by_many_sectors <- df_recent_clean_nace_no_covid_ukr |> |