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
librarian::shelf(tidyverse, pdftools, msthemes, ggtext, showtext) | |
# Add Google fonts | |
font_add_google("Alfa Slab One", "alfa") | |
font_add_google("Roboto Mono", "space", regular.wt = 200) | |
showtext_opts(dpi = 320) | |
showtext_auto(enable = TRUE) | |
# Download PDF: | |
# https://www.oegb.at/content/dam/oegb/downloads/der-ögb/Streikstatistik_2021.pdf |
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
librarian::shelf(tidyverse, janitor, ggridges, ggtext, glue, colorspace, MetBrewer, msthemes, ggforce) | |
rawdata <- read.csv2("https://data.statistik.gv.at/data/OGD_vpi58ii_VPI_1958_ii_1.csv") | |
inflation <- rawdata |> | |
mutate(datum = ym(str_extract(C.VPIZR.0, "(\\d)+"))) |> | |
select(datum, Index = F.VPIMZBM) |> | |
drop_na() |> | |
mutate(Inflation = (Index - lag(Index,12))/lag(Index,12)*100, | |
decade = factor(floor(year(datum)/10)*10)) |
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
librarian::shelf(tidyverse, janitor, ggstream, ggtext, colorspace, MetBrewer, msthemes) | |
rawdata <- read.csv2("https://data.statistik.gv.at/data/OGD_vpi15_VPI_2015_1.csv") | |
coicop <- read.csv2("https://data.statistik.gv.at/data/OGD_vpi15_VPI_2015_1_C-VPI5-0.csv") | |
inflation <- rawdata %>% | |
mutate(datum = ym(str_extract(C.VPIZR.0, "(\\d)+"))) %>% | |
left_join(coicop %>% select(code, name), by = c("C.VPI5.0"="code")) %>% | |
select(datum, Coicop = name, Beitrag = F.VPIEFVJM) %>% | |
drop_na() %>% |
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
librarian::shelf(tidyverse, msthemes, janitor, lubridate, ggstream, MetBrewer, ggtext) | |
# Data from statcube.at | |
raw <- readxl::read_xlsx("table_2022-07-27_23-59-52.xlsx", na = "-", sheet = "Data Sheet 0", range = "B11:AU57") | |
inflation <- raw %>% | |
clean_names() %>% | |
mutate(Wohnen = x04_wohnung_wasser_energie - x04_5_aufwand_fur_energie) %>% | |
select("Datum" = "x1", | |
"Inflation" = "gesamtindex_nach_coicop", |
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(lubridate) | |
library(msthemes) | |
library(geojsonsf) | |
library(sf) | |
# Get data: https://dataset.api.hub.zamg.ac.at/app/station-new/historical/klima-v1-1d?anonymous=true | |
tempdat <- read.csv("TAG Datensatz_19500101_20211231.csv") %>% | |
mutate(name = case_when( |
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(lubridate) | |
library(msthemes) | |
library(gganimate) | |
# Get data from https://zamg.ac.at/histalp/dataset/station/csv.php | |
raw <- read_csv2("HISTALP_AT_WIE_T01_1760_2025.csv", skip = 13) | |
temp <- raw %>% select(year:dec) %>% | |
pivot_longer(names_to = "month", values_to = "value", cols = jan:dec) %>% |
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(rvest) | |
library(stringi) | |
library(janitor) | |
library(countrycode) | |
library(MetBrewer) | |
library(msthemes) | |
library(patchwork) | |
url <- "https://en.wikipedia.org/wiki/List_of_weather_records#Highest_temperatures_ever_recorded" |
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
############# | |
#### ACKNOWLEDGMENTS | |
############# | |
# Thanks for the original idea and the helpful code to @grssnbchr and @benjazehr: https://timogrossenbacher.ch/2019/04/bivariate-maps-with-ggplot2-and-sf/ | |
############# | |
#### LOAD PACKAGES | |
############# |
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(sf) | |
library(msthemes) | |
library(rayshader) | |
library(wesanderson) | |
# Download the map here: https://github.com/ginseng666/GeoJSON-TopoJSON-Austria/tree/master/2021 | |
map <- st_read("bezirke_999_geo.json") %>% | |
mutate(iso = as.numeric(iso), | |
iso = ifelse(iso %in% 901:923, 900, iso)) %>% |
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(ggbump) | |
library(msthemes) | |
library(rnaturalearth) | |
library(rnaturalearthdata) | |
library(lubridate) | |
library(sf) | |
covid <- read_csv("owid-covid-data.csv") %>% filter(continent == "Europe") %>% | |
group_by(iso_code) %>% drop_na(people_vaccinated_per_hundred) %>% |