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(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() |
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 | |
```{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) |
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 | |
```{r, message=FALSE, warning=FALSE} | |
pacman::p_load(tidyverse, polite, scales, ggimage, | |
ggforce, ggtext, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
``` | |
## add_logo |
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 | |
```{r, message=FALSE, warning=FALSE} | |
pacman::p_load(tidyverse, scales, ggforce, ggtext, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
``` | |
## add_logo |
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 | |
```{r, message=FALSE, warning=FALSE} | |
pacman::p_load(tidyverse, polite, scales, ggimage, | |
ggforce, ggtext, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
``` | |
## add_logo |
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 | |
```{r, message=FALSE, warning=FALSE} | |
pacman::p_load(tidyverse, polite, scales, ggimage, | |
ggforce, ggtext, | |
rvest, glue, extrafont, ggrepel, magick) | |
loadfonts() | |
``` | |
## add_logo |
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
## Twitter: @R_by_Ryo | |
## Website: ryo-n7.github.io | |
## Packages | |
pacman::p_load(ggplot2, dplyr, glue, extrafont, ggrepel, magick, ggtext) | |
loadfonts(quiet = TRUE) | |
## load data | |
lewa_shot_contrib <- readRDS(url("https://raw.githubusercontent.com/Ryo-N7/soccer_ggplots/master/data/lewa_shot_contrib.RDS")) |
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
#### | |
# Will keep updating this so if everything isn't there yet please be patient! | |
#### | |
## Packages | |
pacman::p_load(tidyverse, polite, scales, ggimage, ggforce, | |
understatr, cowplot, kableExtra, ggbeeswarm, | |
jsonlite, xml2, qdapRegex, stringi, stringr, | |
rvest, glue, extrafont, ggrepel, magick, ggtext) |
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, polite, scales, ggimage, ggforce, | |
understatr, cowplot, kableExtra, ggbeeswarm, | |
jsonlite, xml2, qdapRegex, stringi, stringr, | |
rvest, glue, extrafont, ggrepel, magick, ggtext) | |
loadfonts(quiet = TRUE) | |
## xPts Table | |
premierleague2019 <- get_league_teams_stats("EPL", 2019) | |
## NON-PENALTY xG |
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, | |
stringr, ggtext, | |
rvest, glue, extrafont, ggrepel) | |
loadfonts(quiet = TRUE) | |
session <- bow("https://www.transfermarkt.com/liverpool-fc/leistungsdaten/verein/31/reldata/GB1%262019/plus/1") | |
print(session) | |
result_name <- scrape(session) %>% | |
html_nodes("#yw1 .bilderrahmen-fixed") %>% |
NewerOlder