Jeena@jemmy.jeena.net to Europe@feddit.deEnglish · 11 months agoEU Budget - Which Countries are EU Contributors and Beneficiaries?jemmy.jeena.netimagemessage-square53fedilinkarrow-up1241arrow-down118file-text
arrow-up1223arrow-down1imageEU Budget - Which Countries are EU Contributors and Beneficiaries?jemmy.jeena.netJeena@jemmy.jeena.net to Europe@feddit.deEnglish · 11 months agomessage-square53fedilinkfile-text
minus-squaretal@lemmy.todaylinkfedilinkEnglisharrow-up13·edit-211 months agoAlso, a Markdown table rendition: eu-contribution-per-capita-markdown.r if (!require("pacman")) install.packages("pacman") pacman::p_load( countrycode, dplyr, r2country, simplermarkdown ) abs <- read.csv("statista-netcontrib.csv",header = TRUE) abs2 <- cbind(abs,name = countrycode(abs$country,"iso2c","country.name")) df <- inner_join(country_names, abs2) df2 <- inner_join(country_population, df) df2$percap <- df2$netcontrib/df2$population2023*1000000 df3 <- arrange(df2,-percap) md_table(df3) name percap Netherlands 386.91124 Germany 302.86855 Denmark 297.09908 Sweden 267.98643 Finland 199.90810 France 181.71677 Austria 168.68113 Ireland 136.52768 Italy 56.76638 Malta -26.94577 Spain -40.25217 Slovenia -182.27546 Cyprus -187.34343 Romania -214.99549 Belgium -250.73894 Slovakia -257.60767 Bulgaria -267.84703 Portugal -299.21568 Lithuania -300.05251 Poland -315.86485 Greece -408.10926 Hungary -438.25808 Croatia -449.01298 Estonia -533.72029 Latvia -819.79399 Luxembourg -3056.85909
minus-squareWhelks_chance@lemmy.worldlinkfedilinkEnglisharrow-up3·11 months agoThis is very clever. Is Lemmy actually running the code to achieve this, or did you paste it just so other people can replicate the process?
minus-squaretal@lemmy.todaylinkfedilinkEnglisharrow-up5·11 months agoNah, I just pasted it so that other people can reproduce.
Also, a Markdown table rendition:
eu-contribution-per-capita-markdown.r
This is very clever. Is Lemmy actually running the code to achieve this, or did you paste it just so other people can replicate the process?
Nah, I just pasted it so that other people can reproduce.