Worked Examples

Create temporal visualization — Visualization & Graphing

Create temporal visualization — Visualization & Graphing Cross-application area: Visualization & Graphing Status: Initial scientific graphics guidance; platform-specific features not verified. Goal Align time axes, frames, interpo

ProductSustainable Catalyst Research LabUpdatedNovember 14, 2026Reading time1 minutes

Application area: Visualization & Graphing
Article type: Technical How-to / Scientific Visualization
Audience: Researchers, scientific analysts, geospatial specialists, developers, and publication editors
Methods: Temporal alignment, time-series analysis, interpolation, frame generation, and scientific animation
Example technologies: Python 3, Matplotlib, Pillow, CSV
Outputs: Static time-series chart, animated GIF, frame register, and reproducibility evidence

1. Purpose and scientific objective

Temporal visualization communicates how a measured or modeled variable changes over time. It is used in environmental monitoring, climate research, experimental analysis, economics, satellite imagery, and numerical simulation.

A temporal visualization may be a static time-series graph, a sequence of scientific images, an animated map, or a time-dependent three-dimensional model.

The scientific challenge is to communicate change without introducing relationships that do not exist in the underlying observations.

Errors can arise when software:

  • Sorts timestamps incorrectly.
  • Mixes local time and UTC.
  • Assumes irregular observations are equally spaced.
  • Generates intermediate frames without identifying interpolation.
  • Silently fills missing measurements.
  • Changes numerical scales between frames.
  • Uses animation speed to exaggerate apparent change.
  • Represents modeled or interpolated states as measurements.

Core principle: Every displayed frame must have a documented scientific timestamp, and every numerical value must be traceable to an observation, model output, or explicitly identified estimate.

2. Select the appropriate temporal visualization

The visualization type should follow the scientific question rather than the availability of animation software.

Table 1. Temporal visualization methods
Method Suitable purpose Key limitation
Static time-series plot Compare measurements, trends, events, and intervals May be less suitable for complex spatial changes
Small multiples Compare selected time periods side by side Requires adequate space and consistent scales
Animated time series Show sequential development of values Motion can obscure precise comparisons
Animated heat map Show changes in a spatial or categorical field Normalization and missingness may be misleading
Temporal geospatial map Compare geographic observations through time Requires spatial and temporal registration
Time-dependent 3D visualization Show evolving spatial models or simulation fields Requires geometry, time, and model validation

Prefer a static chart when it communicates the scientific findings more clearly than an animation. Animation should provide meaningful additional information rather than merely making the presentation more visually dramatic.

3. Define the research and data requirements

Before creating a temporal visualization, specify:

  1. The research question and comparison.
  2. The measured or modeled variables.
  3. The experimental or observational units.
  4. The time period and sampling interval.
  5. The intended audience and scientific inference.
  6. The source dataset, version, licensing, and provenance.
  7. Measurement units and uncertainty.
  8. Rules for missing observations and invalid data.
  9. The intended visualization and export formats.

Use a versioned or immutable source dataset so that the original observations remain available after processing.

3.1 Required temporal metadata

Table 2. Minimum temporal data contract
Field Description
Observation ID Stable identifier of the measurement or model state
Timestamp Observation time with known temporal reference
Series ID Sensor, site, experiment, scenario, or variable identifier
Value Measured or modeled numerical value
Unit Physical or analytical unit
Quality flag Valid, suspect, missing, censored, or another defined state
Uncertainty Measurement or model uncertainty, if available
Provenance Dataset and processing identifiers
Revision Input version and processing method

4. Normalize timestamps and temporal coordinates

Timestamp processing must occur before resampling, interpolation, or animation.

4.1 Observation time versus processing time

Distinguish the following:

  • Observation time: When a scientific measurement was recorded.
  • Acquisition time: When a sensor acquired a record.
  • Processing time: When data were transformed or analyzed.
  • Frame time: The scientific instant represented by an animation frame.
  • Playback time: The duration for which a frame appears to the viewer.

These timestamps may differ. A satellite image acquired on Monday and processed on Wednesday should not automatically be labeled as a Wednesday observation.

