Skip to content

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 61 principles from rules/xpd/present.yml.

The view gallery compares Plotly views before and after applying each view principle.

dashboard.py
import plotly.express as px
from 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)
Terminal window
$ xpd views dashboard.py --format text
xpd views: 2 findings (1 wrong, 0 bad, 1 ugly) in 1 file (1 Python, 0 JS/TS), 2 views, 96 checklist items
Note: static-only scan; pass --adapter to run runtime checks (compound panel colors, facet scales, choropleth projections, and typography).
Libraries: plotly
Views:
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
6231e8b5 dashboard.py:6 `px.choropleth` uses a non-equal-area map projection. Use `natural earth`, `albers usa`, or `eckert4` (Wilke 2019 p. 165).
...
Terminal window
$ xpd views --questions --format json | jq '{workflow, questions: (.questions | length), findings: (.findings | length)}'
{
"workflow": "views",
"questions": 61,
"findings": 27
}