๐Ÿ“Š PLeW User guide Design guide Code map Open the editor Examples

PLeW user guide

How to use PLeW, for people who do not code and for people who do.

Status: rough first draft, written from the tool as it stands. It is also published as a help page beside the tool; the Help links under the tool’s title open it. Known rough edges are noted where they affect what you see; the full list is in the streamlining report.


Part 1 โ€” Using PLeW

The idea in one minute

Your data is a table. Each row is one thing you observed: a recording, a sentence, a response. Each column says something about it.

PLeW draws every row as one dot. You choose which columns decide where the dots go and what they look like. Nothing is averaged or summarised: if you have 200 rows you see 200 dots, and you can click any of them to see โ€” or hear โ€” exactly what it is.

Reading the picture

                 Grid X: Function
            Genuine            Echo
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  Grid Y  โ”‚  โ— โ— โ–        โ”‚  โ— โ–  โ–        โ”‚   each box = a panel
  Tone    โ”‚  โ—           โ”‚  โ— โ—         โ”‚
  Rising  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   colour = one column
          โ”‚  โ–  โ–          โ”‚  โ—           โ”‚   shape  = another column
  Falling โ”‚  โ— โ— โ—       โ”‚  โ–  โ–  โ–  โ—     โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

A column used this way is called a dimension. Up to six dimensions can be shown at once, each in one placement:

PlacementWhat it does
Grid XSplits the picture into columns of panels
Grid YSplits the picture into rows of panels
Panel XSplits each panel into columns
Panel YSplits each panel into rows (read from the bottom up, like a graph)
ColorColours each dot
ShapeCircle, square, diamond or triangle

Each category within a dimension is a value.

Loading data

Your file is read by your browser. It is not uploaded anywhere.

PLeW then arranges things for you: the dimensions with the most values go to Grid X and Grid Y, the next to Color, and so on. This is only a starting point.

Arranging the picture

Everything here is in the Dimensions section of the left sidebar.

To do thisDo this
Put a dimension somewhere specificChoose from the dropdown on its row
Take a dimension off the pictureChoose โ€”, or untick it
Re-deal all placements in orderDrag rows up or down by the โ‹ฎโ‹ฎ handle
Start againReset

Good to know. Dragging the list re-deals all placements from top to bottom, replacing anything you chose in the dropdowns. Arrange by dragging first, then fine-tune with dropdowns.

Choosing which values to see, and in what order

In Filter values, each dimension on the picture lists its values.

A filtered dimension shows “3 of 5 values” in the Dimensions list.

When a filter hides records, the line above the picture says so: “150 of 200 records shown (filtered by Tone)”. The names in brackets are the filters that are hiding something. Turn on Show item counts to see the same for each panel: “12 items” when all of a panel’s records are drawn, “9 of 12 items” when some are hidden. Anchors are never part of these numbers.

Looking at a single record

Do thisTo get this
Hover over a dotA short summary
Click a dotThe full record: every field, plus any sound, image or video
Shift+click a second dotA side-by-side comparison; fields that differ are highlighted
Esc, or click outsideClose

Column roles โ–พ (above the picture) decides which fields the record window shows and in what order: drag to reorder, click ๐Ÿ‘ to hide.

Colours and shapes

There are ten default colours and four shapes. With more values than that they start to repeat, so give the important ones their own colour.

Changing the data

PLeW is also a workbench: you can re-categorise records by hand.

Do thisWhat changes
Drag a dot to another cellIts values for whatever is on Grid X, Grid Y, Panel X and Panel Y
Right-click a dot and pickIts value for whatever is on Color or Shape
Type in the comment box of a recordA note, saved as you type

Changed dots get a ring. Every change is:

Two things that sound alike. Clicking a swatch in the legend changes which colour stands for a value; your data is untouched. Right-clicking a dot moves that record to a different value; your data changes.

Comments and tags

Open a record and type in the comment box. Dots with a comment get a purple ring.

To sort comments into kinds, list your own tags in the sidebar’s Comments section, one per line, and press Update tag buttons. Each tag becomes a button in the record window that inserts Tag: into the note.

Above the picture, Show only rows with comments hides everything else, and Tags to show narrows it further.

Anchors

If you drag every record out of a category, that category would disappear from the picture and from your saved file. To prevent this PLeW keeps a few invisible placeholder rows, called anchors, one set covering every value. They are added to the end of the CSV you download, where you can tell them by their ID: __anchor__a, __anchor__b, and so on (after __anchor__z comes __anchor__aa). The ID is normally in the first column. PLeW recognises anchors by that ID when you load the file again, so leave those rows and their IDs as they are if you edit the file elsewhere. You can make anchors visible in the Anchor Points section. They are never counted as records.

Files saved by earlier versions of PLeW, where anchors were marked with a bare a, b, c, still load; the next download rewrites them with the new IDs.

Adjusting the look

Above the picture:

ControlEffect
Label styling โ–พSize and colour of headings and counts
Unify grid sizes + heightEvery row of panels the same height
Unify inner panel + heightEvery row inside a panel the same height; crowded cells overlap their dots and show +N if some need scrolling
Show item countsNumber of records in each panel; “9 of 12 items” when a filter hides some of them
Show dimension namesNames of the dimensions along the edges

Press B to hide or show the sidebar.

Saving your work

ButtonYou getUse it for
Download CSVedited_data.csvYour data, with any changes and comments
Change Log โ†’ CSV / JSONchange_log.*A record of every change you made
Export setupplew-setup-โ€ฆ.jsonThe arrangement: placements, filters, order, colours, display options
๐Ÿ“ท Dark / Lightgrid_snapshot.pngThe picture, with a legend, for slides or papers
๐Ÿ“ท Stacked / Side-by-side (in a record)a PNG of that recordIllustrating one example. If the record’s image is hosted on another site, pressing the button fetches it through the image service wsrv.nl, which is therefore told the image’s address. Nothing is sent there unless you press one of these two buttons
Reportreport.htmlCounts, percentages and cross-tabulations of whole dimensions

