How Would You Create a Small Historical Data Plot?
From the earlier reference collection. Read the current software blog.
A historical plot should make timestamps, units, and missing intervals visible instead of connecting observations in a way that implies unobserved data.
Prepare the time series
A historical plot begins with a clearly defined series: one measured quantity, a unit, and a timestamp for each valid observation. Parse timestamps with their time zones before sorting. If a source provides local times without an offset, document the interpretation rather than silently treating them as universal time. Duplicate timestamps also need an explicit policy, such as showing both observations or selecting one according to source rules.
Keep the raw records available while preparing the chart. A plotted value may be converted for display, but preserve the original value, unit, and timestamp so a reviewer can trace an unusual point. Label the series with the station or source identity; two sensors measuring the same quantity may have different histories.
Represent gaps honestly
A line between two points suggests a continuous trend, even when the source contains no measurements for the interval. Set a maximum gap beyond which the chart breaks the line, based on the expected sampling interval. If readings are expected every five minutes, a gap of several hours should usually be visible as missing coverage instead of a smooth bridge.
For example, observations at 10:00 and 10:05 can be joined under a five-minute cadence, while the next observation at 13:00 should begin a new segment. Add a subtle gap marker or a note that no observations were available during the interval. Do not interpolate missing values unless interpolation is a deliberate analytical choice and clearly labeled.
Make axes and summaries clear
Label the time axis with a useful date range and the value axis with its unit. Choose a range that preserves meaningful variation without making ordinary changes invisible. If the chart includes a zero baseline or a truncated axis, make that choice understandable. Tooltips can show exact timestamp, raw value, and any transformed display value.
A summary such as minimum, maximum, or latest reading must state the interval it covers and how missing data are handled. Avoid presenting a summary over a selected window as though it described the entire source history. If the plot is sparse, a point chart may communicate the evidence better than a connected line.
Test the chart with imperfect data
Build local examples for regular observations, a long gap, out-of-order timestamps, duplicate times, and a missing or invalid value. Confirm that the chart does not connect across a gap and that the labels preserve the intended time zone. Test a single observation as well; the chart should show a point rather than an empty line.
The purpose of a small history plot is to reveal patterns while showing where evidence is absent. State when the data were retrieved and what time span is displayed. That context helps a reader distinguish a real flat period from a reporting gap and understand how much confidence to place in the visible shape.