4.2 UTC and time zones

Use time-zone-aware timestamps when representing real instants.

For example:

2026-01-01T12:00:00Z
2026-01-01T07:00:00-05:00

These values identify the same instant.

Preserve original time-zone information and normalize to a common reference when comparing data across locations.

Do not assume that a timestamp without a time-zone offset represents UTC.

4.3 Daylight saving time

Local timestamps can be ambiguous or nonexistent at daylight saving transitions. When converting local civil time into a scientific timestamp, retain the named time zone and sufficient information to resolve the actual instant.

Flag unresolved ambiguity rather than silently selecting an offset.

4.4 Irregular sampling

Observations may not occur at equal intervals. Calculate actual elapsed durations and investigate gaps before constructing the frame sequence.

delta_t = timestamp[i+1] - timestamp[i]

Do not assume that consecutive records represent equal durations merely because they are adjacent rows in a dataset.

5. Worked example: synthetic environmental time series

This example uses four synthetic observations collected during a five-day period. One intermediate day is intentionally absent to demonstrate how interpolation must be classified.

Scientific classification: Synthetic test fixture. Values are not field measurements and do not support a real-world scientific conclusion.

Table 3. Synthetic temporal observations
Timestamp (UTC) Value (arbitrary units) Status
2026-01-01 12:00 10 Observed
2026-01-02 12:00 13 Observed
2026-01-03 12:00 — No observation
2026-01-04 12:00 19 Observed
2026-01-05 12:00 18 Observed

5.1 Define the interpolation rule

For this specific demonstration, use linear interpolation and permit interpolation only between observations separated by no more than 48 hours.

The interpolation equation is:

y(t) = y0 + (y1 - y0)
       * ((t - t0) / (t1 - t0))

For January 3 at 12:00 UTC:

January 2 measurement = 13
January 4 measurement = 19

Elapsed interval = 48 hours
Elapsed time to January 3 = 24 hours

Interpolation fraction = 24 / 48 = 0.5

Interpolated value:
13 + (19 - 13) * 0.5 = 16

Interpretation: The value 16 is an estimate generated by the interpolation rule. It is not a recorded observation.

The 48-hour interpolation threshold is a synthetic test requirement, not a universal scientific rule. Real research must justify its interpolation method and allowable gap using the behavior of the system being studied.

5.2 Expected frame data

Table 4. Expected temporal animation frames
Frame Timestamp (UTC) Value Classification
1 2026-01-01 12:00 10 Observed
2 2026-01-02 12:00 13 Observed
3 2026-01-03 12:00 16 Interpolated
4 2026-01-04 12:00 19 Observed
5 2026-01-05 12:00 18 Observed

6. Prepare the Python environment

The reference implementation uses Python, Matplotlib, and Pillow.

mkdir temporal-visualization
cd temporal-visualization

python3 -m venv .venv
source .venv/bin/activate

python -m pip install matplotlib pillow

python --version
python -m pip freeze

Save the installed dependency versions with the research artifacts. For controlled reproducibility, use reviewed and pinned package versions.

7. Create the source dataset

Save the following as observations.csv:

timestamp,value
2026-01-01T12:00:00Z,10
2026-01-02T12:00:00Z,13
2026-01-04T12:00:00Z,19
2026-01-05T12:00:00Z,18

Keep this file unchanged during processing. Generated frames and interpolated estimates belong in separate output artifacts.

8. Generate the temporal visualization

Save the following as render_temporal.py. The script:

  • Reads and validates the source dataset.
  • Normalizes timestamps to UTC.
  • Creates a daily frame sequence.
  • Calculates the permitted interpolated value.
  • Separately labels observed and interpolated states.
  • Exports a static overview and animated GIF.
  • Writes the authoritative frame register.
  • Records SHA-256 integrity hashes.
import csv
import hashlib
import math

from datetime import datetime, timedelta, timezone
from pathlib import Path

import matplotlib
matplotlib.use("Agg")

