pycohortflow: Lightweight, customisable cohort flow diagrams in Python and JavaScript

preprint OA: closed
View at publisher

Abstract

Flow diagrams are widely recommended to support transparent reporting of participant or record flow. However, they are frequently omitted, incompletely reported, or generated manually in ways that separate the figure from the analysis code and increase the risk of transcription errors, arithmetic inconsistencies, and outdated counts. `pycohortflow` addresses this narrow but common problem by generating cohort flow diagrams from structured input within Python analysis workflows, making figures easier to reproduce, review, and update. A companion browser-based JavaScript generator allows collaborators to inspect, adjust, or export diagrams directly in the browser, without local software setup. This makes the same structured diagram model usable in both scripted analyses and collaborative manuscript preparation, bridging reproducibility and interdisciplinary accessibility.

My notes (saved in your browser only)

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00