Skip to main content

qikit

SPC charts and quality improvement tools for healthcare, in Python.

One function. One result object. One .plot() call.

Install

pip install clinical-qikit

Quickstart

from qikit import qic

result = qic(y=values, chart="i")
result.plot()   # returns a Plotly figure

qic() mirrors R's qicharts2, the package most healthcare QI practitioners already know — same chart types, same run-chart signal detection, same mental model, now in Python.

Chart types

All chart types are computed by the same qic() entry point via the chart= argument:

chart= Chart Use for
run Run chart Any sequential data, median center line
i Individuals (I) chart Continuous data, one observation per subgroup
mr Moving range Variation between consecutive observations
xbar X-bar chart Continuous data with subgroups (paired with s)
s S chart Subgroup standard deviation
t Time-between-events chart Time or count between rare events
p P chart Proportion (percent) defective, unequal subgroup sizes
pp P′ (Laney) chart Proportion data with overdispersion
c C chart Count of defects, constant opportunity
u U chart Rate of defects, unequal opportunity
up U′ (Laney) chart Rate data with overdispersion
g G chart Number of opportunities between rare events

qic(..., funnel=True) renders a funnel plot instead, for cross-sectional comparison across p/pp/u/up charts sorted by denominator.

Beyond qic(), the package also provides:

  • paretochart(x, data=...) — Pareto chart of categorical frequencies.
  • bchart(...) — Bernoulli CUSUM chart for early detection of shifts in binary (pass/fail) data.
  • design(factors, ...) / analyze(design_obj, response, ...) — full-factorial design of experiments (DOE) and effect analysis.

Excel add-in

A Microsoft Excel task-pane add-in built on the same charting engine (ported to TypeScript) lives in excel-addin/ — see its README for dev-harness and sideload instructions, and docs/excel-addin-roadmap.md for the roadmap.

Web app

app.py is a Streamlit front end over the same engine:

pip install -e .[app]
streamlit run app.py

Development

uv sync --extra dev
uv run ruff check .        # lint (CI-enforced)
uv run pytest tests/       # 176 tests incl. cross-language fixture conformance

The Python engine is authoritative; the TypeScript port in excel-addin/packages/engine conforms to it via the shared JSON fixtures in fixtures/. After intentional engine changes, regenerate the fixture snapshots with uv run python scripts/update_snapshots.py.

References

  1. Montgomery DC. Introduction to Statistical Quality Control, 8th ed. Wiley, 2019.
  2. Provost LP, Murray SK. The Health Care Data Guide, 2nd ed. Jossey-Bass, 2022.

License

MIT

Metadata

Release files for clinical-qikit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clinical-qikit 0.2.1
File Size Uploaded Provenance Actions
clinical_qikit-0.2.1.tar.gz 291.0 kB Without provenance Details for clinical_qikit-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clinical-qikit 0.2.1
File Interpreter ABI Platform Actions
clinical_qikit-0.2.1-py3-none-any.whl Python 3 none any Details for clinical_qikit-0.2.1-py3-none-any.whl

Total release size: 335.6 kB

Release files / clinical_qikit-0.2.1.tar.gz

Download URL clinical_qikit-0.2.1.tar.gz
Size 291.0 kB
Tags Source
SHA-256 checksum
How to use checksums
acff79e67d4ea383c421ed25f475953b35f9bfc644d7c4a683b50e2b1ada492a
BLAKE2b-256 checksum
How to use checksums
06889e5ceba64a0a763f497a37b4697b9b6eb3e854a035bc1a3b310bafe3499f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / clinical_qikit-0.2.1-py3-none-any.whl

Download URL clinical_qikit-0.2.1-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53335b9cf360372a22da7225d0caa7cecdd9199a09c9bf9e5fe08f6a1866a20c
BLAKE2b-256 checksum
How to use checksums
3c63061baefe78b401a7cfa900ab3a5fad27e7370c0037f05f357c039059b7ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for clinical-qikit 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page