Skip to content

Instantly share code, notes, and snippets.

@mschnetzer
Created September 20, 2018 10:37
Show Gist options
  • Save mschnetzer/86a94ca0deaeb1554ba25a986cd535e7 to your computer and use it in GitHub Desktop.
Save mschnetzer/86a94ca0deaeb1554ba25a986cd535e7 to your computer and use it in GitHub Desktop.
Scientists and engineers per 1,000 pop
library(tidyverse)
library(eurostat)
sci <- get_eurostat("hrst_st_nocc",filters=list(geo=eu_countries$code,unit="THS",isco08="TOTAL",category="SE",age="Y25-64",lastTimePeriod=1),type="code",time_format = "num") %>%
select(geo,values) %>% rename(sci=values)
pop <- get_eurostat("demo_gind",filters=list(geo=eu_countries$code,indic_de="JAN",lastTimePeriod=1),type="code",time_format = "num") %>%
select(geo,values) %>% rename(pop=values)
# Scientists are measures in Thousands
data <- left_join(sci,pop,by="geo") %>% mutate(scipop = round(sci*1000/pop*1000,0)) %>%
arrange(desc(scipop))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment