Releases
We release new versions of the Peekbank database as new data becomes available. To ensure reproducibility, we maintain database versions associated with each publication by the Peekbank team. Visualizations and the peekbankr
package will always use the most recent database version by default. The R API peekbankr
can be directed to use any recent database version by using the db_version
parameter.
2022.1 |
Peekbank version for reproducing Zettersten et al. (2023), Behavior Research Methods, https://doi.org/10.3758/s13428-022-01906-4. | |
2021.1 |
Initial release. Peekbank version for reproducing Zettersten et al. (2021), CogSci, https://psyarxiv.com/ep693. |
Using Peekbank Locally
For intensive use cases, e.g. repeatedly transferring more than 5 GB of data, users may wish to download one or more yearly releases of the database for installation on a local MySQL server (either on their own machine or a machine on their local network). The release databases can be downloaded mysqldump
command:
mysqldump -h $HOST_FROM_JSON -u $USER_FROM_JSON -p$PASSWORD_FROM_JSON --databases $DATABASES | mysql -u $LOCAL_USER -p$LOCAL_PASSWORD
The first part of this command (mysqldump
) outputs the content of the database as a text stream of SQL statements. The second part reads it into end-user’s local MySQL server. We leave it as an exercise to the reader to replace the variables above (such as $HOSTNAME
) with the correct values from the the JSON file that is used by the R package to coordinate and authorize MySQL access, peekbank.json. The corresponence between variables is as follows:
$HOST_FROM_JSON | "host" field in JSON |
$USER_FROM_JSON | "user" field in JSON |
$PASSWORD_FROM_JSON | "password" in JSON |
$DATABASES | {2021.1, peekbank_dev} |
$LOCAL_USER | Local MySQL user (possibly root) |
$LOCAL_PASSWORD | Local MySQL password for user |
Once you have a local MySQL installation, refer to the documentation for peekbankr
regarding how to use a local database server. For most uses cases, using the API with the default remote server (hosted on Amazon on EC2) should be sufficient.