Getting Started

This section describes how to get organized and get the code running. This will try to keep concepts as accessible as possible, but some familiarity with Python projects, UNIX systems, and Git would certainly be helpful.

Getting Organized

The running assumption will be that the nuMoM2b data is contained in a directory (likely unzipped from a, and this nuMoM2b_preprocessing/ repository is available on your local machine.

For example, we find it helpful to organize work as follows (though these may be tweaked with config files):

├── Data/
│   ├── pregnancy_outcomes.csv
│   ├── Screening.csv
│   └── Visit1.csv
└── nuMoM2b_preprocessing/
    └── numom2b_preprocessing/

nuMoM2b_preprocessing may be cloned from GitHub:

git clone

If you’re using Anaconda, this would be a good time to create an environment:

conda create -n PHI python=3.7
conda activate PHI

… and install dependencies.

pip install -r numom2b_preprocessing/requirements.txt


Documentation is currently hosted at, but local copies may also be built using Sphinx.

A separate requirements file is in the documentation/ directory.

pip install -r documentation/requirements.txt

A make.bat and Makefile are included:

cd documentation
make html

If the build is successful, a copy will reside in a new build/html/ directory.

open build/html/index.html          # (macOS)
xdg-open build/html/index.html      # (Linux)