mit einem Klick
imsa
// Query the IMSA DuckDB dataset (output/imsa.duckdb). Includes schema guidance for seasons and laps plus formatting macros. Use for analytics, session lookups, and lap-level queries.
// Query the IMSA DuckDB dataset (output/imsa.duckdb). Includes schema guidance for seasons and laps plus formatting macros. Use for analytics, session lookups, and lap-level queries.
| name | imsa |
| description | Query the IMSA DuckDB dataset (output/imsa.duckdb). Includes schema guidance for seasons and laps plus formatting macros. Use for analytics, session lookups, and lap-level queries. |
Use this skill when working with the IMSA database in this repo.
output/imsa.duckdbseasons view (session-level summary)laps table (lap-by-lap records)SELECT *
FROM seasons
WHERE session = 'race'
ORDER BY date DESC
LIMIT 10;
seasons viewdate (DATE): event start datesession_id (BIGINT): join key to lapsseason (VARCHAR): 2021–2025event (VARCHAR): canonical venue namesession (VARCHAR): race/practice/qualifyingcars, drivers (BIGINT): countsclasses (VARCHAR): comma-separated classessession_start, session_end (TIMESTAMP)total_laps (INTEGER)rain_laps (BIGINT)flags (VARCHAR): non-green flags (NULL means all green)laps tableyear, event, session, start_date, session_idsession_time, clock_time, lap_time, lap_time_s1/s2/s3car (string), class, driver_name, driver_id, team_namelap, lap_time_driver_rank, pit_time, flagsstint_start, stint_number, stint_laplicense, license_rank, driver_countryair_temp_f, track_temp_f, humidity_percent, pressure_inhg,
wind_speed_mph, wind_direction_degrees, rainingsession_id is a stable join key for session-level joins.car is stored as text (e.g., '01' vs '1').stint_lap is 0-based within each stint.Use these macros when presenting times:
format_time(t) -- MM:SS.mmm or HH:MM:SS.mmm when >= 1 hour
format_gap(t) -- always +/- with 3 decimals
Examples:
format_time(117.099) → 01:57.099format_time(3661.234) → 01:01:01.234format_gap(4.323) → +4.323Fastest laps per driver in a race:
SELECT
driver_name,
MIN(lap_time) AS best_lap
FROM laps
WHERE session_id = ?
GROUP BY driver_name
ORDER BY best_lap;
Track rain sessions:
SELECT date, event, session, rain_laps
FROM seasons
WHERE rain_laps > 0
ORDER BY date DESC;
Read and explore any data file (CSV, JSON, Parquet, Avro, Excel, spatial, …) locally or remotely (S3, HTTPS). Resolves the path automatically. Uses DuckDB with extension-based format detection — no magic extension needed.
Search past Claude Code session logs to recover your own context. Invoke this proactively when you need to recall past decisions, patterns, or unresolved work — either across all projects or scoped to the current one.
use to query historical data on the IMSA Weathertech seasons
Create reactive Python notebooks for IMSA racing data analysis using marimo. Use for building interactive filtering UIs (seasons, classes, events), connecting to DuckDB databases, creating reactive visualizations, and performing data analysis with automatic cell re-execution. Includes templates, patterns, and IMSA-specific workflows.