Skip to content

Analysis

Stage: analyse. Done by: analyst.

Your next step

Ask your chat for a view (the tools fingerprint, layered, trace or recurrence), or run one in your vault folder, for example uv run scat layered. Or use the notebook: uv run jupyter lab analysis.ipynb.

Analysis reads the abstract patterns the coding made from many concrete accounts; it asks nobody for more detail. A view is a picture or table made from a conformant vault. The tool generates it. You interpret it: a view never says that a story, a stakeholder or an architecture is better.

The organiser sees that findings use contributions only as choice 4 allows (Data, rights and consent), and before a finding is released checks that it names or quotes contributors only as choice 4 allows.

The views are reached through the coding path the project chose (Coding paths), and the coder confirms the check passes.

Before you trust a view

  • uv run scat check passes. A view refuses on any error in the pages it draws, and on any row of them that tells no edge, and says which.
  • You have signed off the content (done). A view of draft pages shows the draft.

The four views

Fingerprint. What does this narrative touch? It shows the nodes the narrative links and the edges it tells, in columns, one for each layer. The columns follow the narrative's kind: an architecture has concern, affordance and technology, with no stakeholder column; a scenario has stakeholder, concern and affordance, with no technology column; a narrative with no kind has all four. A missing column is the kind's, not a gap in the coding; a note under the drawing says which column is not drawn and how many linked nodes of that layer it leaves out. It does not mean the narrative is complete or wrong.

Edge table. Which edges of one type exist, and who tells them? Read it as a table, one row per edge. Exported as CSV, it feeds documents. It does not rank the edges.

Layered view. What is the big picture across several narratives? It joins their fingerprints in the four layers. Read across a column to see what is shared. It does not weigh a node by how many lines meet it.

The picture hides two things, and the view shows each. Orphans: a node page that no row tells has no line, so no column shows it; the view names it in the footer (at most ten, then "and N more") and lists it in the table, whichever narratives you chose. Candidates: a pair of nodes that the account links, with no row joining them, has no line either; with candidates, the picture draws it dashed and the table lists it, so you see what is left to code.

The layered view of four narratives, as four columns: stakeholders, concerns, affordances and technologies, with a line for each edge between neighbouring columns.

Trace. What does this node reach? Following edges up goes toward stakeholders, down toward technologies. It does not say how strongly a node depends on what it reaches.

Two more views serve the node pages, and are the coder's in the synthesise stage. Evidence (scat evidence <node>) shows every narrative that links one node, with the paragraph around each link, its edges and its adjacent nodes: read it before you write the page. Review (scat review) lists every pair of node pages of one type that shares a twin row (one narrative tells the same edge type for both to one other node) or an adjacent node, the pairs that share most first, with the count shown; it is a prompt to look, not a finding.

Recurrence. What shows up again? scat recurrence gives, for every node, how many narratives have a row that ends at it and how many stakeholders reach it, and for every edge how many narratives tell it and how many stakeholders reach its first end. A count of zero or one is marked a singleton: one account, one voice, or none. A singleton is a place to ask whether more accounts would say the same, not a fault; a node that recurs across narratives and stakeholders is a pattern the page can rest on.

The notebook

The vault template holds analysis.ipynb at its root. It shows each view with a short paragraph and exports the three edge tables. uv sync has installed what it needs. Run it from your vault folder, in Terminal:

uv run jupyter lab analysis.ipynb

JupyterLab opens the notebook in your browser and keeps running in Terminal until you press Control and C there. In the browser, choose Run, then Run All Cells, then read. A cell that stops with an AssertionError means the picture and the pages disagree: run uv run scat check. If the browser does not open, copy the address that starts http://localhost: from Terminal into it.

For the finished notebook as a page to read:

uv run jupyter nbconvert --to html --execute analysis.ipynb --output-dir executed
open executed/analysis.html

executed and exports (the edge tables) are ignored by git.

The same views are one call away in the REPL and one command away on the CLI:

