npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

f1-telemetry-js

v2.0.0

Published

Reusable React + TypeScript telemetry visualization components for Formula 1 data.

Readme

f1-telemetry-js

npm version npm downloads bundle size license TypeScript

Reusable React + TypeScript component library for Formula 1 telemetry visualization.

Installation

npm install f1-telemetry-js chart.js react-chartjs-2

Quick Usage

import { SpeedChart, fromCsvTelemetry } from "f1-telemetry-js";

const telemetry = fromCsvTelemetry(`time,speed,throttle,brake,x,y
0,122,28,0,12,8
1,150,55,0,18,12
2,188,80,4,24,16
3,215,92,0,30,18`);

export function App() {
  return <SpeedChart time={telemetry.time} speed={telemetry.speed} />;
}

Core Charts

  • SpeedChart
  • ThrottleBrakeChart
  • LapComparisonChart
  • TrackMap
  • TelemetryDashboard
  • GearChart
  • EnergyChart
  • TyreStrategyTimeline
  • GapChart
  • PositionChart
  • MiniSectors
  • SpeedHeatmapTrackMap
  • RadarChart
  • PitStopTimeline
  • WeatherWidget
  • TelemetryPlayground
  • TelemetryDashboard layout editor (reorder, resize, hide/show, persisted)

Hooks

import { useTelemetry, useCursorSync, SpeedChart, ThrottleBrakeChart } from "f1-telemetry-js";

function Dashboard({ rawData }: { rawData: unknown }) {
  const { telemetry } = useTelemetry({ data: rawData });
  const { cursorProps } = useCursorSync();

  if (!telemetry) return null;

  return (
    <>
      <SpeedChart time={telemetry.time} speed={telemetry.speed} {...cursorProps} />
      <ThrottleBrakeChart
        time={telemetry.time}
        throttle={telemetry.throttle}
        brake={telemetry.brake}
        {...cursorProps}
      />
    </>
  );
}

Available hooks:

  • useTelemetry
  • useCursorSync
  • useAutoTheme
  • useChartExport
  • TelemetryProvider / useTelemetryContext

Headless Core (f1-telemetry-js/core)

Use the core subpath when you only need parsing, processing, computations, and constants (no React components):

import { fromCsvTelemetry, TEAM_COLORS, computeTimeDelta } from "f1-telemetry-js/core";

For finer-grained imports (smaller bundles in non-React apps):

import { processSeriesDataInWorker } from "f1-telemetry-js/performance";
import { fromOpenF1Telemetry } from "f1-telemetry-js/adapters";
import { SpeedChart } from "f1-telemetry-js/react";
import { registerTelemetryPanel } from "f1-telemetry-js/extensions";

Utility APIs

  • formatTelemetry
  • validateTelemetry
  • processSeriesData
  • findNearestIndex
  • createLineAnnotationDatasets
  • createTrackAnnotationDataset
  • normalizeDistance
  • computeLapTimes
  • computeSectorTimes
  • computeSpeedDelta
  • interpolateTelemetry
  • computeTimeDelta
  • detectOvertakes
  • classifyTyreCompound
  • mergeTelemetry
  • exportToJson
  • exportToCsv

Reliability features (v1.2)

import {
  fromOpenF1TelemetryWithDiagnostics,
  validateTelemetry
} from "f1-telemetry-js/core";

const adapterResult = fromOpenF1TelemetryWithDiagnostics(rawOpenF1Data, {
  validationMode: "lenient"
});

const strictValidation = validateTelemetry(adapterResult.telemetry, "lap-check", {
  mode: "strict"
});
  • Optional extra telemetry channels: gear, ersDeployment, ersHarvest, batteryLevel, airTemp, trackTemp, humidity, windSpeed, rainfall, pressure
  • Structured adapter diagnostics for contract monitoring in CI
  • Validation modes: strict (errors on mismatches) and lenient (warnings for recoverable shape issues)
  • Adaptive downsampling support via downsampleStrategy: "adaptive" and processing.adaptive
  • Optional worker processing API: processSeriesDataInWorker(...)
  • TelemetryPlayground import wizard for CSV field mapping and transform preview

Plugin Extension API

import { registerTelemetryPanel, telemetryStatsPanel } from "f1-telemetry-js";

registerTelemetryPanel(telemetryStatsPanel);

Built-in extension panels:

  • telemetryStatsPanel
  • gearDistributionPanel
  • lapSummaryPanel
  • stintDegradationPanel
  • sectorPaceEvolutionPanel
  • overtakeTimelinePanel

Panels can also include:

  • lifecycle hooks: onMount / onUnmount
  • panel context menu actions: contextMenuActions
  • shared state channels via context.shared.publish/read/subscribe

v2 Namespace Migration

Recommended import layout in v2:

  • React UI + hooks: f1-telemetry-js/react
  • Data/processing utilities: f1-telemetry-js/core
  • Adapter-only imports: f1-telemetry-js/adapters
  • Extension SDK + panels: f1-telemetry-js/extensions

To automate most import updates:

npm run codemod:v2-imports -- ./src

v2 also standardizes telemetry/event time semantics through normalizeTelemetryTime(...) with explicit timeReference.

React Native

f1-telemetry-js components use Chart.js (HTML canvas), which doesn't run in React Native.

For React Native projects, use the headless core for data processing:

import { fromOpenF1Telemetry, TEAM_COLORS, computeTimeDelta } from "f1-telemetry-js/core";

Then render visuals with a React Native charting library (victory-native, react-native-chart-kit, or react-native-skia).

Official wrappers and ecosystem packages:

  • @f1-telemetry-js/vue
  • @f1-telemetry-js/svelte
  • @f1-telemetry-js/react-native-core

Vue.js

Use the headless core for data processing in Vue apps:

import { fromCsvTelemetry, formatTelemetry, TEAM_COLORS } from "f1-telemetry-js/core";

Pair with Vue charting libraries like vue-chartjs or ECharts wrappers.

Svelte / SvelteKit

Use the headless core for data processing:

import { fromFastF1Telemetry, computeLapTimes, TRACKS } from "f1-telemetry-js/core";

Pair with a Svelte charting library such as layercake or pancake.

Development

npm run lint
npm run test:run
npm run build
npm run benchmark:ci
npm run benchmark:update-baseline
npm run api:check
npm run storybook