qe-viz 0.5.5 0.5.6.9001

Interactive ENA / ONA network visualisations

Formerly published as qeviz.

Python >=3.9 · License: MIT · API documentation · Source code

Also available for R: qeviz · npm: @qe-libs/qeviz

Install

uv

uv add qe-viz --index qe-libs=https://qe-libs.org/py/simple/

pip

pip install --extra-index-url https://qe-libs.org/py/simple/ qe-viz

requirements.txt

--extra-index-url https://qe-libs.org/py/simple/
qe-viz

Latest development build (0.5.6.9001)

pip install --extra-index-url https://qe-libs.org/py/dev/simple/ qe-viz
uv add qe-viz --index qe-libs-dev=https://qe-libs.org/py/dev/simple/

Development builds are built from main and served only by the development index; the regular index installs releases.

Versions

Links in the wheel columns are the Python versions each wheel supports; pip and uv pick the right file automatically.

VersionPublishedSourceWheel
all platforms
0.5.6.90012026-10-07.tar.gzpy3
0.5.52026-10-06.tar.gzpy3

Dependencies

For 0.5.5.

Description

qeviz (Python)

Interactive Epistemic Network Analysis (ENA) and Ordered Network Analysis (ONA) plots for Python: code networks, group means with confidence intervals, unit points and subtractions, displayed inline in Jupyter or exported as self-contained HTML. The same library powers the R package and rENA's plots, and a plot built here produces the same picture as one built in R.

Install

Install qe-viz, import qeviz:

uv add qe-viz --index qe-libs=https://qe-libs.org/py/simple/
# or
pip install qe-viz --extra-index-url https://qe-libs.org/py/simple/

Previously published as qeviz; existing installs keep working.

Quick start

From a fitted qe-ena model (import ena) of rENA's RS.data:

import pandas as pd
from ena import ENA
import qeviz

rs = pd.read_csv("rs.data.csv")   # rENA's inst/extdata/rs.data.csv
codes = ["Data", "Technical Constraints", "Performance Parameters",
         "Client and Consultant Requests", "Design Reasoning", "Collaboration"]
rs["unit"]  = rs["Condition"] + "::" + rs["UserName"]
rs["convo"] = rs["Condition"] + "::" + rs["GroupName"]
model = ENA().fit(rs, "unit", "convo", codes, window_size=4)

p = (qeviz.from_ena(model, group_col="Condition", title="FirstGame")
       .edges("FirstGame")      # the group's mean network
       .points()                # every unit, coloured by group
       .group("FirstGame"))     # the group mean and its 95% CI
p                               # displays inline in Jupyter
p.export_html("firstgame.html") # or a self-contained HTML file

FirstGame mean network of RS.data with unit points and the group mean

Edge width is proportional to the connection weight, node size to the node's summed edge widths, and colour intensity is scaled across the whole model, so separate plots of one model are comparable.

From DataFrames

Any ENA output works: one row per code node, one row of edge weights per unit (columns named "A.B"), and one row of positions per unit.

p = qeviz.plot(nodes_df, edges_df, points_df, group_col="Condition",
               id_col="ENA_UNIT", x_col="SVD1", y_col="SVD2")

Chain API

Every method returns a new plot, so several views can branch from one base.

Method Draws
.edges("A"), .edges("A", compare="B"), .edges("A", also="B"), .edges(unit="...") a group's or unit's network; a subtraction; an overlay
.edges(weights=..., compare=..., colors=..., threshold=(min, max), name=...) a network from your own weights (Series, dict, or rows to average)
.points(), .points(units=[...]), .points(points=df, color=, shape=, labels=) all unit points, or a chosen set
.group(), .group("A", intervals="crosshairs", outlier=True) group means with confidence (and outlier) intervals
.group(points=df, label="subset") the mean of any subset of points
.nodes("always", positions=df, labels={...}) when to draw code nodes; move or relabel them
.axes(x=True, y=True), .labels(...), .colors(A="#hex"), .range(...) axes, labels and fonts, group colours, axis range

qeviz.plot(..., title=, range=, scale_points=, center=, palette=) sets the plot-wide options. Arguments mirror the R package's qe_*() functions; see the qeviz repository for the full reference.

Display and export

All files and SHA-256 hashes (4)
FileSizeSHA-256
qe_viz-0.5.6.9001.tar.gz172.2 KB781d963209f5293b38b95bae12f5b3a33634a5c5ad9f21ff8101cd8280ed84a1
qe_viz-0.5.6.9001-py3-none-any.whl165.9 KBd37b9749a866201b599ab8cf954b803f3940150444ef5dcf6686202194fd41a8
qe_viz-0.5.5.tar.gz172.1 KBdcfa2efb1d0eb6108ab6a9d6e56aca96984887e31ff85a65d347de841946f7c8
qe_viz-0.5.5-py3-none-any.whl165.8 KBe473f96a857185fdcd6d66ab5b3d611cd6957b8dc2390b3b7ac6cd7f8ae02201