This DataLad extension provides convenience commands for exporting data from REDCap into DataLad datasets. Information about the RedCAP project can be found at https://project-redcap.org/.
The extension is in early development.
The extension has no official release yet, but you can install the bleeding edge version using pip, directly from GitHub. This will also install the latest development version of DataLad Next extension. Using a virtual environment is recommended. Example installation:
# create and enter a new virtual environment (optional)
$ virtualenv --python=python3 ~/env/dl-redcap
$ source ~/env/dl-redcap/bin/activate
# install from GitHub main branch
$ python -m pip install git+https://github.com/datalad/datalad-redcap.git@main
export-redcap-form
: Export records from selected forms (instruments)export-redcap-project-xml
: Export entire project as a REDCap XML Fileexport-redcap-report
: Export a report that was defined in a projectredcap-query
: Show names of available forms (instruments)
The example below will show available forms, export a given form from REDCap in csv format, and save the file in a DataLad dataset.
datalad create my-exports
cd my-exports
datalad redcap-query <api url>
datalad export-redcap-form <api url> <form name> exported.csv
This DataLad extension was developed with support from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under grant SFB 1451 (431549029, INF project).