The data and the setup are separate files. To pick up where you left off, load the CSV, then Import setup.

Good to know. The downloaded CSV has one more column than you started with (desc::comment) and the anchor rows at the bottom. The report always covers all records, whatever is filtered.

Quick reference

Hoversummary
Clickopen record (A)
Shift+clickcompare with (B)
Drag dotmove to another category
Right-click dotchange its colour/shape value
Drag โ‹ฎ on a headingreorder values
Bsidebar
Escclose
Ctrl/โŒ˜+Z, Ctrl/โŒ˜+Shift+Zundo, redo

If something looks wrong

What you seeLikely reasonWhat to do
“No dimensions assigned”Nothing is placedGive at least one dimension a placement
A column is missing from DimensionsPLeW took it for an ID, a text field or media. This happens when every row is different, or the name contains “name”, “title” or “description”Column roles โ–พ โ†’ set it to Dimension
A text column was made a dimensionIt has repeated valuesColumn roles โ–พ โ†’ Description
Extra records called a, b, c โ€ฆ at the endAn old PLeW file whose anchors could not be recognised with certainty, so they were kept as data to be safeDelete those rows from the CSV, or rename their IDs to __anchor__a, __anchor__b โ€ฆ
The last few rows are missingTheir IDs are exactly a, b, c โ€ฆ in order and their other columns are empty, so they were read as old-style anchorsGive those rows different IDs
Sound or images do not loadThe file cannot be found from where the CSV isUse Load media filesโ€ฆ, or full https:// links
Rows are broken after re-loadingA comment contained a line breakKeep comments on one line for now
Snapshot does nothingThe snapshot helper needs an internet connectionCheck the connection and try again

Part 2 โ€” Preparing and sharing data

What a good file looks like

Everything is treated as text. 1 and 1.0 are different values.

Telling PLeW what a column is

PLeW guesses from column names. To decide yourself, put a prefix on the header:

HeaderMeaning
dim::FunctionA dimension, always
desc::notesDescriptive text: shown in the record window, never placed
med::recordingA media link
res::annotatorKept in the file, kept out of the way

You can also set these in Column roles โ–พ; downloading the CSV writes the prefixes for you.

Without a prefix, columns named like audio_url, image_file, video, transcript, translation, gloss, description are recognised automatically.

Media

A media cell can hold:

Supported: common audio (wav, mp3, ogg, flac, m4a), image (jpg, png, gif, webp, svg) and video (mp4, webm, mov) formats.

Sharing an example page

The README has the step-by-step version. In outline:

  1. Fork the repository and switch on GitHub Pages (source: GitHub Actions).

  2. Put your CSV in static/data/ and media in static/<your-name>/. Media cells should read <your-name>/clip1.wav. (tools/prefix_media_paths.py adds that prefix for you.)

  3. Add content/examples/<your-name>.md:

    +++
    title = "My dataset"
    description = "One or two sentences for the gallery card."
    dataset_url = "data/<your-name>.csv"
    config_url = "config/<your-name>.json"   # optional
    layout = "example-viz"
    weight = 10
    +++
    
  4. Optional: arrange the view as you want readers to first see it, Export setup, save the file under static/config/, and point config_url at it.

  5. Push to main. The site rebuilds, and your page is at โ€ฆ/examples/<your-name>/.

Readers get the full tool. Whatever they rearrange or edit stays in their own browser.

Good to know. If you changed column roles before exporting the setup, publish the CSV you downloaded from that same session, so the column names match.


Part 3 โ€” Working on PLeW itself

Running it

hugo server

Then open http://localhost:1313/. Hugo Extended 0.128 is what the deploy workflow uses. The tool is plain HTML, CSS and JavaScript; there is nothing to install or build beyond that.

Where things are

FileWhat
layouts/index.htmlThe editor (upload your own data)
layouts/_default/example-viz.htmlThe example page (data loaded from front matter)
layouts/examples/list.htmlThe gallery
layouts/_default/doc.html, content/guide.md, content/design.md, content/code-map.mdThe help pages. Their text comes from docs/; edit it there
tools/code-userguide-review.mdThe procedure for checking the documents against the code
content/examples/*.mdOne per example
static/data/, static/<name>/Example data and media
docs/These documents, and the test CSVs for known problems

The two layout files are near-identical copies. Until they are merged, every change must be made in both. diff layouts/index.html layouts/_default/example-viz.html should only ever show the differences listed in the code map ยง12.

How the code is organised

Read the code map first. The short version:

Adding something

  1. Read the design guide and go through its checklist.
  2. Add state in the STATE section, with a comment saying what it holds and what it is keyed by (column header, or display name).
  3. Put the code between FEATURE markers.
  4. If the setting should travel with a shared view, add it to buildVisualizationConfig() and applyConfigState(), and raise VIZ_CONFIG_VERSION. Older files must still load.
  5. Reset it in processParsedRows() if it should not survive loading a new file.
  6. Make the same change in the other layout file.
  7. Use the interface vocabulary in labels (design guide, principle 7).
  8. When the change is finished and reviewed, run the review procedure in tools/code-userguide-review.md. It checks that the tool still works, finds every place in these documents that the change has made untrue, and updates the verification stamp. Put its report in the pull request.

Checking your change by hand

There are no automated tests yet. The review procedure above includes a fuller smoke test; at minimum:

Contributing

Work on a branch and open a pull request against main. Pushing to main deploys the site, so main should always be in a working state.