Public
Edited
May 2, 2024
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
sampleFile = FileAttachment(
"telemetry-NGP-Car_5-Subaru Impreza GC8 555 GrpA-Stage_21-13_04_2024 23_46_41 PM.tsv"
)
Insert cell
sampleData = sampleFile.tsv({ typed: true })
Insert cell
userData = userFile ? userFile.tsv({ typed: true }) : undefined
Insert cell
data = (userData || sampleData).map((d) => ({
...d,
timestamp: new Date(d.utcSystemTime)
}))
Insert cell
Insert cell
Insert cell
settledScrubbedIndex = settle(viewof scrubber)
Insert cell
Insert cell
speedScaleConfig = ({
color: {
scheme: "Plasma",
domain: [0, d3.max(data, (d) => d.speed)],
label: "Speed (km/h)"
}
})
Insert cell
speedScale = Plot.scale(speedScaleConfig)
Insert cell
Insert cell
Insert cell
THROTTLE_BRAKE_SCALE = Plot.scale(THROTTLE_BRAKE_SCALE_CONFIG)
Insert cell
Insert cell
clutchGearMark = Plot.text(filteredData, {
x: "timestamp",
y: (d) => 0,
tip: true,
text: "gear",
fill: "black",
channels: { clutch: "clutch", gear: "gear" },
stroke: "cyan",
filter: (d) => d.clutch > 0.9
})
Insert cell
clutchGearMark2D = Plot.text(filteredData, {
x: "position.x",
y: "position.y",
text: "gear",
stroke: "cyan",
fill: "black",
tip: true,
opacity: 0.5,
filter: (d) => d.clutch > 0.9,
channels: { clutch: "clutch", gear: "gear" }
})
Insert cell
gearVoronoiMark = Plot.voronoi(filteredData, {
x: "position.x",
y: "position.y",
fill: "gear",
fillOpacity: 0.15
})
Insert cell
startTipMark = Plot.tip(
_.take(
filteredData.filter((d) => d.raceTime === 0),
1
),
{
x: "position.x",
y: "position.y",
title: (d) => "Start"
}
)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more