Review multi-panel views, maps, networks, and report layout
Run xpd views <paths> to audit multi-panel layouts (make_subplots, facet_col, facet_row, Dash dashboards, multi-axes Matplotlib subplots), geospatial maps (px.choropleth, scatter_map, scatter_geo), specialized displays (treemap, icicle, sankey, parcoords, parcats), and page-level report narrative (headlines, captions, provenance, and commentary alignment) against 69 principles from rules/xpd/present.yml.
The view gallery compares Plotly views before and after applying each view principle.
Review static view code
Section titled “Review static view code”import plotly.express as pxfrom plotly.subplots import make_subplots
def region_map(df): return px.choropleth(df, locations="iso", color="score", projection="mercator")
def region_panels(): return make_subplots(rows=1, cols=2)$ xpd views dashboard.py --format textxpd views: 5 findings (1 wrong, 3 bad, 1 ugly) in 1 file (1 Python, 0 JS/TS), 2 views, 94 checklist itemsNote: static-only scan; pass --adapter to run runtime checks (compound panel colors, facet scales, choropleth projections, and typography).Libraries: plotlyViews: b1f4c562 dashboard.py:6 px.choropleth (map in plotly, route: px.choropleth) a7c27767 dashboard.py:10 make_subplots (panels in plotly, route: facet_col, or make_subplots)... non-equal-area-choropleth [wrong]: 1 b2a1b4fb dashboard.py:6 `plotly/mercator-choropleth`: projection="mercator" stretches land far from the equator, so a shaded region near a pole looks larger than the same region near the equator. Wilke recommends a projection that reproduces areas accurately for maps that compare regions. Use projection="eckert4" for the world or projection="albers usa" for the United States (Wilke 2019 p. 165)....Create a view from a spec
Section titled “Create a view from a spec”Run xpd views create start <spec.json> to scaffold a view in the Warm Editorial theme from a declared spec, then render, measure, and gate it as a durable run. The stages, the spec keys, and the answer file are those of xpd charts create.
| Form | Reader tasks | Column roles | What the scaffold draws |
|---|---|---|---|
panels |
multipanel, time-series |
x, y, panel |
One line panel per group on shared axes, ordered by mean |
map |
geospatial |
location, value |
An equal-area choropleth of a rate by ISO 3166-1 alpha-3 country code |
hierarchy |
proportions |
value, levels (list) |
A treemap whose areas add up to their parents |
flow |
amounts |
source, target, value |
A Sankey diagram whose link widths are proportional to a value |
network |
associations |
source, target |
A labeled node-link diagram with a seeded NetworkX layout |
view |
layout-and-type |
category, value |
Sorted category totals and a box plot showing every observation |
The network scaffold uses NetworkX in the project Python environment. Write Dash dashboards by hand and review them with xpd views start.
List all view principles
Section titled “List all view principles”$ xpd views --questions --format json | jq '{workflow, questions: (.questions | length), findings: (.findings | length)}'{ "workflow": "views", "questions": 69, "findings": 29}