Last active
August 14, 2018 16:40
-
-
Save mschnetzer/5344898d1fb558583471a9abd52fad65 to your computer and use it in GitHub Desktop.
Anteil unvergüteter Überstunden in Österreich, 2017 (https://twitter.com/matschnetzer/status/977193452650881024)
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 3 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wirtschaftszweig;Männer;Frauen | |
Land- und Forstwirtschaft;37,57648609;24,16318356 | |
Bergbau;6,037184678;20,8556419 | |
Herstellung von Waren;11,17416822;14,18680518 | |
Energieversorgung;17,69918515;8,425480793 | |
Wasserversorgung und Abfallentsorgung;13,20559856;1,622370131 | |
Bau;6,676506612;12,7185038 | |
Handel;18,07342748;17,44942456 | |
Verkehr;6,802673975;18,86434665 | |
Beherbergung und Gastronomie;21,02501184;28,27156113 | |
Information und Kommunikation;27,36075612;21,82147023 | |
Finanz- und Versicherungsdienstleistungen;16,90744434;11,41391039 | |
Grundstücks- und Wohnungswesen;4,783918726;33,4793735 | |
Freiberufliche/techn. Dienstleistungen;20,58887239;24,06809424 | |
Sonstige wirtschaftl. Dienstleistungen;10,88034832;12,42469242 | |
Öffentliche Verwaltung;5,483865713;19,15273027 | |
Erziehung und Unterricht;62,58870179;57,54867763 | |
Gesundheits- und Sozialwesen;13,51439585;12,86350379 | |
Kunst, Unterhaltung und Erholung;8,258757925;39,06489404 | |
Erbringung von sonstigen Dienstleistungen;27,78678572;22,59747765 | |
Private Haushalte mit Hauspersonal;0;29,09358513 | |
Exterritoriale Organisationen;9,762525306;32,11577933 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(ggthemes) | |
# load data | |
overtime <- read_csv2("overtime.csv") %>% mutate(highest=pmax(Männer,Frauen)) %>% arrange(highest) %>% | |
mutate(Wirtschaftszweig = factor(Wirtschaftszweig, levels = .$Wirtschaftszweig)) %>% | |
gather(Geschlecht,value,Männer:Frauen) | |
# labels | |
right_label <- overtime %>% | |
group_by(Wirtschaftszweig) %>% | |
arrange(desc(value)) %>% | |
top_n(1) | |
left_label <- overtime %>% | |
group_by(Wirtschaftszweig) %>% | |
arrange(desc(value)) %>% | |
slice(2) | |
# plot | |
ggplot(overtime, aes(x=value, y=Wirtschaftszweig)) + | |
geom_line(aes(group = Wirtschaftszweig)) + | |
geom_point(aes(color = Geschlecht), size = 1.5) + | |
geom_text(data = right_label, aes(color = Geschlecht, label = round(value, 0)), | |
size = 3, hjust = -.5) + | |
geom_text(data = left_label, aes(color = Geschlecht, label = round(value, 0)), | |
size = 3, hjust = 1.5) + | |
labs(x = "Anteil unvergüteter an gesamt geleisteten Über- und Mehrstunden in %", y="Wirtschaftszweig (ÖNACE)") + | |
theme_solarized() + ggsave("overtime.pdf",scale=1.5,width=7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment