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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more