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
| # Adapted from https://jschoeley.github.io/2018/06/30/bubble-grid-map.html | |
| library(eurostat) | |
| library(tidyverse) | |
| library(lubridate) | |
| library(sf) | |
| library(lwgeom) | |
| library(msthemes) | |
| # download eurostat data for nuts 2 regions |
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(msthemes) # https://github.com/mschnetzer/msthemes | |
| # Get data from http://www.zamg.ac.at/histalp/dataset/station/csv.php | |
| data <- read_csv2("HISTALP_AT_WIE_T01_1760_2025.csv", skip = 13) | |
| data <- data %>% mutate_at(vars("jan-dec"), list(temp = ~ .*0.1)) %>% | |
| select(year, temp) %>% filter(year %in% c(1775:2019)) %>% | |
| mutate(abw = log(temp/mean(temp))) | |
| data$draw <- 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
| library(tidyverse) | |
| library(msthemes) | |
| library(eurostat) | |
| # Download data from UNECE: http://bit.ly/2wtn9Sp | |
| data <- read.csv("marriage.csv",skip=1,na.strings=c("","..","NA"),dec=".") | |
| data <- data %>% gather(year,value, -Sex, -Country) | |
| data$year <- as.numeric(substring(data$year, 2)) | |
| # Change in EU countries where data is available |
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(worldtilegrid) | |
| library(plyr) | |
| library(tidyverse) | |
| library(countrycode) | |
| library(viridis) | |
| library(msthemes) | |
| # Get GDP per capita data from UNdata http://bit.ly/2N4hUlV | |
| data <- read.csv("undata.csv",dec=".") %>% rename(Country=Country.or.Area) %>% select(-Value.Footnotes) |
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(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)) %>% |
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
| # Download XLS, merge sheets and export as csv: http://www.statistik.at/web_de/statistiken/wirtschaft/preise/immobilien_durchschnittspreise/index.html | |
| immodat <- read_csv2("baugrundstueckspreise_2017.csv",skip = 3) %>% | |
| select(iso=B.Nr., preis=starts_with("Euro")) %>% add_row(iso=900,preis=1000) %>% | |
| filter(!is.na(iso), !is.na(preis)) %>% mutate(preis=round(preis,-1)) %>% | |
| mutate(preis=cut(preis,breaks=c(0,50,100,200,500,3000), | |
| labels=c("<50€","50-100€","100-200€","200-500€",">500€"))) | |
| source("plotmap.R") | |
| plotbezirke(dataset=immodat,fillvar="preis",wienbezirke=F,colpal=msc_palette[5: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
| library(tidyverse) | |
| library(msmaps) | |
| library(sf) | |
| # Load data | |
| pop <- read_csv2("population.csv") %>% filter(iso<901) %>% select(iso,pop) | |
| quarter <- pop %>% summarise(sum(pop)/4) %>% as.numeric() | |
| quarter <- quarter*c(0:4) | |
| # Load Geodata |
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(msmaps) | |
| library(eurostat) | |
| data <- get_eurostat("ilc_mded02",filters=list(hhtyp="TOTAL",incgrp="TOTAL",time=c("2016","2017")),type="code",time_format="num") %>% | |
| mutate(geo=recode(geo,"UK"="GB","EL"="GR")) %>% select(geo,time,values) %>% | |
| group_by(geo) %>% fill(values) %>% filter(time==2017) | |
| mapdata <- data %>% | |
| mutate(cat = cut(values, breaks = c(0,15,20,25,30,35))) %>% select(geo,cat) %>% |
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
| #### Code was adapted from https://github.com/ryantimpe/ChartOfTheDay ### | |
| #### H/T to @ryantimpe! | |
| library(tidyverse) | |
| library(rvest) | |
| library(png) | |
| library(msthemes) | |
| df <- tibble(geo=as.factor(c("Wien","Vorarlberg","Salzburg","Steiermark","Niederösterreich","Tirol","Oberösterreich","Kärnten","Burgenland")), | |
| public=c(92,66,61,58,57,55,50,42,36), |
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(rdbnomics) | |
| library(scales) | |
| library(ggrepel) | |
| library(msthemes) | |
| unemp <- rdb(ids='OECD/MEI/AUT.LMUNRRTT.STSA.Q') | |
| unemp$draw <- 1 | |
| unemp <- unemp %>% mutate(label = case_when( | |
| value == max(value) ~ 1, |