Field notes

methods ·

The file between departments

A small, explicit data contract lets a sensor, a chart, and a design revision participate in the same project.

On this page

A sensor reading is not yet a useful measurement record. Somewhere between a microcontroller, a browser chart, and a design decision, somebody has to explain what 23.7 means.

The missing piece is often a modest file format. It needs units, timing, provenance, and enough structure to survive being opened by a tool that was not present when you invented it. It does not need a committee, although we appear to have accidentally founded one.

Start with one boring contract

For a temperature-placement experiment, use three columns:

elapsed_ms,temperature_c,reference_c
0,23.7,23.5
1000,23.8,23.5
2000,23.8,23.6

These rows are illustrative numbers, not collected observations. The header establishes units. The time column describes elapsed time rather than pretending to be a date. A sidecar JSON file can identify the sensor, firmware revision, mount revision, sample interval, and whether the rows are measured or synthetic.

Define missing values as missing. A blank reference reading must not turn into 0 °C during import. Reject malformed numbers with a row number and a useful explanation. Preserve the original file so a later transformation can be audited.

Move information without inventing it

The browser File API lets a page read files a visitor explicitly selects. Web Workers provide a way to perform parsing away from the main interface thread. Those capabilities support a local inspection workflow; they do not themselves certify privacy, correct units, or a reliable parser. MDN contributors MDN contributors

A sensible importer performs four separate jobs: decode text, parse records, validate fields, and interpret meaning. Mixing them makes silent corrections tempting. “I assumed those timestamps were seconds” belongs in an error report, not in the implementation.

Show an import summary before analysis: record count, recognized columns, time range, missing fields, and rejected rows. Do not draw a smooth line through a data gap without identifying the interpolation. The chart should not be the most imaginative member of the team.

Cross into fabrication carefully

Suppose the readings suggest the sensor is influenced by a nearby component. The next artifact could be a revised bracket with a different offset. Give the revision its own ID and retain the measurement file that motivated it.

A programmatic CAD tool such as JSCAD can turn parameters into geometry. Its modeling system is unitless; the documentation notes the usual millimeter convention on export. Our project contract must therefore explicitly say that dimensions are millimeters. JSCAD

The measurement does not automatically determine a safe bracket. Mounting constraints, cable routing, structural loads, and sensor exposure still need their own checks. A useful chain has explicit handoffs: observation → interpretation → design change → new observation.

Make export the beginning of the next tool

Export both the normalized data and the provenance record. Include a schema version so future readers can recognize the format. Include the processing choices: whether duplicate timestamps were rejected, whether rows were filtered, and how any summary was calculated.

Browser-generated downloads can use Blob URLs; release those URLs when they are no longer needed. Browser storage is useful for convenience, but quotas and eviction mean it is not a backup strategy. Put an obvious export action beside any saved local project. MDN contributors MDN contributors

You now have something more valuable than a clever demo: a small artifact that another application can inspect, another person can question, and a later revision can use. That is how the departments cooperate without spending the afternoon discussing interoperability.

Next: Read Give your project a memory before deciding what to measure.

Sources

More field notes