Tutorials
This section contains Jupyter notebooks that teach the cdmconnector package through a story-driven path. Each notebook follows: Setup → Explore → Build → Interpret → Exercises → What we learned.
Recommended order
| # | Notebook | Topic |
|---|---|---|
| 00 | Welcome: Your first CDM | Connect, list tables, person count, preview |
| 01 | Lazy queries and pipelines | filter/select/join, compile SQL |
| 02 | OMOP people, time, domains | Demographics, observation period, visits |
| 03 | Story: GiBleed end-to-end | Cohort, index date, windowed analysis |
| 04 | Measurement distributions | Numeric stats, missingness, guardrails |
| 05 | Cohorts 101 | Tables, attrition, counts |
| 10 | Pedagogical OMOP (GiBleed) | Mini-course: cohort, baseline, time-at-risk, outcome rates |
Running locally
- Environment: Create a venv and install the package with DuckDB:
pip install -e ".[duckdb]". If you want the GitHub-install equivalent of R’sdevtools::install_github(), usepip install "cdmconnector @ git+https://github.com/OHDSI/pyCDMConnector.git". - Eunomia: Example data is downloaded on first use via
cc.eunomia_dir("GiBleed"), or runcc.download_eunomia_data("GiBleed")in advance. - Paths: Run Jupyter from the repository root so
docs-src/assets/cohort_jsonand other paths resolve.
See Contributing for full setup; see Development for rebuilding the docs after editing notebooks.