import scat_tools

scat_tools.fingerprint("groups-under-a-cap-pitch")
scat_tools.edge_table("holds")
scat_tools.layered()
scat_tools.trace("anonymity", "up")

The views are the work of the analyse stage (code and report offer them too). Check the stage with uv run scat which-stage. To move on, run uv run scat set-stage --to <stage> --by <name>. From a new vault, in plan, three moves reach analyse:

uv run scat set-stage --to code --by "Your Name"
uv run scat set-stage --to synthesise --by "Your Name"
uv run scat set-stage --to analyse --by "Your Name"
uv run scat fingerprint groups-under-a-cap-pitch
uv run scat edges holds
uv run scat layered
uv run scat trace anonymity --direction up
uv run scat export-edges --out exports

Drawings

The vault template has what drawings need installed.

from scat_tools import draw

draw.fingerprint("groups-under-a-cap-pitch").save("fingerprint.png")
draw.layered().save("layered.png")

Both draw.fingerprint and draw.layered take candidates=True (CLI: --candidates), which adds the candidates as dashed lines. A drawing is made from a view's result. To have the picture and the table from one query, run the view once and draw that result: draw.render(scat_tools.layered()).

Within each column, a drawing orders the nodes to reduce the number of crossing lines, not alphabetically; the order is the same every time for the same vault. Parts of the graph that share no node are drawn as separate bands, one above the other, largest first; the nodes that no line reaches are together in the last band. A drawing with one connected part and no node that no line reaches is one band. Read each band on its own: nothing in one band is joined to anything in another.

In the layered drawing the lines can be marked by the narrative that tells each edge. From Python, call draw.layered(mark_narratives=True), or draw.render(result, mark_narratives=True) for a result you hold. It is off by default. There are nine marks, three colours by three line styles, chosen to be told apart by colour-blind readers, and each narrative that tells a drawn edge takes the next one in name order; with ten or more narratives the marks repeat, so two narratives can share a mark; an edge that several narratives tell has one shared mark; a key under the drawing names each narrative that tells a drawn edge. Dashed lines still mean candidates. The command line and the chat tools do not offer this option.

Every drawing labels its columns stakeholder, concern, affordance and technology, in that order. A fingerprint drawing follows its narrative's kind and leaves out one column (see Fingerprint above); the layered and trace drawings mix narratives and keep all four. SVG and PNG are the same drawing in two formats.

In chat, the tools fingerprint, layered and trace each take output: table (the default), plot or both. A plot comes as png (the default) or, with format, as svg. One call asks the vault one question and returns the picture, the table or both, and they always agree. In both, the picture comes first, then the table. fingerprint and layered also take candidates. Ask for one by naming the view and what it shows, for example "plot the fingerprint of groups-under-a-cap-pitch". A plot of a fingerprint needs the name of one narrative. The picture comes back in the chat and is not saved in your vault. If your chat does not show the image, ask for format svg, which returns the plot as text, or for the table, or save the picture from Terminal with uv run scat draw fingerprint --out fingerprint.png NARRATIVE, or from the notebook. A name the vault does not have, or an error in the pages drawn, comes back as the same refusal the CLI gives, with what to do.

When the assistant cannot see the drawing

Not every assistant's model receives the picture. See Pros and cons; if unsure, ask the assistant whether it can view images. Then choose by what you need:

  • The table. output table (the default) gives every node and edge the drawing shows, as text. Ask for it when the model is to read or check the result, since a drawing is only the table's picture.
  • The plot. output plot gives only the picture.
  • Both. output both gives the picture for you and the table for the model, from one query, so they agree.
  • SVG. format svg returns the plot as text, which a model reads as structure: which node, which line. Saved, it is a figure you can open.
  • PNG. The default format. Use it to show a drawing to a person; it is the one to look at.

Where next

  • Python API and CLI: every call and command.
  • Terms: the words used here.
  • Coding: back round the loop, where a view sends you.