import matplotlib.pyplot as plt
from matplotlib.animation import (
    FuncAnimation,
    PillowWriter
)

SOURCE = Path("observations.csv")
OUTPUT = Path("output")
OUTPUT.mkdir(exist_ok=True)

MAX_GAP = timedelta(hours=48)

def parse_time(value):
    dt = datetime.fromisoformat(
        value.replace("Z", "+00:00")
    )

    if dt.utcoffset() is None:
        raise ValueError("Time zone required")

    return dt.astimezone(timezone.utc)

observations = []

with SOURCE.open(
    newline="", encoding="utf-8"
) as handle:

    reader = csv.DictReader(handle)

    assert reader.fieldnames == [
        "timestamp", "value"
    ]

    for row in reader:
        value = float(row["value"])

        if not math.isfinite(value):
            raise ValueError("Invalid numeric value")

        observations.append((
            parse_time(row["timestamp"]),
            value
        ))

observations.sort(key=lambda row: row[0])

assert len(observations) == 4
assert len({
    t for t, _ in observations
}) == len(observations)

observed = dict(observations)

def value_at(target):
    if target in observed:
        return observed[target], "observed"

    before = [
        (t, v) for t, v in observations
        if t < target
    ]

    after = [
        (t, v) for t, v in observations
        if t > target
    ]

    if not before or not after:
        raise ValueError(
            "Extrapolation not allowed"
        )

    t0, y0 = before[-1]
    t1, y1 = after[0]

    gap = t1 - t0

    if gap <= timedelta(0):
        raise ValueError(
            "Invalid observation interval"
        )

    if gap > MAX_GAP:
        raise ValueError(
            "Interpolation gap exceeds policy"
        )

    fraction = (
        (target - t0).total_seconds()
        / gap.total_seconds()
    )

    value = y0 + fraction * (y1 - y0)

    return value, "interpolated"

# Build a daily frame schedule.
start = observations[0][0]
end = observations[-1][0]

frames = []
current = start

while current <= end:
    value, status = value_at(current)

    frames.append({
        "timestamp": current,
        "value": value,
        "status": status
    })

    current += timedelta(days=1)

assert len(frames) == 5

assert [f["value"] for f in frames] == [
    10.0, 13.0, 16.0, 19.0, 18.0
]

assert [f["status"] for f in frames] == [
    "observed",
    "observed",
    "interpolated",
    "observed",
    "observed"
]

# Export numerical frame register.
register = OUTPUT / "frame-register.csv"

with register.open(
    "w", newline="", encoding="utf-8"
) as handle:

    writer = csv.writer(handle)

    writer.writerow([
        "frame",
        "timestamp_utc",
        "value",
        "classification"
    ])

    for index, frame in enumerate(
        frames, start=1
    ):
        writer.writerow([
            index,
            frame["timestamp"].isoformat(),
            frame["value"],
            frame["status"]
        ])

# Create consistent rendering axes.
fig, ax = plt.subplots(
    figsize=(9, 5.5)
)

times = [f["timestamp"] for f in frames]

def draw_frame(index):
    ax.clear()

    frame = frames[index]
    visible = frames[:index + 1]

    ax.set_xlim(start, end)
    ax.set_ylim(0, 22)

    ax.set_xticks(times)
    ax.tick_params(
        axis="x", rotation=30
    )

    ax.set_xlabel(
        "Observation time (UTC)"
    )

    ax.set_ylabel(
        "Measurement (arbitrary units)"
    )

    ax.set_title(
        "Synthetic temporal visualization"
    )

    ax.grid(axis="y", alpha=0.25)

    # Show observed measurements.
    obs_points = [
        (t, value)
        for t, value in observations
        if t <= frame["timestamp"]
    ]

    ax.scatter(
        [p[0] for p in obs_points],
        [p[1] for p in obs_points],
        color="#174A67",
        marker="o",
        s=75,
        label="Observed measurement"
    )

    # Show interpolated estimates separately.
    estimates = [
        f for f in visible
        if f["status"] == "interpolated"
    ]

    if estimates:
        ax.scatter(
            [f["timestamp"] for f in estimates],
            [f["value"] for f in estimates],
            facecolors="white",
            edgecolors="#A43B28",
            marker="s",
            s=100,
            linewidths=2,
            label="Interpolated estimate"
        )

    # Connect values with an illustrative
    # interpolation path, not observations.
    ax.plot(
        [f["timestamp"] for f in visible],
        [f["value"] for f in visible],
        linestyle=":",
        color="#555555",
        linewidth=1.5,
        label="Interpolated visual path"
    )

    ax.text(
        0.02, 0.95,
        "Time: "
        + frame["timestamp"].isoformat()
        + "\nValue: "
        + str(frame["value"])
        + "\nStatus: "
        + frame["status"],
        transform=ax.transAxes,
        va="top",
        bbox={
            "facecolor": "white",
            "edgecolor": "#777777"
        }
    )

    ax.legend(loc="lower right")
    fig.tight_layout()

