Skip to main content

CSV to NACC's UDS3 format converter

Project description

NACCulator

Converts a CSV data file exported from REDCap into the NACC’s UDS3 fixed-width format.

FILES

This is not exhaustive, but here is an explanation of some important files.

nacc/:

Top-level Python package for all things NACC.

nacc/redcap2nacc.py:

converts a CSV data file exported from REDCap into NACC’s UDS3 fixed-width format

nacc/uds3/blanks.py:

specialized library for “Blanking Rules”

nacc/uds3/ivp/forms.py:

UDS3 IVP forms represented as Python classes

tools/generator.py:

generates Python objects based on NACC Data Element Dictionaries in CSV

HOWTO Convert from REDCap to NACC

$ pip install nacculator $ redcap2nacc < data.csv > data.nacc

Manually:

$ PYTHONPATH=. ./nacc/redcap2nacc.py data.csv > data.nacc

Note: output is written to STDOUT; errors are written to STDERR; input can be

STDIN or the first argument passed to redcap2nacc.

HOWTO Generate New Forms

Note: executing generator.py from within tools is an important step as the

script assumes any corrected DEDs are stored under a folder in the current working directory called ‘corrected’.

Warning: read the warnings in the current ../nacc/uds3/ivp/forms.py first.

$ cd tools $ PYTHONPATH=.. ./generator.py uds3/ded/csv/ > ../nacc/uds3/ivp/forms.py $ edit ../nacc/uds3/ivp/forms

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nacculator-0.1.2.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

nacculator-0.1.2-py2.7.egg (25.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page