View source: R/load_nba_stats.R
| update_nba_stats_db | R Documentation |
update_nba_stats_db() writes one or more NBA Stats API
datasets into a database. Mirrors the NBA / MBB update_*_db() shape
but points at the load_nba_stats_* family. Each dataset is written
to its own table, named nba_stats_<dataset>.
update_nba_stats_db(
dbdir = ".",
dbname = "hoopR_db",
datasets = NULL,
seasons = TRUE,
db_connection = NULL
)
dbdir |
Directory in which the database is or shall be located. |
dbname |
File name of an existing or desired SQLite database within
|
datasets |
Character vector of dataset shortnames (see Details). |
seasons |
Optional integer vector of seasons to load. Defaults to all
available seasons ( |
db_connection |
A |
Unlike update_nba_db(), there is no historical "play-by-play table"
default to preserve, so datasets is required.
Valid datasets values:
"coaches", "draft", "game_lineups", "game_rosters", "lineups",
"officials", "pbp", "player_boxscores", "player_game_logs",
"player_season_stats", "possessions", "rosters", "schedule",
"shots", "standings", "team_boxscores", "team_season_stats".
Invisibly returns TRUE on success.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.