ed_db_download | R Documentation |
This function fetches all available tables from the EIDITH database and caches the data locally for further use with the table functions. The database persists between R sessions, so you only need to run this when you want to update data. You should also run it when updating to new versions of the eidith package.
ed_db_download( p2_tables = p2_api_endpoints(), country = NULL, p1_data = FALSE, verbose = interactive() )
p2_tables |
which PREDICT-2 tables to download |
verbose |
Show messages while in progress? |
This function does a few things:
Fetches all tables from both EIDITH PREDICT-1 and PREDICT-2 databases.
Cleans and pre-processes the data with ed_process()
.
Stores the data in an SQLite database in your user data directory.
Each time this function is run it checks for updated metadata about database tables, then downloads each table into a temporary database and makes sure that the structure of these tables is as expected. Only well-formed tables will be copied into the user's permanent database. If a downloaded table is missing fields, has extra fields, or is otherwise corrupted, the user will receive an error message. In the future, we will allow for updating only with new and changed records.
The function will prompt for username and password unless you have cached your credentials.
ed_db_status()
, ed_db_updates()
, ed_db_export()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.