# Static overview.
draw_frame(len(frames) - 1)

fig.savefig(
    OUTPUT / "temporal-overview.png",
    dpi=200
)

# Animation: one second per frame.
animation = FuncAnimation(
    fig,
    draw_frame,
    frames=len(frames),
    interval=1000,
    repeat=False
)

animation.save(
    OUTPUT / "temporal-animation.gif",
    writer=PillowWriter(fps=1)
)

plt.close(fig)

def sha256(path):
    digest = hashlib.sha256()

    with path.open("rb") as handle:
        for chunk in iter(
            lambda: handle.read(65536), b""
        ):
            digest.update(chunk)

    return digest.hexdigest()

for path in [
    SOURCE,
    register,
    OUTPUT / "temporal-overview.png",
    OUTPUT / "temporal-animation.gif"
]:
    print(path.name, sha256(path))

print(
    "Frame values:",
    [f["value"] for f in frames]
)

print("Frame count:", len(frames))
print("Rendering complete")

8.1 Execute the renderer

python render_temporal.py

Expected outputs:

output/
  frame-register.csv
  temporal-overview.png
  temporal-animation.gif

Expected numerical results:

Frame values: [10.0, 13.0, 16.0, 19.0, 18.0]
Frame count: 5
Rendering complete

The script defines the expected output but does not establish that the code has passed testing in the reader’s environment. Actual execution, figure inspection, and dependency capture are required for a verified result.

9. Understand animation timing

Animation playback time and scientific elapsed time must remain separate.

The example contains five frames, each representing one day of scientific time. The GIF writer is configured for one frame per second.

Thus, approximately five seconds of playback represent four days between the first and last scientific timestamps.

This is a presentation convention, not a physical statement about the speed of the measured process.

9.1 Frame timing policy

For every animation, document:

  • Scientific timestamp of each frame.
  • Elapsed time between consecutive scientific states.
  • Playback duration assigned to each frame.
  • Whether frame times are observed, interpolated, or simulated.
  • Whether playback timing is proportional to real scientific time.

Do not describe constant playback intervals as evidence of constant physical change.

9.2 Prevent misleading visual scaling

Keep axis limits consistent when comparing magnitudes across frames. Automatically changing y-axis limits may exaggerate small changes or minimize large ones.

For spatial heat maps, consistent color normalization is often needed to preserve comparability between dates.

Any deliberate use of changing scales must be documented.

10. Preserve measurement and interpolation distinctions

Observed measurements and interpolated states must remain distinguishable in both the graphic and the accompanying numerical record.

Table 5. Recommended temporal state encodings
State Visual encoding Required description
Observed Filled circular marker Recorded measurement
Interpolated Hollow square marker Estimated between observations
Forecast Dashed extension or separate panel Model prediction beyond observed range
Missing Gap or explicit no-data indication Observation unavailable or excluded

Do not rely exclusively on color for classification. Use labels, shapes, line patterns, or other non-color distinctions.

An interpolation algorithm must never modify the authoritative input dataset by silently replacing missing observations with generated estimates.

11. Scientific uncertainty and interpretation

A temporal animation can imply continuous knowledge of a system even when observations are sparse.

