SINGAPORE ROAD SPEED · WORKFLOW

From daily profiles to linked findings

How 58,780 road links, each with one day of speed readings, become an embedding and 100 clusters, and how each cluster is read back through its daily curve and the map.

The question: which road links have a similar pattern of speed through the day, and where are they?

Each section below follows one step: the data table, the UMAP embedding, the K-means clusters, and the daily curves and map behind Key Findings.

Prepare58,780 × 288Read the file; flag missing readings
EmbedUMAP · 2DDaily profiles → a 2-D embedding
Cluster100 clustersK-means on the embedding
InterpretCurves + mapRead each cluster’s day and place

Data source

The data are a saved CSV attributed to LTA DataMall · Traffic Speed Bands: one day of speed bands for 58,780 directional road links, every five minutes. The Dataset page describes the fields, what each band means and how the file was obtained.

The analysis question

Which road links have a similar pattern of speed through the day, and where are they? Each directional road link is described by its 288 readings for the day. UMAP turns these into a 2-D embedding, K-means splits it into 100 clusters, and each cluster is then read through its daily curve and its links on the map.

How to read these results

The embedding coordinates and cluster labels in the charts are the original analysis’s saved results. The cluster statistics (each cluster’s average band and spread through the day) were recomputed from the CSV and match the saved values; the Check and export section gives the comparison.

Each row is one directional road link and each column is one five-minute slot, so each cell holds one link’s speed band in one slot (1 = slowest, 8 = fastest, 0 = no reading). Road names and coordinates are kept beside the matrix as labels.

The matrix · 96 representative rows

96 links picked at even steps through the range of daily average band, slowest at the top. All 288 slots are shown, from 00:00 to 23:55. Colour runs from blue (slow) to red (fast); grey means no reading. Click a cell, or use Road link and Time slot, to select a link and a slot.

The selected link’s complete day

Horizontal axis: hour of the day. Vertical axis: speed band. The orange dot marks the selected time slot.

The bands are used as they are, without subtracting each link’s average, so both the speed level and the shape of the day count. The 32 links whose readings are all 0 (no readings all day) are kept, as in the original analysis, and marked as missing. Road names and coordinates are labels only; they are not part of the matrix.

An embedding of the daily profiles

Each road link is described by 288 numbers, one per five-minute slot. UMAP squeezes those 288 numbers into two, so every link becomes a dot on a flat chart, called an embedding. Links with similar daily profiles end up close together. The chart shows the original analysis’s saved coordinates, coloured by its K-means clusters from blue (slowest after 12:00) to red (fastest).

For readability the chart shows 5,000 links taken at regular intervals from all 58,780. Key Findings shows every link, with hover and selection.

Recorded refit recipe

Features
288 raw band values
Neighbours
30
min_dist
0.1
Metric
Euclidean
Seed
20260930

Settings for refitting UMAP from the CSV. A refit produces a new embedding, separate from the saved one shown here.

K-means splits the dots of the 2-D UMAP embedding into 100 clusters: it places 100 centres and assigns each link to the nearest one. Clusters are numbered 0–99, and coloured blue to red, by their average band from 12:00 to midnight, so low numbers are the slowest after noon.

99 clusters contain links with readings. Cluster 0 contains only the 32 links whose readings are all 0.

Links per cluster

Each bar is one cluster, numbered 0–99 from left to right; its height is the number of links, out of all 58,780. The blue bar is the cluster chosen in Inspect a cluster; its daily profile and map are shown below.

Back to the daily profile

The line is the cluster’s average band at each time of day; the shaded band spans ± one standard deviation, showing how much its links differ from one another. Horizontal axis: hour; vertical axis: speed band.

Back to Singapore

The selected cluster’s links are drawn in colour and all other links in grey, using the same 5,000-link sample. Each dot is the midpoint of a link’s two ends. The embedding and the clusters were computed without these positions.

CheckResult
Link orderThe CSV’s LinkIDs are in the same order as in the saved results
Cluster sizesAll 58,780 links counted; sizes match exactly
Mean profile difference≤ 0.000500 bands (saved values rounded to 3 decimals)
Standard-deviation difference≤ 0.000500 bands (saved values rounded to 3 decimals)
Two-hour average difference≤ 0.050 bands (saved values rounded to 1 decimal)

Every difference is within the rounding of the saved values, so the recomputed statistics reproduce them. The saved results hold everything needed to rebuild Key Findings: embedding coordinates, cluster labels, cluster profiles, each link’s two-hour averages and the link IDs.

The link IDs tie each daily profile to its cluster and its map position, so the curves and the map always refer to the same roads.

Daily profiles → UMAP → K-means → cluster curves + map → Key Findings

Refit settings: K-means n_clusters=100, n_init=10, max_iter=300, seed 20260930. The adjusted Rand index (ARI) measures how closely a refit’s clusters match the saved ones: 1 means identical, 0 means no better than chance. Comparing the refit’s clusters with the original clusters gives an ARI of 0.4905.

What you can inspect

  • Which road links share a similar daily profile in the UMAP embedding.
  • How each cluster’s average band and its spread change through the day.
  • Where each cluster’s links are on the map; positions played no part in forming the clusters.

TermMeaning here
Road linkOne direction of travel along one road segment, identified by its LinkID.
Speed bandA speed range reported instead of an exact speed: band 1 is 0–9 km/h, rising in 10 km/h steps to band 8, 70 km/h and above. Band 0 marks a missing reading.
UMAPA method that turns each link’s 288 readings into two coordinates, placing links with similar daily profiles close together.
EmbeddingThe 2-D chart UMAP produces, with one dot per road link.
K-meansA method that splits points into k clusters: it places k centres and assigns each point to the nearest one, choosing the centres so that points lie as close to them as possible. Here k = 100 and the points are the embedding’s dots.
Saved results (reference)The original analysis’s embedding coordinates and cluster labels, reused on this page; the statistics shown are recomputed from the CSV and checked against them.
RefitRunning UMAP and K-means again from the CSV with recorded settings, which gives a new embedding and new clusters.