Ecosystem — StatsLibX & SynaptIX
v0.3.0ViewX is the visualization engine of the GhostAnalyst data ecosystem. It receives report payloads from StatsLibX (statistics) and SynaptIX (machine learning) through one shared contract, and every library also works standalone.
The Three Libraries
| Library | Role | Install |
|---|---|---|
| statslibx | Statistics, data handling, simulations | pip install statslibx |
| synaptix | ML models, evaluation and tuning | pip install synaptix |
| viewx | Dashboards, EDA, PDF, slides | pip install viewx |
Data flows: StatsLibX produces analysis results and DataFrames (pandas or polars) that feed SynaptIX models; both produce report payloads that ViewX renders.
The Payload Contract
from_report_payload() renders any dict with this shape into a Dashboard, PDF report or presentation:
from viewx import from_report_payload
payload = {
"title": "Analysis Report", # required
"sections": ["Overview", "Details"], # section order
"tables": [{ # required: at least one table
"section": "Overview",
"title": "Summary",
"data": {"metric": ["mae", "r2"], "value": [1.2, 0.94]},
}],
"valueboxes": [{"label": "Rows", "value": 150}],
"figures": [plotly_figure], # optional: Plotly figures
"metadata": {"source": "statslibx"},
}
from_report_payload(payload, target="html", filename="report.html")
# targets: "html" (Dashboard) | "report" (PDF) | "presentation" (Slides)From StatsLibX
from statslibx import DescriptiveStats, load_iris
df = load_iris()
summary = DescriptiveStats(df).summary()
# Option 1 — direct method on the result (pip install statslibx[viewx])
summary.to_html("iris.html", theme="dark_enterprise", include_figures=True, data=df)
# Option 2 — manual pipeline with the payload contract
from statslibx import to_report_data
from viewx import from_report_payload
payload = to_report_data(summary, include_figures=True, data=df)
from_report_payload(payload, target="presentation", filename="iris_slides.html")Without ViewX installed, StatsLibX analysis works normally; export methods raise a clear error with the install instruction.
From SynaptIX
import synaptix as sx
df = sx.load_dataset("iris")
X, y = df.drop(columns="species"), df["species"]
model = sx.supervised.RandomForestClassifier().fit(X, y)
evaluation = model.evaluate(X, y)
# Direct export (pip install synaptix[viewx])
evaluation.to_html("evaluacion.html", theme="dark_enterprise")
# Or via the same payload contract
payload = evaluation.to_report_data(include_figures=True)
from_report_payload(payload, target="html", filename="evaluacion.html")Full Ecosystem Flow
# pip install statslibx[viewx] synaptix[viewx,stats] viewx
from statslibx import DescriptiveStats, load_iris
import synaptix as sx
from viewx import from_report_payload
df = load_iris()
# 1. Statistics and data quality (StatsLibX)
DescriptiveStats(df).summary()
# 2. Model + evaluation + statistical diagnostics (SynaptIX + StatsLibX)
X, y = df.drop(columns="species"), df["species"]
model = sx.supervised.RandomForestClassifier().fit(X, y)
evaluation = model.evaluate(X, y)
model.diagnostics(X, y) # inferential tests via statslibx
# 3. Everything into one dashboard (ViewX)
payload = evaluation.to_report_data(include_figures=True)
from_report_payload(payload, target="html", filename="analisis.html")The three dataset loaders share the same signature (load_dataset(name, backend=..., return_X_y=...)), and polars DataFrames produced by StatsLibX feed SynaptIX models directly.