Initial import of a Formula One (F1) telemetry demo#22
Open
mgoddard wants to merge 1 commit into
Open
Conversation
lukasvogel
approved these changes
May 20, 2026
Member
lukasvogel
left a comment
There was a problem hiding this comment.
Worked out of the box for me!
Some minor nitpicks:
- In lap 1 the speed heatmap seemed to be ahead of the race leader, I'm not sure why exactly.
- Really love the SQL subpage. Nice way to show what's actually going on below the hood. The discriptions seem to mention some stuff about bugs that were fixed or limitations that don't apply anymore, though?
Comment on lines
+275
to
+276
| <code>'drs_open'</code>, etc. — though only <code>race_start</code> is wired in today. | ||
| Good spot to hang future "what just happened" tickers off.</p> |
Member
There was a problem hiding this comment.
Is that true? drs_open seems to be happening in the GUI?
Comment on lines
+414
to
+418
| <p><em>Note:</em> the SSE feed's Best/Last fields aren't currently surfaced in the UI; | ||
| that's why this query still uses the original <code>ARRAY_AGG(... ORDER BY ...)[1]</code> | ||
| construct. If you ever wire those fields into the per-car panel, mirror the | ||
| <code>MAX(lap_number)</code> + self-join rewrite from §9 to stay portable across | ||
| Postgres-compatible engines that may not honor <code>ORDER BY</code> inside aggregates.</p> |
Member
There was a problem hiding this comment.
We probably can drop this? Seems like an artifact of an earlier discussion with claude?
| <div class="notes"> | ||
| <p>Three CTEs plus a window function in a single round-trip. <code>lap_stats</code> | ||
| + <code>last_lap</code> together replace the <code>(ARRAY_AGG(... ORDER BY lap_number DESC))[1]</code> | ||
| construct from §8 — the rewrite is more portable across engines that may not honor |
Member
There was a problem hiding this comment.
which rewrite? Do we need this?
| ORDER BY bucket;</code></pre> | ||
| <div class="notes"> | ||
| <p>The OLAP-flavoured one. Scans every telemetry row for the session — no | ||
| DISTINCT ON shortcut — and bins by 1%-of-lap <code>track_pos</code>. Returns up to |
Member
There was a problem hiding this comment.
what's the context of the DISTINCT ON shortcut mentioned?
Comment on lines
+502
to
+506
| demo — pair it with §11 to show the simulator's writes keep ticking at full speed | ||
| regardless. <em>Portability fallback:</em> if your engine doesn't have | ||
| <code>WIDTH_BUCKET</code>, swap to | ||
| <code>LEAST(99, FLOOR(track_pos * 100)::int) + 1 AS bucket</code> — same semantics, | ||
| simpler arithmetic.</p> |
Member
There was a problem hiding this comment.
Also seems like an internal discussion artifact?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This demo works via Docker, sets up a CedarDB instance and a couple of Go programs which simulate data for a F1 race and provide a GUI with dashboard views of how the race evolves along with a link to view the SQL queries being run to power the demo.