{"id":47642248,"url":"https://github.com/jimlehner/process-improvement","last_synced_at":"2026-04-02T01:01:22.765Z","repository":{"id":276138750,"uuid":"928345994","full_name":"jimlehner/process-improvement","owner":"jimlehner","description":"A Python package for performing calculations and generating figures that facilitate an understanding of process variation.","archived":false,"fork":false,"pushed_at":"2026-03-30T23:00:35.000Z","size":6794,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T01:12:25.067Z","etag":null,"topics":["manufacturing","process-improvement","process-management","quality","quality-control","spc","statistical-process-control"],"latest_commit_sha":null,"homepage":"https://www.brokenquality.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimlehner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-06T13:40:12.000Z","updated_at":"2026-03-30T23:00:40.000Z","dependencies_parsed_at":"2025-02-09T16:44:55.298Z","dependency_job_id":null,"html_url":"https://github.com/jimlehner/process-improvement","commit_stats":null,"previous_names":["jimlehner/process_improvement","jimlehner/py-process_improvement","jimlehner/py-process-improvement","jimlehner/process-improvement"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jimlehner/process-improvement","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimlehner%2Fprocess-improvement","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimlehner%2Fprocess-improvement/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimlehner%2Fprocess-improvement/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimlehner%2Fprocess-improvement/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimlehner","download_url":"https://codeload.github.com/jimlehner/process-improvement/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimlehner%2Fprocess-improvement/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["manufacturing","process-improvement","process-management","quality","quality-control","spc","statistical-process-control"],"created_at":"2026-04-02T01:00:47.881Z","updated_at":"2026-04-02T01:01:22.680Z","avatar_url":"https://github.com/jimlehner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# process_improvement\n\n[![PyPI Version](https://img.shields.io/pypi/v/process-improvement)](https://pypi.org/project/process-improvement/)\n[![Build Status](https://github.com/jimlehner/process-improvement/actions/workflows/ci.yml/badge.svg?branch=main)]\n[![License](https://img.shields.io/github/license/jimlehner/process-improvement)](https://github.com/jimlehner/process-improvement/blob/main/LICENSE)\n\nA Python library for performing calculations and generating figures that facilitate an understanding of process **variation**.\n\nThe primary tool of this library is the **XmR chart**. It also generates grids of X charts (called **network analysis**), capability histograms, Taguchi loss functions, limit charts, and grids of limit charts (called **limit chart network analysis**).\n\nCalculations for process limits are based on the work of **Walter A. Shewhart** and **Donald J. Wheeler**. For those unfamiliar with Wheeler's work, visit [SPCpress.com](https://www.spcpress.com).\n\nThe intent of this library is to provide a practical alternative to subscription-based software packages like **Minitab** and **JMP**.\n\nIt is part of a broader project called **The Broken Quality Initiative**, which aims to provide manufacturing, process, and quality engineers with the tools and knowledge required to reduce costs and improve quality.\n\nTo learn more about the project, visit [BrokenQuality.com](https://brokenquality.com).\n\n## Table of Contents\n- [Installation](#installation)\n- [Features](#features)\n- [Quick Start](#quick-start)\n- [Function Descriptions and Examples](#function-descriptions-and-examples)\n    - [Capability Histogram](#capability-histogram)\n    - [Combo Chart](#combo-chart)\n    - [Limit Chart](#limit-chart)\n    - [Limit Chart Network Analysis](#limit-chart-network-analysis)\n    - [Network Analysis](#network-analysis)\n    - [Taguchi Loss Function](#taguchi-loss-function)\n    - [XmR Chart](#xmr-chart)\n    - [XmR Chart Comparison](#xmr-chart-comparison)\n- [Configuration and usage](#configuration-and-usage)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [Additional Reading](#additional-reading)\n- [License](#license)\n\n## Installation\n\nInstall via pip:\n```bash\npip install process-improvement\n```\n\nOr clone the repository for development:\n```bash\ngit clone https://github.com/jimlehner/process_improvement.git\ncd process-improvement\npip install -e .\n```\n\n## Features\n- Generate XmR charts (Individuals and Moving Range)\n- Calculates average moving range (mR̄) and process limits\n- Generates comparison XmR charts\n- Generates capability histogram and calculates the process capability indices (Cp, Cpk, Pp, Ppk)\n- Generates Taguchi Loss Function visualization to understand economic loss due to poor quality\n- Generates limit charts\n- Generates a grid of XmR charts (network analysis)\n- Generates a grid of run charts with specification limits (limit chart network analysis)\n- Support for custom chart configuration (size, dpi, colors) \n- Generates publication-quality charts using Matplotlib/Seaborn\n- Modular architecture for extending charts, configurations, and workflows\n\n## Quick Start\n\n```python\nimport pandas as pd\nfrom process_improvement.charts.xmr_charts import xmr_chart\nfrom process_improvement.charts.utils import XmRChartConfig\n\n# Sample process data\ndf = pd.DataFrame({\n    \"date\": [\"2025-01-01\", \"2025-01-02\", \"2025-01-03\", \"2025-01-04\"],\n    \"value\": [5.2, 5.5, 5.1, 5.8]\n})\n\n# Configure the chart\nconfig = XmRChartConfig(\n    show=True,             # Display chart immediately\n    limit_chart_ylabel=\"Resistance\",\n    show_label_values=True,\n    show_mean=True\n)\n\n# Generate XmR chart\nxmr_result = xmr_chart(\n    df=df,\n    values=\"value\",\n    x_labels=\"date\",\n    config=config\n)\n```\n\n## Function Descriptions and Examples\n\nExample figures and descriptions for each one of the charts in this library.\n\n### Capability Histogram\n\nThe `capability_histogram` function plots a histogram of process data in the context of the Upper Specification Limit (USL), Lower Specification Limit (LSL), target, and mean. This enables an understanding of process behavior in the context of the **voice of the customer**. \n\nThe function also calculates the process capability indices: the capability ratio (Cp), the centered capability ratio (Cpk), the performance ratio (Pp), and the centered performance ratio (Ppk). To learn more about these indices visit [BrokenQuality.com/process-capability-indices](https://www.brokenquality.com/process-capability-indices).\n\n![Capability Histogram Example](docs/figures/capability_histogram_example.png)\n\n### Combo Chart\n\nThe `combo_chart` function displays the X chart portion of an XmR chart with a horizontally oriented histogram. The shared y-axis between the subplots allows for direct visual comparison between the voice of the process, defined by the Upper Process Limit (UPL) and the Lower Process Limit (LPL), compared with the voice of the customer, defined by the Upper Specification Limit (USL) and the Lower Specification Limit (LSL).  \n\n![Combo Chart Example](docs/figures/combo_chart_example.png)\n\n### Limit Chart\n\nThe `limit_chart` function plots a time series or running record of process data with the additional context of the Upper Specification Limit (USL), Lower Specification Limit (LSL), target, and process mean. This allows users to contextualize how a process has changed over time with respect to the voice of the customer (i.e., the specification limits). Values that fall outside of the specification limits are colored red.\n\n![Limit Chart Example](docs/figures/limit_chart_example.png)\n\n### Limit Chart Network Analysis\n\nThe `limit_chart_network_analysis` function plots a grid of time series or running records that contain process data from multiple system elements performing the same task. Like the `limit_chart` function, each subplot in the grid displays the Upper Specification Limit (USL), Lower Specification Limit (LSL), target, and mean in each subplot. This allows users to compare how different elements performing the same task are operating with respect to each other and with respect to the voice of the customer (i.e., the specification limits).\n\n![Limit Chart Network Analysis Example](docs/figures/limit_chart_network_analysis_example.png)\n\n### Network Analysis\n\nThe `network_analysis` function plots a grid of X charts containing process data from multiple elements performing the same task and using the same performance or quality metric. Like the `xmr_chart` function, each subplot in the grid displays the associated Upper Process Limit (UPL), Lower Process Limit (LPL), and process mean. This allows users to compare how different elements performing the same task are operating with respect to each other and with respect to the voice of the process (i.e., the process limits).\n\n![Network Analysis Example](docs/figures/network_analysis_example.png)\n\n### Taguchi Loss Function\n\nThe `taguchi_loss_function` function plots the quadratic loss function called the Taguchi loss function with respect to the specified Upper Specification Limit (USL), Lower Specification Limit (LSL), target and process mean. The vertex of the parabola sits at the target value. The further the mean deviates from the target, the larger the loss due to poor quality. \n\nLoss increases quadratically until the function reaches the specification limits. Here, the maximum loss due to poor quality is incurred. In instances where rework can be performed, a portion of the loss can be recovered.\n\nThe `taguchi_loss_function` function allows users to optionally display process data as a histogram. \n\n![Taguchi Loss Function Example](docs/figures/taguchi_loss_function_example.png)\n\n### XmR Chart\n\nThe `xmr_chart` function generates an XmR chart of process data. The XmR chart is composed of two figures: the X chart and the mR chart. \n\nThe X chart plots logically comparable individual values. It includes the Upper Process Limit (UPL), Lower Process Limit (LPL), and process mean. The mR chart plots the moving ranges associated with the logically comparable individual values along with the Upper Range Limit (URL) and the average moving range.\n\nWhen all of the values fall inside the process limits, the underlying causal system is characterized as **predictable**. The future behavior of a predictable process can be anticipated within limits because only common causes of routine variation influence process behavior. To improve a predictable process, new technology, equipment, materials, methods, or procedures must be introduced.\n\nWhen one or more values fall outside the process limits, the underlying causal system is characterized as **unpredictable**. The future behavior of an unpredictable process **cannot** be predicted within limits because both common causes of routine variation and assignable causes of exceptional variation influence process behavior. To improve a predictable process, the assignable causes must be understood and eliminated.\n\n![XmR Chart Example](docs/figures/xmr_chart_example.png)\n\n### XmR Chart Comparison\n\nThe `xmr_comparison` function generates a grid of XmR charts that contain process data from different process steps or stages. This function helps users evaluate how a process has changed over time.\n\n![XmR Comparison Example](docs/figures/xmr_comparison_example.png)\n\n## Configuration and Usage\n\nConfiguration and usage details for each function can be found in [USAGE.md](USAGE.md)\n\n## Project Structure\n\nThe library project structure is as follows:\n\n```\nprocess_improvement/         \n├── pyproject.toml\n├── README.md\n├── LICENSE\n├── MANIFEST.in\n├── .github/\n│   └── workflows/\n│       └── ci.yml\n├── tests/\n│   ├── test_figures/\n│   ├── test_capability_histogram.py\n│   ├── test_network_analysis.py\n│   ├── test_xmr_chart.py\n│   └── test_xmr_comparison.py\n├── docs/\n│   ├── USAGE.md\n│   ├── figures/\n│   │   ├── capability_histogram_example.png\n│   │   ├── combo_chart_example.png\n│   │   ├── limit_chart_example.png\n│   │   ├── limit_chart_network_analysis_example.png\n│   │   ├── network_analysis_example.png\n│   │   ├── taguchi_loss_function_example.png\n│   │   ├── xmr_chart_example.png\n│   │   └── xmr_comparison_example.png\n│   └── notebooks/\n│       ├── capability_histogram_demo.ipynb\n│       ├── combo_chart_demo.ipynb\n│       ├── limit_chart_demo.ipynb\n│       ├── limit_chart_network_analysis_demo.ipynb\n│       ├── network_analysis_demo.ipynb\n│       ├── taguchi_loss_function_demo.ipynb\n│       ├── xmr_chart_demo.ipynb\n│       └── xmr_comparison_demo.ipynb\n└── process_improvement/\n    ├── __init__.py\n    ├── __main__.py\n    ├── cli.py\n    ├── data_loader.py\n    ├── charts/\n    │   ├── capability_histogram.py\n    │   ├── combo_chart.py\n    │   ├── limit_charts.py\n    │   ├── results.py\n    │   ├── taguchi_loss.py\n    │   ├── utils.py\n    │   └── xmr_charts.py\n    ├── calculations/\n    │   ├── capability_calculations.py\n    │   ├── loss_function_calculations.py\n    │   └── xmr_calculations.py\n    └── data/\n        ├── 2170_battery_cells.csv\n        ├── 18650_battery_cells.csv\n        ├── automated_manufacturing_part_lengths.csv\n        ├── eight_machine_manufacturing_process.csv\n        ├── milikans_electron_charge_observations.csv\n        ├── monthly_united_states_trade_deficits_2024.csv\n        ├── OP200_weekly_first_pass_yield.csv\n        ├── quarterly_sales_by_region.csv\n        ├── shewharts_resistance_measurements.csv\n        ├── software_verification_death_to_birth_rates.csv\n        ├── software_verification_resistance_measurements.csv\n        └── wafer_assembly_part_placement.csv\n```\n\n## Contributing\n\nContributions to this project are welcome! To ensure the process is smooth, please follow these guidelines:\n\n### 1. Set up your development environment\n```bash\n# Clone the repository\ngit clone https://github.com/jimlehner/process-improvement.git\ncd process-improvement\n\n# Install dependencies for development\npip install -e .[dev]\n```\n\n### 2. Code style\n- Follow [PEP8](https://peps.python.org/pep-0008/) standards.\n- Use [Black](https://black.readthedocs.io/en/stable/) for automatic formatting.\n\n### 3. Testing\n- Add unit tests for new features or bug fixes.\n- Run `pytest` before submitting pull requests: pytest tests/ -- cov\n\n### 4. Pull requests\n- Create a descriptive branch (e.g., feature/add-xmr-chart).\n- Submit a PR with a clear description and reference relevant issues.\n\n### 5. Reporting issues\n- Open issues for bugs or feature requests with steps to reproduce and examples.\n\n## Additional Reading\n- [BrokenQuality.com](https://www.brokenquality.com/)\n- [SPC Press Reading Room](https://www.spcpress.com/reading_room.php)\n- [Walter Shewhart's book Economic Control of Quality of Manufactured Product](https://archive.org/details/economiccontrolo0000shew)\n\n## License\n\nMIT License. See LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimlehner%2Fprocess-improvement","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimlehner%2Fprocess-improvement","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimlehner%2Fprocess-improvement/lists"}