Distinguish at least four uncertainty sources:

  • Measurement uncertainty: Instrument accuracy, calibration, and observation variability.
  • Sampling uncertainty: Uncertainty associated with the design and frequency of observations.
  • Interpolation uncertainty: Uncertainty introduced when estimating values between known observations.
  • Model uncertainty: Uncertainty associated with parameters, assumptions, and computational models.

Linear interpolation provides an estimated intermediate value, but it does not automatically provide a scientifically justified confidence interval.

For real studies, document the uncertainty method and avoid interpreting a visually smooth transition as evidence of physically smooth behavior.

12. Temporal geospatial and 4D visualization

Time-dependent spatial datasets may be represented as animated maps, raster sequences, evolving surfaces, or three-dimensional fields changing through time.

Examples include:

  • Satellite-derived vegetation indices across acquisition dates.
  • Changes in land use or land cover.
  • Temperature and precipitation fields.
  • Groundwater, soil, or atmospheric simulations.
  • Time-varying geological or engineering models.

12.1 Spatial alignment requirements

For each frame, preserve:

  • Coordinate reference system.
  • Spatial extent.
  • Grid origin and pixel resolution.
  • Acquisition timestamp.
  • Data quality and missing-data masks.
  • Interpolation or resampling method.
  • Color normalization and measurement units.

Misaligned spatial grids can create false movement or change between dates.

12.2 3D plus time

A time-varying three-dimensional field may be described as a four-dimensional visualization when it combines three spatial coordinates and a time coordinate.

However, animation of a 3D scene does not independently validate its geometry, numerical simulation, or physical assumptions.

Each frame requires spatial verification, while the sequence requires separate temporal validation.

13. Accessibility requirements

Temporal visualizations must not rely on animation alone to communicate essential scientific information.

13.1 Static equivalent

Provide a static chart or a set of representative frames showing the essential trend. The example produces temporal-overview.png for this purpose.

Publish an accessible numerical table alongside the graphic. A downloadable CSV is useful for reproducibility but should not be the only alternative to the visualization.

13.2 Alternative text

Suggested short description:

Temporal chart of synthetic measurements from January 1 to January 5, 2026. Observed values are 10, 13, 19, and 18 units. The January 3 value of 16 units is interpolated rather than measured.

13.3 Motion and playback controls

For web-based animations, apply relevant WCAG 2.2 requirements, including the conditions addressed by Success Criterion 2.2.2, Pause, Stop, Hide.

Prefer user-initiated animation and provide accessible controls where supported.

Test that:

  • Essential information is available without watching the animation.
  • Playback controls can be used with a keyboard.
  • Users can pause or stop motion where required.
  • Important frame values remain accessible.
  • Reduced-motion preferences are respected where supported.
  • Color is not the only means of distinguishing scientific states.

Animated GIFs do not inherently provide reliable playback controls. The generated GIF should be treated as a supplementary output unless the publication environment provides appropriate accessible presentation.

14. Scientific acceptance tests

Table 6. Temporal visualization acceptance matrix
Test Pass condition Evidence
Source integrity Original observations remain unchanged Dataset version and checksum
Timestamp integrity All frames use correct scientific instants Timestamp comparison
Observation fidelity Recorded values match source data Numerical test
Interpolation Estimated values match the declared algorithm Independent calculation
Classification Observed and estimated states remain distinguishable Frame register and visual review
Gap policy Unsupported interpolation intervals are rejected Boundary test
Frame order Frames follow chronological order Frame register
Axis integrity Comparative scales and units are correct Rendered figure review
Playback Scientific and display time mapping is documented Animation configuration
Accessibility Essential information available through appropriate alternatives and controls Accessibility test record
Reproducibility Independent execution reconstructs the numerical result Execution log
Scientific interpretation No unsupported measurement or causal claims Scientific review

Decision rule: Mark each applicable criterion Pass, Fail, or Not Tested. Do not identify a visualization as fully verified when required criteria remain untested or have failed.

15. Reproducibility and evidence preservation

