Skip to contents

Reading Peekbank data

Create a client pinned to one release, then read tables from it.

peekbank()
Connect to Peekbank
PeekbankClient
Peekbank client
peekbank_releases()
Peekbank releases

Working with the data

Helpers for the shapes Peekbank data arrives in.

unnest_aux()
Expand one key of a table's aux data into rows
add_cdi_percentiles()
Add vocabulary norm percentiles to CDI scores
add_cdi_proportions()
Add the relative share of a CDI form's words to CDI scores
nearest_cdi()
Add the CDI scores closest in age

Preparing a dataset for import

Used by the import scripts in peekbank-data-import, not by analyses.

ds.compute_aois()
Classify gaze samples into AOIs based x/y coordinates and provided region sets
ds.get_peekjson()
parse the bundled peekbank schema json into a dataframe
ds.list_coding_methods()
Get the coding method list from json schema file
ds.list_ds_tables()
List the tables required based on coding method
ds.list_language_choices()
List current allowed language choices for db import
ds.normalize_times()
Center each trial's times on its point of disambiguation
ds.resample_times()
This function resample times to be consistent across labs.
ds.rezero_times()
Shift each trial's times to start at zero
ds.validate_for_db_import()
check all csv files against database schema for database import

Superseded

Earlier interfaces. These still work and are not going away, but the functions above replace them.

connect_to_peekbank() superseded
Connect to Peekbank
get_db_info() superseded
Get information on database connection options
list_peekbank_tables() superseded
List of peekbank tables
get_datasets() superseded
Get datasets
get_subjects() superseded
Get subjects
get_administrations() superseded
Get administrations
get_trials() superseded
Get trials
get_trial_types() superseded
Get trial types
get_stimuli() superseded
Get stimuli
get_aoi_region_sets() superseded
Get AOI region sets
get_aoi_timepoints() superseded
Get AOI timepoints
get_xy_timepoints() superseded
Get XY timepoints
get_sql_query() superseded
Run a SQL query against peekbank
download_stimuli() superseded
Download stimulus images for the Peekbank repository
get_readmes() superseded
Download dataset README files
unpack_aux_data() superseded
Unpack the json sting in the *_aux_data column and turns it into a nested R list
cleanup_cdi_data() superseded
Checks cdi data for inconsistencies, warns about them, and fixes them
populate_cdi_percentiles() superseded
Populate the provided cdi data with percentile values for that specific age, instrument_type, measure and language. Loosely based on the work from this repo https://github.com/kachergis/cdi-percentiles/tree/main by George Kachergis and Jess Mankewitz with advice from Virginia Marchman.
append_relative_cdi_scores() superseded
Adds a relative cdi score indicating the percentage of total achievable points the subject got on each given measure