Skip to content

Instantly share code, notes, and snippets.

View Ryo-N7's full-sized avatar

Ryo Nakagawara Ryo-N7

View GitHub Profile
# pkgs
```{r, message=FALSE, warning=FALSE}
pacman::p_load(tidyverse, polite, scales, ggimage,
ggforce, ggtext,
rvest, glue, extrafont, ggrepel, magick)
loadfonts()
```
## add_logo
@Ryo-N7
Ryo-N7 / xG_xA_plot_MD21.Rmd
Last active May 6, 2020 07:01
np-xG per 90 vs. xA per 90
# pkgs
```{r, message=FALSE, warning=FALSE}
pacman::p_load(tidyverse, polite, scales, ggimage,
ggforce, ggtext,
rvest, glue, extrafont, ggrepel, magick)
loadfonts()
```
## add_logo
@Ryo-N7
Ryo-N7 / xG_xA_plot_bundesliga_hinrunde.Rmd
Created January 14, 2020 10:04
np-xG per 90 vs. xA per 90 plot (Bundesliga 2019-2020, Hinrunde)
# pkgs
```{r, message=FALSE, warning=FALSE}
pacman::p_load(tidyverse, scales, ggforce, ggtext,
rvest, glue, extrafont, ggrepel, magick)
loadfonts()
```
## add_logo
@Ryo-N7
Ryo-N7 / progressive_pass_bundesliga_1920_hinrunde.Rmd
Last active May 6, 2020 07:01
Progressive Pass Plot (Bundesliga 2019-2020, Hinrunde)
# pkgs
```{r, message=FALSE, warning=FALSE}
pacman::p_load(tidyverse, polite, scales, ggimage,
ggforce, ggtext,
rvest, glue, extrafont, ggrepel, magick)
loadfonts()
```
## add_logo
@Ryo-N7
Ryo-N7 / epl_topgoalscorers.Rmd
Last active May 7, 2020 11:05
Premier League Top Goalscorers by Minutes Played
# pkgs
```{r, message=FALSE, warning=FALSE}
pacman::p_load(dplyr, tidyr, purrr, scales,
ggplot2, ggtext, tibble, stringr,
glue, extrafont, ggbump, forcats)
loadfonts()
```
## raw data (scraped from transfermarkt)
@Ryo-N7
Ryo-N7 / check-action-sequence-statsbomb.R
Last active December 7, 2023 18:23
Check for specific sequence of actions in StatsBomb event data
library(soccermatics)
library(StatsBombR)
library(tidyverse)
library(ggsoccer)
matchesdf <- FreeMatches(FreeCompetitions()) %>% filter(competition.competition_id == 11, season.season_id == 90)
barhue <- matchesdf %>% filter(match_id == 3773369)
barhue_df <- get.matchFree(barhue) %>% allclean()