Archive the following:

  • Original timestamped dataset.
  • Source provenance and data permissions.
  • Data dictionary and measurement units.
  • Processing and interpolation rules.
  • Python rendering script.
  • Installed dependency versions.
  • Generated numerical frame register.
  • Static chart and animated output.
  • Accessible descriptions and tables.
  • Execution logs and SHA-256 hashes.
  • Validation results and scientific limitations.

Preserve the source and derived artifacts separately. A SHA-256 checksum identifies the file content but does not establish scientific accuracy.

Exact animation-file bytes may vary between environments because of encoding and software differences. Numerical reproducibility should be assessed independently from exact image-file equality.

16. Sustainable Catalyst implementation workflow

The following is the intended research workflow across Sustainable Catalyst. It is not a claim that every application integration or rendering interface is currently deployed.

Table 7. Cross-application temporal visualization responsibilities
Application Responsibility
Library Register time-indexed sources, licensing, timestamps, and provenance
Research Lab Evaluate time-series methods, interpolation, and scientific uncertainty
Workbench Where supported, execute versioned processing and rendering workflows
Visualization & Graphing Apply temporal encodings, frame sequencing, animation, and accessible presentation
Site Intelligence Where supported, connect geographic coordinates with temporal observations
Research Associate figures with methods, evidence, analysis, and research findings
Workspace Preserve project relationships, review state, and publication decisions

For each implemented temporal renderer, maintain evidence identifying the actual repository, source-code path, application version, temporal schema, supported formats, and executed tests.

Do not describe a renderer as production-verified solely because a compatible open-source library exists or because a standalone script generates an animation successfully.

17. Common problems and corrective actions

Table 8. Temporal visualization troubleshooting
Problem Likely cause Corrective action
Frames appear out of order Timestamp conversion or sorting error Normalize timestamps and compare actual instants
Intermediate values appear as measurements Interpolation classification lost Preserve labels and source-versus-derived status
Missing observations become zero Incorrect missing-data treatment Preserve missingness and documented quality flags
Change appears exaggerated Automatic axis or color rescaling Use scientifically justified consistent scales
Spatial features move unexpectedly Grid registration or coordinate mismatch Verify spatial alignment and reprojection
Animation is inaccessible Motion-only information or missing controls Provide static alternatives, numerical data, and accessible playback
Export differs from the input Filtering, stale cache, or renderer transformation Compare frame values against the authoritative source
Results cannot be reproduced Missing source data or environment details Archive complete input, code, and configuration

18. Scientific limitations

A temporal visualization communicates information produced by observations, models, and data-processing choices. It does not establish the validity of those inputs.

Interpolation may be inappropriate for discontinuous events, highly nonlinear processes, threshold behavior, or rapidly changing systems.

Similarly, a smooth animation does not prove the underlying process changed smoothly. A statistically reproducible time series may still contain confounding, biased measurements, or invalid assumptions.

Scientific interpretation must be reviewed separately from graphical and computational acceptance.

19. Technical references

20. Completion and verification record

Table 9. Required temporal visualization record
Field Required value
Visualization ID Stable identifier and revision
Source dataset Version, provenance, and checksum
Temporal reference Time standard, time zone, and coverage
Interpolation Method, limits, and scientific justification
Renderer Installed software and version
Numerical validation Pass, Fail, or Not Tested
Temporal validation Pass, Fail, or Not Tested
Visual validation Pass, Fail, or Not Tested
Accessibility Pass, Fail, or Not Tested
Reproducibility Pass, Fail, or Not Tested
Scientific review Pass, Fail, or Not Tested
Reviewer Reviewer and verification date
Evidence Executed tests, frame register, artifacts, and logs
Limitations Unresolved technical or scientific issues

Completion criterion: A temporal visualization must preserve authoritative observations, correctly represent scientific time, identify interpolated and modeled states, maintain defensible scales, and provide accessible numerical alternatives and reproducibility evidence.

Current verification status: Technical methodology documented. Sustainable Catalyst renderer-specific acceptance requires actual deployment testing and documented review.

Scroll to Top