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 numom2b.zip), 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):

Precision-Health-Initiative/
├── Data/
│   ├── pregnancy_outcomes.csv
│   ├── Screening.csv
│   └── Visit1.csv
└── nuMoM2b_preprocessing/
    ├── README.md
    └── numom2b_preprocessing/

nuMoM2b_preprocessing may be cloned from GitHub:

git clone https://github.com/hayesall/nuMoM2b_preprocessing.git

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

Documentation is currently hosted at https://doc.nuMoM2b.org, 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)