Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. data2<-read_csv("data-Uvm9r.csv", skip=1, col_names = c("year","Other","Sales &amp commerce, transportation professions","Hotel industry, restaurants, personal services sector","Health, teaching, culture, science professions","Management, administration, banking &amp insurance, legal professions","Management, administration, banking & insurance, legal professions"
  2. ) )
  3.  
  4. data22 <- data2[-c(7)] %>% gather("type", "val", -year)
  5.  
  6. data22 %>%
  7. ggplot(aes(year, val, col=type)) +
  8. geom_point(data=filter(data22, year %in% c(min(year), max(year))), shape=18, size=6) +
  9. geom_smooth(se=FALSE) +
  10. geom_text(data = filter(data22, year==max(year)), aes(label=type, hjust=-.1)) +
  11. theme(panel.background = element_blank(),
  12. panel.grid.major.x = element_blank(),
  13. panel.grid.major.y = element_line( size=.1, color="gray" ),
  14. axis.line.x = element_line(color = "black"),
  15. axis.ticks = element_blank(),
  16. legend.position = "none") +
  17.  
  18. scale_y_continuous(breaks = seq(0, 600000, 50000), limits=c(0,650000)) +
  19. scale_x_continuous(breaks = seq(1970, 2016, 5), limits = c(1970, 2060)) +
  20. #scale_x_discrete(breaks=NULL) +
  21. scale_colour_brewer(palette = "Reds") +
  22. ylab("") +
  23. xlab("") +
  24. labs (
  25. title = "The rise in the employment rate of women has mostly happened in higher-qualified sectors",
  26. subtitle = "Female labour participation in Switzerland by job cluster, 1970-2016",
  27. caption = "Source: Federal Statistical Office Get the data"
  28. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement