Part 1 · For everyone

Your data's journey, in six steps

Everything happens inside your browser. Your files are never uploaded anywhere; closing the tab discards them.

1 · Bring your files

Drop everything at once onto the drop zone or the main area: your table, a background picture if you have one, and any audio, video, images or transcripts the table mentions. No picture? Press No background for a blank plot frame.

You do

  • Drop a .csv, .tsv or .json table.
  • Optionally drop a map or figure image.
  • Optionally drop media files named in the table.

Maplew does

  • Sorts files by their ending (see the table below).
  • Reads the header row and decides what each column is for.
  • Treats an image as the background unless a table cell names it.

Good to know

  • Label columns with loc::, dim::, med::, desc:: for reliable results.
  • Write decimals with a point (46.5), not a comma.
  • A status line under the drop zone lists what was found and what is missing.

2 · Pick X and Y (Location columns)

Two columns decide where each row sits. Maplew guesses them for you and you can change the guess.

You do

  • Check the X and Y dropdowns.
  • Tick Web Mercator only if the background is a screenshot of a web map (Google Maps, OpenStreetMap).

Maplew does

  • Guesses in this order: loc:: columns, then names like lon/lat or x/y, then the first two numeric columns.
  • Counts rows whose coordinates are not numbers and tells you how many will be skipped.

Good to know

  • X and Y need not be geography. Any two numeric columns make a scatter plot.
  • Changing X or Y guesses the edge values again in the next step, unless you typed or loaded your own; those are kept.

3 · Calibrate

Calibration tells Maplew which data value sits where on the picture. Without it, points still appear but are only stretched to fill the frame.

You do, one of

  • Image edges: type the data value at the left, right, top and bottom edge.
  • Three-point: click three places on the picture and type their coordinates. Handles tilted or scanned maps.
  • Pixels: nothing; the table already holds pixel positions.

Maplew does

  • Prefills the edges from your data's range so something shows at once.
  • Marks that prefill in yellow as approximate until you replace it.
  • Redraws on every change.

Good to know

  • With No background the prefill is all you need.
  • You may never need to type anything: a saved CSV, a sidecar file or a setup file can carry the calibration.
  • Edge values belong to the picture: load a new table onto the same map and they stay. On a blank frame they are guessed again.

4 · Style the points (Encodings)

Choose which columns drive colour, size and shape. The legend is built from those choices and doubles as a control panel.

You do

  • Pick a column for Color, Size and Shape, or leave any at "none".
  • For numeric columns choose continuous (a gradient) or categorical (one colour per value).
  • Adjust sliders and toggles under Display.

Maplew does

  • Proposes a first colour and shape column.
  • Builds filter chips for every categorical choice.
  • Mirrors the legend onto the map so it stays visible with the sidebar closed.

Good to know

  • Click a legend entry to hide or show that category.
  • Each legend row has its own colour, size or shape override.
  • Shape has 8 symbols and only suits categories.

5 · Explore and edit

Hover a point for a summary. Click it for the full record with its media. Scroll to zoom and drag to pan.

You do

  • Click: open the record.
  • Shift+click: edit it.
  • Alt+click a second point: compare side by side.
  • Ctrl/Cmd+click: mark it.
  • Under Edit positions: drag points or click the map to add one.

Maplew does

  • Plays audio and video, shows images, embeds YouTube links.
  • Shows ELAN and Praat transcripts in step with the audio.
  • Records every move, edit, add and delete so you can undo it.

Good to know

  • Zooming and panning never change your data.
  • Spread stacked points separates rows that share one location, on screen only.
  • Edits live in the browser until you save. Leaving the page asks first.

6 · Save and share

Three buttons, three different things. Most people want the first two together.

You do

  • Save to CSV: your table, with edits and calibration.
  • Export setup: the look of the plot, as a small JSON file.
  • Snapshot PNG: a picture of the plot for a paper or slide.

Maplew does

  • Adds one reserved row to the CSV holding the calibration.
  • Writes column roles into the CSV headers as prefixes.
  • Draws the snapshot at the background image's full resolution.

Good to know

  • The background image and media are never inside the CSV or setup file. Send them alongside.
  • Load a setup file with Import setup, not by dropping it on the drop zone.
  • See what each save keeps.

Which file does what

Maplew decides by the file's ending, then by whether the table mentions the file's name.

You dropIt becomesHow it is matched
.csv .tsvThe table. One row is one point.Comma, tab or semicolon separated; detected automatically. If you drop several, the one with loc:: columns wins.
.json .jsonl .ndjsonThe table.A list of records, or one record per line.
.png .jpg .gif .webp .svgThe background, or a picture shown in a record.Background if no table cell contains its filename. Otherwise it belongs to the record that names it.
name.png.calib.txtCalibration for name.png.Same filename as the image plus .calib.txt. Lines L: R: T: B:.
.wav .mp3 .flac .ogg .m4a .mp4 .webm .movAudio or video in a record.By filename, from a med:: column. Folders in the cell are ignored.
.eaf .TextGridA transcript under the audio player.Named in a media column, or same base name as the file in med::audio.
Setup .jsonThe saved look of a plot.Only through the Import setup button.

A setup file dropped on the drop zone is read as a table, because both end in .json. Use Import setup for it.

Column labels

Header starts withMeaningWhere it shows up
loc::A coordinateX and Y dropdowns
dim::Something to colour, size or shape byTop of the encoding dropdowns, tooltip, record
med::A media file name or linkPlayer in the record window
desc::Longer textRecord window only
res::BookkeepingHidden everywhere, kept in the saved CSV
no prefixGuessed from the nameChange it any time under Column roles

