knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
nwslR
is an R package that contains datasets and analysis functionality for the National Women’s Soccer League (NWSL). Founded in 2013, the NWSL is the United States’ top professional women’s soccer league, featuring players from all over the world.
Previously, data regarding the league has been disparate and often difficult to find. The goal of this package is to make it easier for fans and analysts to access and engage with all these data in one place. We're just getting started here; we still have a few issues open where we could use some help! Additionally, if you see anything you'd like added, changed, or updated, please open up a new issue of your own.
This package is currently in the process of changing and updating significantly, so it is suggested that you frequently update it so that you have access to the most recent version.
You can install the current version of nwslR from GitHub using:
devtools::install_github("adror1/nwslR")
library(nwslR)
award
: dataset of player awards received each seasonfieldplayer_overall_season_stats
: season-by-season data for each NWSL field playerfranchise
: team names, ids, and locations throughout their history in the leaguegame
: dataset of game_id
s and game results that each correspond to an individual gamegoalkeeper_season_stats
: season-by-season data for each NWSL goalkeeperstadium
: historical and current stadium information and statisticsteam_stats_season
: season level statistics for each team from the league's inception through present-dayhead(nwslR::fieldplayer_overall_season_stats)
head(nwslR::franchise, 15)
adv_team_stats #scraped and formatted dataset of hundreds of advanced team statistics from the NWSL website adv_player_stats #scraped and formatted dataset of hundreds of advanced player statistics from the NWSL website
The above data tables will eventually be deprecated. Please use the functions before, instead.
To use this function, you need to find the game_id
for a given game.
get_adv_team_stats("utah-royals-vs-washington-spirit-2019-04-20") get_adv_player_stats("utah-royals-vs-washington-spirit-2019-04-20") get_events("utah-royals-vs-washington-spirit-2019-04-20")
harris <- nwslR::player_search("Harris", goalkeeper = TRUE) head(harris)
For further examples and capabilities, please see the vignette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.