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(msthemes) | |
library(viridis) | |
library(haven) | |
library(MetBrewer) | |
mz <- read_dta("mz2019.dta") | |
mz |> select(gewjahr, bsex, dteil) |> |
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, STATcubeR, janitor, ggbump, ggtext, colorspace, futurevisions, msthemes) | |
# Set date language to German | |
Sys.setlocale(locale = "de_AT") | |
# Load latest data from Statistics Austria API | |
database <- "str:database:devpi15" | |
fields <- sc_schema_db(database) |> sc_schema_flatten("FIELD") | |
measures <- sc_schema_db(database) |> sc_schema_flatten("MEASURE") | |
db_schema <- sc_schema_db(database) |
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(raster) | |
library(rmapshaper) | |
library(smoothr) | |
library(patchwork) | |
library(showtext) | |
select <- dplyr::select |
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(msthemes) | |
library(sf) | |
library(showtext) | |
font_add_google("Roboto Condensed", "Roboto") | |
font_add_google("Playfair Display", "Playfair") | |
font_add_google("Roboto Mono", "Mono") | |
showtext_opts(dpi = 320) | |
showtext_auto() |
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(haven) | |
library(msthemes) | |
library(gganimate) | |
mz <- read_dta("mz2019.dta") | |
mz |> filter(xerwstat == 1, dbers <6, dstd < 999, balt %in% 20:69, aquartal == 4) |> | |
select(asbper, gewjahr, bsex, balt, dstd, dwstd) |> | |
mutate(status = 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
librarian::shelf(tidyverse,pdftools,sf,msthemes,rayshader,wesanderson) | |
# Download PDF from Statistik Austria: https://www.statistik.at/fileadmin/publications/Lohnsteuer-2021.pdf | |
rawpdf <- pdf_text("Lohnsteuer-2021.pdf") | |
# Manual editing to obtain the required data from the two-column table | |
tmppdf <- rawpdf[67:68] |> strsplit('\n') |> unlist() | |
df <- tmppdf[c(11:55,67:86)] |> as.data.frame() |> setNames("string") |> | |
separate(string, into = c("gem","male","female", "gem2", "male2", "female2"), sep = "\\s\\s+") |
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(msthemes) | |
library(MetBrewer) | |
library(showtext) | |
df <- tribble( | |
~Geschlecht, ~Status, ~"<1", ~"1", ~"2", ~"3-5", ~"6-9", ~"10-14", | |
"Männer", "Vollzeit", 84.4, 83.2, 82.5, 83.7, 85.2, 83.5, | |
"Frauen", "Vollzeit", 8.6, 6, 11.9, 16.4, 20.1, 30.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(tidyverse) | |
library(lubridate) | |
library(httr) | |
library(jsonlite) | |
library(msthemes) | |
library(geojsonsf) | |
library(sf) | |
# Get data: https://dataset.api.hub.zamg.ac.at/app/station-new/historical/klima-v1-1d?anonymous=true or use API like here |
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, sf, ows4R, httr, msthemes, osmdata, RColorBrewer, ggtext, showtext) | |
# Add Google fonts | |
font_add_google(name = "Bodoni Moda", family = "bodoni") | |
font_add_google(name = "Roboto Slab", family = "roboto-slab") | |
font_add_google(name = "Roboto Slab", family = "roboto-slab-thin", regular.wt = 300, bold.wt = 500) | |
showtext_auto() | |
# Define map boundaries | |
bb <- c(16.3151, 48.1856, 16.4087, 48.2279) |
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 |