Révision | f779821ae162ec2a11c3780af2954eeefcd42505 (tree) |
---|---|
l'heure | 2024-11-22 23:21:26 |
Auteur | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I added some stats at the end of the code.
@@ -480,4 +480,26 @@ | ||
480 | 480 | ggsave("../output/expenditure_sector_no_covid_ukr.pdf", gpl, width=10,height=15, device = cairo_pdf) |
481 | 481 | |
482 | 482 | |
483 | +top_sectors_no_covid_ukr <- expenditure_sector_year_no_covid_ukr |> | |
484 | + filter(top=="yes") |> | |
485 | + pull(nace1) |> | |
486 | + su() | |
487 | + | |
488 | + | |
489 | + | |
490 | +df_recent_nace1 <- df_recent_clean_nace |> | |
491 | + mutate(nace1=df_sec$sector) | |
492 | + | |
493 | + | |
494 | +df_top_nace <- df_recent_nace1 |> | |
495 | + filter(nace1 %in% top_sectors_no_covid_ukr) |> | |
496 | + group_by(expenditure_year, nace1, sa_case_number) |> | |
497 | + summarise(total_aid=sum(aid_element_eur, na.rm=T), .groups="drop") |> | |
498 | + group_by(expenditure_year, nace1) |> | |
499 | + arrange(desc(total_aid)) |> | |
500 | + slice(1:5) |> | |
501 | + ungroup() | |
502 | + | |
503 | + | |
504 | + | |
483 | 505 | print("So far so good") |