Skip to content

Read the data dictionary before the data

Draft: not yet validated

The code on this page was run inside MESA JupyterLab on 2026-11-13 and produced the output shown. The Markdown-cell step was followed there on 2026-11-16 by the AI assistant that drafted the page. No person has yet followed them, so a screen may differ. Tell us what you find.

A data dictionary is the table that says what each column means. Five minutes with it saves you from a number that looks right and is not.

You will: be able to say what one row of readings.csv is, and why its value column cannot simply be added up across gauges.

Time: 5 minutes. You need: the notebook from Load a file from your Data Store into a notebook, open in MESA JupyterLab, with its first cell run so that readings and gauges exist.

Steps

  1. Open the data dictionary for the practice data and read the four rows for readings.csv.

    You should see: that one row is one reading, from one gauge, for one day.

  2. Read the meaning of value again, slowly.

    You should see: "in the gauge's own unit". The column does not promise one unit.

  3. Find where the unit is recorded. Read the four rows for gauges.csv.

    You should see: a unit column, one value for each gauge.

  4. In your notebook, run:

    gauges[["gauge_id", "name", "unit"]]
    

    You should see:

      gauge_id         name unit
    0      G01    Boathouse   mm
    1      G02      Orchard   cm
    2      G03  Observatory   mm
    3      G04        Depot   mm
    4      G05       Quarry   mm
    
  5. Compare the largest reading at each gauge:

    readings.groupby("gauge_id")["value"].max()
    

    You should see: G02's largest reading far below its neighbours'. The dictionary has already told you why: G02 reports in centimetres, the others in millimetres.

  6. In a Markdown cell (press Esc, then M), write one sentence of your own that says what value holds and what must happen before values from different gauges are compared.

    You should see: your sentence, rendered, after you press Shift+Enter.

Check it worked

Without looking at this page, you can name the gauge that reports in a different unit and the file that told you so.

If it didn't

NameError: name 'gauges' is not defined. The kernel has restarted since you loaded the files. Run the notebook's first cell again, then repeat the step.

Next

Not yet validated by a person in MESA JupyterLab. Drafted with AI assistance on 2026-11-12; the code was run there on 2026-11-13 (pandas 3.1.1, DuckDB 2.0.0).

Machine-readable versions of this page: Markdown twin · raw source on GitHub · llms.txt · llms-full.txt (whole site). See For AI agents.