What unlocks what

Sidebar sections appear as soon as they can do something. If a section is missing, the box to its left has not been satisfied yet.

FirstA table is loaded
Location columnsColumn rolesEdits
ThenA background is set
CalibrationBackground mapThe plot area
FinallyCalibration is valid
EncodingsDisplayLegendEdit positionsExport

Explore speaker (inside Encodings) appears only when a column is named speaker or speaker_id. Background map lists the background images you dropped; with more than one you can switch between them.

What each save keeps

What you madeSave to CSVExport setupSnapshot PNG
Table values, including moved, added and edited pointsYesNoAs drawn
Column rolesYes, as header prefixesYesNo
Calibration, X and Y columns, MercatorYes, in one reserved rowYesNo
Colour, size and shape choices; filtersNoYesAs drawn
Point size, opacity and other Display toggles, and whether the on-map legend is minimisedNoYesAs drawn
Title and axis labelsNoYesYour choice
Background imageNoOnly which basemap was activeYes
Audio, video, record imagesNoNoNo
Zoom and pan positionNoNoNo, always the whole image

Two smaller saves: Change log (Edits section) downloads the list of edits you made, and Download ELAN / TextGrid (in a record) saves corrections typed into a transcript. Neither is included in the three above.

To hand a complete plot to someone else, send four things: the saved CSV, the setup JSON, the background image and the media files.

Where calibration comes from

Calibration can travel with your files in three ways. When more than one is present they are applied in this order, so the later one wins.

  1. Reserved CSV rowA row starting __PLEWMAP_CALIB__, written by Save to CSV. Read when the table loads.
  2. Sidecar fileimage.png.calib.txt next to a background. Sets the four edge values when that image is shown, and again each time you switch basemap.
  3. Setup JSONApplied last, by Import setup or automatically on an example page.
  4. PrefillEdges guessed from your data's range plus 6%. Shown in yellow as approximate.

Anything you type afterwards overrides all of them. Reset to defaults returns to the prefill.


Part 2 · For maintainers

Under the hood

One HTML file, one global state object S, one redraw function renderAll(). Almost every control follows the same loop.

The loop: a control fires its handler → the handler writes to S (or leaves a value in the DOM) → the handler calls renderAll() → the SVG overlay, both legends, the filter chips and the sidebar's visible sections are rebuilt from S.

Select any box for what it does and which functions to read. Function names match the source; the source is grouped under banner comments with the same headings.

1 · Inputs

2 · Intake

3 · State S

4 · Redraw

5 · Outputs

What triggers what

Read a row as: this action calls this handler, which changes this part of the state, and then this much is redrawn.

ActionHandlerState it changesRedraw
Drop fileshandleFiles → ingestCSVEverything is reset, then headers, data, cols, basemaps, media, alignFilesFull, several times
Change X, Y or MercatoronLocChangelocX, locY, mercator, skippedFull, twice
Type an edge valueedgeEdited → applyCalibrationcalib.edges, calib.valid, calib.prefilledFull
Place a three-point markerclick on #overlaycalib.pts, calib.affineFull
Switch basemapswitchBasemap → activateBasemapSaves edges on the old basemap; activeBasemapId, imgW, imgH; applies the new one's edgesFull, after the image loads
Pick Color, Size or ShapeonEncChange → syncEncControlsenc; prunes filtersFull
Tick a filter chip or click a legend entrysetFilter, toggleFilterfilters[col][value]Full
Legend colour, size or shape overridesetCatColor, setCatSize, setCatShapeenc.color.catColors, enc.size.catSizes, enc.shape.catShapesFull
Move a Display slider or toggleonDisplayChangeNothing in S; the value stays in the controlFull
Scroll to zoom, or + and −mapZoomByviewCSS transform; plus a full redraw on the next frame unless "Marker size follows map zoom" is on
Drag the mapinitMapNavigationview.tx, view.tyCSS transform only
Click a pointonPointClick → openModalcompare.aFull
Alt+click, Ctrl/Cmd+clickonPointClickcompare.b, markedFull
Shift+click, then SaveopenRecordEditor → saveRecordEditorThe row; undoStack, changeLog; then classifyColumnsFull, three times
Drag a pointstartPointDragThe row's X and Y while dragging; one undo entry on releaseThat element only while dragging; full on release
Click the map in add modeclick on #overlay → createBlankRowAppends a row, opens the editorFull
Undo, Redo, Reset allundo, redo, resetAllChangesdata, both stacks; then classifyColumnsFull
Change a column's rolesetColumnRoleroleOverrides; then classifyColumns and both sets of dropdownsFull, three times
Save to CSV, Export setup, Snapshot PNGdownloadCSV, downloadVisualizationConfig, downloadSnapshotRead onlyNone

Things that are easy to miss

How an example page loads

StepWhereWhat happens
1content/examples/<name>.mdFront matter names a manifest and optionally a setup.
2layouts/_default/example-map.htmlHugo inlines plew-map.html and sets PLEW_EXAMPLE and PLEW_SETUP.
3loadRemoteExampleFetches the manifest, then every file it lists, six at a time, and wraps each as a File in manifest order.
4handleFilesThe same path as a manual drop. If no image arrived, useBlankFrame() supplies one.
5loadRemoteSetupFetches the setup JSON and calls applyVisualizationConfig.

The full reference (every state field, the call tree of each entry point, and an index of all functions) is the code map. Measured slow spots, reproducible bugs and streamlining ideas are in REVIEW-FINDINGS.md.