VISUALSCAPY CODE

The visual grammar,
in your Python workflow.

Use the reference implementation to turn estimated direct and specific indirect effects into the Mediation Map and Mediator Fingerprint.

QUICK START PACKAGE

Code + reproducible example

Canonical Python reference, simulated input, expected summary, dependencies and a ready-to-run example.

Download Python package ZIP · Visualscapy v1.0
.py

REFERENCE IMPLEMENTATION

The Python source

Download the canonical implementation directly for integration into your existing analytical workflow.

Download reference .py Python · pandas · NumPy · Matplotlib

RUN THE SIMULATED EXAMPLE

A reproducible starting point.

Extract the package, install its dependencies in a Python environment, then run the included example. It exports both views as SVG, PNG and PDF, plus a summary CSV.

The example contains simulated data, explicitly labelled in its exported figures.

From the extracted package folder
python -m pip install -r requirements.txt
python generate_demo.py
output/SVG · PNG · PDF · summary CSV

Bring model outputs, then generate the views

The code consumes component, mediator, specific_indirect and direct_effect. It validates pathways and derives I = Σ(aᵢbᵢ) and c = c′ + I. Mediation estimation and statistical inference remain in your original analytical workflow.