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
# Packages | |
pacman::p_load(tidyverse, understatr, | |
glue, extrafont, magick) | |
loadfonts(quiet = TRUE) | |
## add_logo function from Thomas Mock | |
add_logo <- function(plot_path, logo_path, logo_position, logo_scale = 10){ | |
# Requires magick R Package https://github.com/ropensci/magick |
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
```{r message=FALSE} | |
pacman::p_load(tidyverse, scales, lubridate, ggrepel, | |
glue, extrafont, grid, gridExtra, ggtext) | |
loadfonts(quiet = TRUE) | |
``` | |
```{r} | |
lfc_elo_raw <- read_csv("http://api.clubelo.com/liverpool") |
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
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE) | |
``` | |
# Packages | |
```{r} | |
pacman::p_load(tidyverse, scales, lubridate, | |
ggrepel, glue, extrafont, |
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
1. Line-Plot | |
2. Upset Plot (scroll down or Ctrl+F "Upset-Plot") | |
# ---- Line-Plot | |
# Packages | |
```{r} | |
pacman::p_load(dplyr, purrr, tidyr, ggplot2, ggtext, extrafont, | |
scales, ggrepel, forcats, |
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
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, ggtextures, DT, | |
cowplot, rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
theme_womenWorldCup <- function( | |
title.size = 24, | |
subtitle.size = 14, | |
caption.size = 8, | |
axis.text.size = 14, | |
axis.text.x.size = 12, |
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
## pacman pkg to load/install libraries from cran | |
## polite is a github only pkg though. | |
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
## Squad details for 2010-2011 season | |
url <- "https://www.transfermarkt.com/liverpool-fc/leistungsdaten/verein/31/reldata/GB1%262010/plus/1" | |
session <- bow(url) |
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
## packages | |
library(dplyr) | |
library(tidyr) | |
library(purrr) | |
library(stringr) | |
library(rvest) | |
library(polite) ## github only | |
library(ggplot2) | |
library(scales) | |
library(glue) |
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
# pkgs | |
library(dplyr) | |
library(tidyr) | |
library(purrr) | |
library(stringr) | |
library(rvest) | |
library(polite) | |
library(ggplot2) | |
library(scales) | |
library(cowplot) |
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
## pkgs | |
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
## add_logo function from Thomas Mock | |
add_logo <- function(plot_path, logo_path, logo_position, logo_scale = 10){ | |
# Requires magick R Package https://github.com/ropensci/magick |
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
# pkgs | |
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
## add_logo function from Thomas Mock | |
add_logo <- function(plot_path, logo_path, logo_position, logo_scale = 10){ | |
# Requires magick R Package https://github.com/ropensci/magick |