This file contains 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(waffle) | |
library(viridis) | |
data <- data_frame( | |
labs = c("Betreuung/Pflege","Keine Vollzeit gewünscht","Andere persönliche Gründe","Keine Vollzeit gefunden", | |
"Aus-/Fortbildung","Krankheit","Sonstige Gründe"), | |
male = c(4.6,18.8,14.4,17.3,29.9,5.9,9.2), | |
female = c(38.6,19.2,16.54,10.5,8.9,2.5,3.7) | |
) |
This file contains 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(maptools) | |
library(ggplot2) | |
library(readr) | |
library(dplyr) | |
# Download SHP file from http://data.statistik.gv.at/web/meta.jsp?dataset=OGDEXT_POLBEZ_1 | |
# load map | |
map=readShapeSpatial("shp2018/STATISTIK_AUSTRIA_POLBEZ_20180101",verbose=TRUE) | |
class(map) | |
names(map@data) |
This file contains 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(eurostat) | |
library(tidyverse) | |
library(RColorBrewer) | |
library(ggthemes) | |
# Vector with capital cities only | |
caps <- c(paste0(c("AT","BE","BG","CY","CZ","DE","DK","EE","EK","EL","ES","FI","FR","HR","HU","IE","IS", | |
"IT","LT","LU","LV","MT","NO","PL","PT","RO","SE","SI","SK","TR"), '001C1'),"NL002C1","FI001C2","UK001K2") | |
# Load data from Eurostat Perception Survey |
This file contains 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(eurostat) | |
library(tidyverse) | |
library(ggmap) | |
data <- get_eurostat("ilc_ats07",filters=list(deg_urb="TOTAL",hhtyp="TOTAL",incgrp="TOTAL",lastTimePeriod=1),type="code",time_format = "num") %>% | |
select(geo,lev_diff,values) %>% spread(lev_diff,values) %>% mutate(ease=EASY+FEASY+VEASY,difficult=GRT+MOD+SOME) | |
map <- get_eurostat_geospatial(output_class = "df", resolution = 10,update_cache = TRUE) %>% filter(STAT_LEVL_==0) | |
mapdat <- data %>% filter(!geo %in% c("EU28","EU27","EA19","EA18")) %>% | |
mutate(cat = cut(difficult,breaks = seq(0, 100, by = 20))) %>% select(geo,cat) %>% |
This file contains 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 %>% |
This file contains 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(eurostat) | |
library(tidyverse) | |
library(forcats) | |
data <- get_eurostat("lfso_16move4j",filters=list(age="Y20-34",wstatus="UNE",sex="T",isced11="TOTAL",workstud="TOTAL"),type="code") %>% | |
select(geo,mobility,values) %>% spread(mobility,values) | |
cube <- data %>% group_by(geo) %>% mutate(pop=ifelse(is.na(NRP),TOTAL,TOTAL-NRP), | |
known=sum(MOV_EU_FOR,MOV_EXT_EU,MOV_NAT,NMOV,na.rm=TRUE), | |
unknown=pop-known, |
This file contains 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(eurostat) | |
library(ggthemes) | |
eurostat <- get_eurostat("ilc_di12",filters=list(geo=c("AT","DE")),type="code",time_format="num") | |
eurostat$time <- as.factor(eurostat$time) | |
eurostat %>% filter(time %in% 2005:2016) %>% | |
ggplot(aes(x=time,y=values,group=geo,colour=factor(geo,labels=c("Österreich","Deutschland")))) + | |
geom_line(size=1.2) + geom_point(size=1.2) + xlab(" ") + | |
ylab("Gini-Koeffizient") + labs(color = " ") + theme_fivethirtyeight() + |
This file contains 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(eurostat) | |
library(tidyverse) | |
library(RColorBrewer) | |
library(ggthemes) | |
data <- get_eurostat("ilc_ats12",filters=list(hhtyp="TOTAL",incgrp="TOTAL",unit="PC_POP"),type="label",lang="de") %>% | |
select(geo,lev_diff,values) %>% spread(lev_diff,values) %>% | |
mutate(leicht=`Leicht `+`Relativ leicht `+`Sehr leicht`,schwierig=Groß+Mässig+Einige) %>% | |
filter(!geo %in% c("Europäische Union (derzeitige Zusammensetzung)", "Europäische Union (vor dem Beitritt Kroatiens)", | |
"Euroraum (19 Länder)", "Euroraum (18 Länder)")) %>% |
This file contains 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(eurostat) | |
library(tidyverse) | |
library(stringr) | |
library(lubridate) | |
library(ggridges) | |
library(viridis) | |
library(ggthemes) | |
# Only EU countries | |
cty = eu_countries$code |
This file contains 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(eurostat) | |
library(ggmap) | |
library(msthemes) | |
# Get Eurostat data and calculate diff 2010-2017 | |
data <- get_eurostat("prc_hpi_a",filters=list(typpurch="TOTAL",unit="INX_A_AVG",time=c(2010,2017)),type="code",time_format="num") %>% | |
select(geo,time,values) %>% group_by(geo) %>% mutate(inc=(values-lag(values))/lag(values)*100) %>% filter(!is.na(inc)) %>% select(geo,inc) | |
# Create categories for changes in house prices |
OlderNewer