Overview
The psychds Shiny application provides a guided, step-by-step interface for creating Psych-DS compliant datasets. This guide walks through each section of the application.
Application Sections
The app has four main sections accessible from the sidebar:
- Create Dataset - Build a new Psych-DS dataset
- Update Data Dictionary - Edit variable definitions
- Validate Dataset - Check compliance with the standard
- Upload to OSF - Publish to Open Science Framework
Create Dataset
The dataset creation wizard has three steps:
Step 1: Project Directory and Data Files
In this step, you:
Select a project directory - This is the folder containing your research materials. We will be building a new dataset using the files you select from this directory.
Choose data files - Browse and select CSV files to include. Click on files/directories to select/deselect them.
-
Configure optional directories - Choose additional folders to create:
-
analysis/- Analysis scripts and pipelines -
materials/- Study materials (stimuli, protocols, flyers) -
results/- Output figures and tables -
products/- Papers, presentations -
documentation/- Additional documentation
-
Your original files are safe! The app only reads from your existing files to create standardized copies. Your original data is never modified.
Step 2: Dataset Metadata
Enter information about your dataset:
Required fields:
- Name - A descriptive name for your dataset
- Description - Brief description of what the data contains
Author information:
- Add authors with their names and optional ORCID iDs
- Click “Add New Author” to add multiple authors
Detected Variables:
The app automatically detects column names from your CSV files. Variables with the same name across files are assumed to have identical definitions.
Step 3: Standardize Filenames
Rename your data files using Psych-DS naming conventions:
Select files - Check boxes to select multiple files for batch operations
-
Configure keywords - For each file, set values for standard keywords:
- study, session, subject, task, etc.
Auto-Name from Data - Automatically fill keyword values from constant columns in your data (for instance, if each file contains a column like “subject_id” with the same value in every row, you can use this column to name the file)
Preview - See the new filename as you configure keywords
Example transformation:
Original: experiment_data_2024.csv
New: study-attention_session-1_data.csv
Update Data Dictionary
The data dictionary editor allows you to document all variables in your dataset.
Loading a Dataset
- Click “Load Dataset”
- Navigate to your Psych-DS dataset folder
- The app will detect all CSV files and extract variable names
Editing Variables
Select a variable from the list to edit its properties:
Basic Properties:
- Description - What this variable represents
- Data Type - string, integer, number, boolean, date, etc.
- Unit - Measurement unit (if applicable)
Constraints:
- Required - Whether the variable must have a value
- Unique - Whether all values must be unique
- Min/Max - Valid range for numeric variables
- Pattern - Regex pattern for string validation
Categorical Values:
For variables with a fixed set of allowed values:
- Click “Add Value”
- Enter the value, label, and description
- Repeat for all categories
Example for a “condition” variable: | Value | Label | Description | |——-|——-|————-| | control | Control Group | No intervention | | treatment | Treatment Group | Received intervention |
Global Missing Value Codes
Define codes that represent missing values across all variables:
- Common codes:
NA,N/A,-999,.,null - Add custom codes specific to your data
Generating a Data Dictionary
Click “Generate Human-Readable Dictionary” to create a formatted HTML document:
- Choose whether to include missing value codes
- Click “Generate Dictionary”
The HTML file is saved to your dataset folder and can be: - Opened in any web browser - Printed to PDF using Ctrl+P / Cmd+P - Shared with collaborators
Validate Dataset
Check your dataset against the Psych-DS specification:
Upload to OSF
Publish your validated dataset to the Open Science Framework:
Authentication
- Go to osf.io/settings/tokens
- Generate a Personal Access Token with appropriate permissions
- Paste the token in the app
- Click “Test Connection” to verify
Selecting Your Dataset
- Browse to your validated Psych-DS dataset
- Click “Verify Dataset” to confirm it’s ready for upload
Troubleshooting
App won’t start
# Check dependencies
check_psychds_deps(detailed = TRUE)
# Try forcing external browser
run_psych_ds_app(force_browser = TRUE)Validation errors
- Read the error message carefully
- Check that
dataset_description.jsonexists and is valid JSON - Ensure the
data/folder exists with at least one data file
For more help, open an issue.