EchoTime Explainable time-series similarity for humans and agents.
Examples / Flagship demo
Flagship demo

Southwest heatwave city temperatures

A wide-table example using Phoenix and Las Vegas daily maximum temperatures during the 2024 summer heatwave window.

Question

How similar were Phoenix and Las Vegas daily maximum temperatures during the 2024 heatwave window?

This page reads a real two-column climate table, compares Phoenix and Las Vegas directly, and then profiles the full panel. It is the same pattern you would use for two sensors, two regions, or two business metrics in one wide CSV.

Input wide table or multichannel array with timestamps Call compare_series(left, right) + profile_dataset(data) Output SimilarityReport + DatasetProfile
  1. Load the wide table with pandas.
  2. Compare the two columns you care about with compare_series(...).
  3. Profile the full dataset with profile_dataset(...) to see the wider structural context.
Result at a glance
Pearson 0.73Spearman 0.75Mutual info 0.28Diff r 0.12
Component mean 0.51 across 5 time-series metrics

Phoenix max temp vs Las Vegas max temp: Pearson r 0.73, Spearman rho 0.75, Kendall tau 0.56. The best agreement appears in trend similarity. The weakest agreement appears in shape similarity and derivative similarity, so timing or regime differences probably matter.

trend similarity0.91
spectral similarity0.60
dtw similarity0.59
shape similarity0.30
Runnable example

This is the minimal script a human user would actually run: load data, call EchoTime, inspect the returned object.

from pathlib import Path

import pandas as pd
from echotime import compare_series, profile_dataset

data_path = Path(__file__).resolve().parents[1] / "data" / "real_heatwave_city_temps_2024.csv"
df = pd.read_csv(data_path)

report = compare_series(df["phoenix_temp_max"], df["las_vegas_temp_max"], left_name="Phoenix max temp", right_name="Las Vegas max temp")
profile = profile_dataset(df[["phoenix_temp_max", "las_vegas_temp_max"]], domain="climate")

print(report.to_summary_card_markdown())
print(profile.to_summary_card_markdown())
What you should see

You should see high pairwise correlation metrics plus a dataset profile explaining the broader panel structure.

# EchoTime similarity summary

**Compared:** Phoenix max temp vs Las Vegas max temp

## Headline

Phoenix max temp vs Las Vegas max temp: Pearson r 0.73, Spearman rho 0.75, Kendall tau 0.56. The best agreement appears in trend similarity. The weakest agreement appears in shape similarity and derivative similarity, so timing or regime differences probably matter.

## Familiar statistics

| metric | value |
|---|---:|
| Pearson r | 0.727 |
| Spearman rho | 0.746 |
| Kendall tau | 0.556 |
| Best-lag Pearson r | 0.822 |
| Mutual info | 0.281 |
| First-difference r | 0.123 |

## Time-series-specific metrics

| plain-language label | score |
|---|---:|
| trend similarity | 0.915 |
| spectral similarity | 0.605 |
| dtw similarity | 0.586 |
| shape similarity | 0.299 |

## Recommended next actions

- Plot both series after z-score normalization to show the shared shape without scale differences.
- Run rolling or windowed similarity if you expect the relationship to change over time.
- Use structural-profile similarity when scales, frequencies, or observation modes differ too much for raw-shape comparison.
  • Pearson 0.73 / Spearman 0.75 / Mutual info 0.28 shows the two cities track each other closely through the heatwave window.
  • The supporting dataset profile shows the broader structural context behind that pairwise comparison.
  • This is a realistic wide-table workflow you can reuse for any small panel of real measurements.
Use your own data

This is the most useful pattern when you have a whole panel, not just one pair of curves.

  • For a CSV, keep one timestamp column and one numeric column per city, region, or sensor.
  • Use compare_series(...) for the one pair you want to talk about, then profile_dataset(...) for the full panel.
  • If you need something shareable, write both the similarity and profile HTML reports to disk.
Phoenix vs Las Vegas
EchoTime series previewSeries previewPhoenixLas Vegas

The two city temperature curves share broad movement, but day-to-day changes are not identical.

Similarity radar
Similarity radarSimilarity radarRadar over the time-series metrics. Read it together with Pearson, Spearman, and mutual info.ShapeDTWTrendDerivativeSpectral

The radar shows where the two temperature curves agree most strongly.

Dataset structure
EchoTime axis radarAxis radarHigher means the axis is more structurally dominant.IrregularityNoisePredictabilityDriftTrendRhythmicityComplexityNonlinearityBurstinessRegimesCouplingHeterogeneity

The dataset profile reveals the broader structure of the full temperature panel.