update_db updates or creates a SQLite database with
play by play data of all completed games since 1999.
update_db( dbdir = ".", dbname = "pbp_db", tblname = "nflfastR_pbp", force_rebuild = FALSE, db_connection = NULL )
Directory in which the database is or shall be located
File name of an existing or desired SQLite database within
The name of the play by play data table within the database
Logical parameter to rebuild the play by play data table within the database from scratch in case the cleaned data were updated
This function creates and updates a data table with the name
within a SQLite database located in
dbdir and named
The data table combines all play by play data for every available game back
to the 1999 season and adds the most recent completed games as soon as they
are available for
force_rebuild parameter controls if the data table within the
database (not the database itself because there might be other data in it)
should be removed and rebuilt from scratch (mostly because of bugfixes in
nflfastR or its underlying data).
db_connection is intended for advanced users who want
to use other DBI drivers, such as MariaDB, Postgres or odbc.