Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation

Requirements

ProcessBehavior requires Python 3.9 or later.

Dependencies (installed automatically)

Optional Dependencies

Install via pip install "processbehavior[<extra>]":

Installation Methods

pip install processbehavior

With Excel Export

pip install "processbehavior[excel]"

With Static Image Export

pip install "processbehavior[images]"

From Source (Development)

git clone https://github.com/cnicholas/processbehavior.git
cd processbehavior
pip install -e ".[dev]"

Verifying Installation

After installation, verify everything works:

import processbehavior
print(f"ProcessBehavior version: {processbehavior.__version__}")

# Quick functionality test
import pandas as pd
import numpy as np
from processbehavior import ProcessBehavior

# Create sample data: 3 machines x 10 batches x 1 measurement
np.random.seed(42)
df = pd.DataFrame({
    'value': np.random.normal(100, 5, 30),
    'batch': [f'batch_{i//3 + 1}' for i in range(30)],
    'machine': ['A', 'B', 'C'] * 10
})

# Run a simple analysis
pb = ProcessBehavior(df)
study = pb.formulate(response=pb.cols.value, factors=[pb.cols.machine], time=pb.cols.batch)
result = study.execute()

print(f"Observed:   ODS {study.observed_design_state.sds}")
print(f"Analytical: ADS {study.analytical_design_state.sds}")
print(f"Valid charts: {study.valid_charts}")
print(f"Recommended: {study.recommended_chart}")
print("Installation verified!")

Expected output:

ProcessBehavior version: <your installed version>
Observed:   ODS 2
Analytical: ADS 2
Valid charts: ['Histogram', 'Xbar', 'S', 'X', 'mR']
Recommended: X
Installation verified!

Verify Plotting

Plotting is included by default:

# Test plotting
fig = result.plot()
fig.show()  # Opens interactive chart in browser

Troubleshooting

Jupyter Notebook Display Issues

For Jupyter notebooks, ensure you have the Plotly extension:

pip install jupyterlab "ipywidgets>=7.6"

Next Steps

Now that ProcessBehavior is installed, continue to the Quickstart tutorial to create your first process behavior chart.