Skip to content

Instantly share code, notes, and snippets.

View tannenberg's full-sized avatar

Marcus Tannenberg tannenberg

View GitHub Profile
library(rio)
library(tidyverse)
library(spotifyr)
library(fuzzyjoin)
library(ggrepel)
#lets get the rapper's vocabulary count data
rappers <- import("https://docs.google.com/spreadsheets/d/1HIIfgDpNMM-j0hoQHN-yP5P1lNOfJuvym0u0sdWwD9g/edit#gid=737896402") %>%
filter(!is.na(recalc)) %>% #rm those that we don't have word count data for
as_tibble() %>%
@tannenberg
tannenberg / swe-regents.R
Last active December 7, 2018 09:57
First try at web-scraping with rvest to plot age-tenure of the Regents of Sweden
#webscraping livrustkammaren to create a age-tenure graph of Swedish regents
#inspired by https://gist.github.com/acoppock
library(rvest)
library(tidyverse)
library(stringr)
library(lubridate)
library(ggrepel)
library(stringr)
@tannenberg
tannenberg / swe-pm.R
Last active November 30, 2018 14:05
Age-tenure graph for all prime ministers of Sweden (more web-scraping with rvest, then mostly tidy but also some base R)
#webscraping wiki to create a age-tenure graph of Swedish PMs
#inspired by https://gist.github.com/acoppock
library(rvest)
library(tidyverse)
library(stringr)
library(lubridate)
library(ggrepel)
library(stringr)