| Title: | Compiles dataset for the National Women's Soccer League (NWSL) |
|---|---|
| Description: | nwslR is an R package that allows users to access datasets 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. |
| Authors: | Arielle Dror [aut, cre], Tan Ho [ctb] |
| Maintainer: | Arielle Dror <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-09-19 01:45:10 UTC |
| Source: | https://github.com/nwslR/nwslR |
All available season names to pull data
available_seasons()available_seasons()
All available team abbreviations to pull data
available_teams()available_teams()
Loads match table that holds all matches played between 2016-present w/ match IDs
load_matches()load_matches()
Most, but not all, matches in table have associated stats that you can
pull by feeding match ID into load_player_match_stats or
load_team_match_stats. Match start times are in East Coast USA time.
Data dictionary holding all definitions for metrics pulls from
load_player_match_stats, load_team_match_stats,
load_player_season_stats, load_team_season_stats
load_metrics()load_metrics()
Not all metrics all available for all players, matches, teams, or seasons
Loads player level stats for a given match ID
load_player_match_stats(match_id = c())load_player_match_stats(match_id = c())
match_id |
match id available from |
See load_metrics for information about returned metrics. Not all
metrics exist for a given match. Join on load_players() and load_teams().
match <- load_player_match_stats("portland-thorns-fc-vs-kansas-city-current-2022-10-29")match <- load_player_match_stats("portland-thorns-fc-vs-kansas-city-current-2022-10-29")
Loads player level season stats for a given team ID/season
load_player_season_stats(team_id, season)load_player_season_stats(team_id, season)
team_id |
team_id available from |
season |
season available from |
See load_metrics for information about returned metrics. Not all
metrics exist for a given match. Join on load_players() and load_teams().
season <- load_player_season_stats(team_id = "POR", season = "2022") short_season <- load_player_season_stats(team_id = "POR", season = "2022_NWSL_Challenge_Cup")season <- load_player_season_stats(team_id = "POR", season = "2022") short_season <- load_player_season_stats(team_id = "POR", season = "2022_NWSL_Challenge_Cup")
Loads player table that holds player IDs for all players who have made rosters 2016-present
load_players()load_players()
Loads team level stats for a given match ID
load_team_match_stats(match_id = c())load_team_match_stats(match_id = c())
match_id |
match id available from |
See load_metrics for information about returned metrics. Not all
metrics exist for a given match. Join on load_teams().
match <- load_team_match_stats("portland-thorns-fc-vs-kansas-city-current-2022-10-29")match <- load_team_match_stats("portland-thorns-fc-vs-kansas-city-current-2022-10-29")
Loads team level season stats for a given team ID/season
load_team_season_stats(team_id, season)load_team_season_stats(team_id, season)
team_id |
team_id available from |
season |
season available from |
See load_metrics for information about returned metrics. Not all
metrics exist for a given match. Join on load_teams().
season <- load_team_season_stats(team_id = "POR", season = "2022") short_season <- load_team_season_stats(team_id = "POR", season = "2022_NWSL_Challenge_Cup")season <- load_team_season_stats(team_id = "POR", season = "2022") short_season <- load_team_season_stats(team_id = "POR", season = "2022_NWSL_Challenge_Cup")
Loads team table that holds team IDs for all teams that have played from 2016-present
load_teams()load_teams()
Wrapper on readr::read_csv() to create better error messages when
match data does not exist
read_nwsl_data(url)read_nwsl_data(url)
url |
url to pull file from |