Interactive visualization of order status journeys
Project description
Examples
This directory contains example scripts showing how to use the Order Journey Visualizer.
Available Examples
1. Basic Example (basic_example.py)
The simplest possible usage - great starting point.
python basic_example.py
2. E-commerce Analysis (ecommerce_example.py)
Realistic e-commerce order flow analysis with 50 simulated orders. Shows how to:
- Generate realistic data
- Identify problem patterns
- Analyze failed orders
- Calculate statistics
python ecommerce_example.py
3. CSV Loading (csv_example.py)
Shows how to load data from CSV files with:
- Standard column names
- Custom column names
- Tips for large files
python csv_example.py
Running Examples
- Install the package first:
cd ..
pip install -e .
- Run any example:
cd examples
python basic_example.py
- Open the generated HTML file in your browser
Creating Your Own Example
Copy this template:
import pandas as pd
from order_journey import OrderJourneyVisualizer
# Your data
df = pd.DataFrame({
'order_id': ['A', 'A', 'B', 'B'],
'status': ['New', 'Done', 'New', 'Done'],
'timestamp': ['2024-01-01', '2024-01-02', '2024-01-01', '2024-01-03']
})
# Visualize
viz = OrderJourneyVisualizer(df)
viz.build_graph()
viz.generate_html('my_example.html')
print("Done! Open my_example.html in your browser")
Sample Data
Need sample data? Try these:
Minimal
df = pd.DataFrame({
'order_id': ['A', 'A'],
'status': ['Start', 'End'],
'timestamp': ['2024-01-01', '2024-01-02']
})
With Retry Pattern
df = pd.DataFrame({
'order_id': ['A', 'A', 'A', 'A'],
'status': ['New', 'Processing', 'Failed', 'Processing'],
'timestamp': ['2024-01-01 10:00', '2024-01-01 11:00',
'2024-01-01 12:00', '2024-01-01 13:00']
})
Tips
- Start with
basic_example.pyto understand the basics - Look at
ecommerce_example.pyfor realistic analysis - Check
csv_example.pyif you have existing CSV files - All examples create HTML files you can open in your browser
- Examples are self-contained and can be copied/modified
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file order_journey_viz-0.1.0.tar.gz.
File metadata
- Download URL: order_journey_viz-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a6a80c4b3d2f208c468fd08aeb8a5158b4e0c36e5f5995171dec0fe11dd70ca
|
|
| MD5 |
c1e1792605ccd741986ab22f39079218
|
|
| BLAKE2b-256 |
551e714128f808531b4a535ff7e1338fee5b9c17b6b5866c793939db9f14130f
|
File details
Details for the file order_journey_viz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: order_journey_viz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
102c0b8f816b8d749bdee167760fd8163bea3eb6c07d1f014b998390bdcc439a
|
|
| MD5 |
708545b31b26f0eac897c58c381a71ec
|
|
| BLAKE2b-256 |
844911428bdb2edf4c52a98ebc71aebe78e45f0fba7d954cf999203157465913
|