Skip to content

kenklin/p1lapchart

Repository files navigation

p1lapchart

I've combined my love of code and motorsports together to programmatically create lap charts from amatuer and professional race results posted at MyLaps.com. These charts show cars and their race positions (Y axis) at each lap (X axis) in the race.

An AWS EC2 server runs a Node/Express web application that web scrapes the source html from MyLaps.com (top screenshot) using jQuery. It produces a JSON representation of the race information through a REST API.

The final graphical visualizations (bottom screenshot) are created on the browser via JavaScript that uses D3 to graphically render the race information from the JSON objects.


Source html from mylaps.com

node_p1lapchart.js
jQuery web scraper implemented as Node application
running on AWS EC2
2695656.json
Resulting JSON object

index.html
D3 visualization

To Run

Click on the final (bottom-most) picture above to run p1lapchart on the race with id=2695656. The P1Software section below points to pages with groups of lapcharts.

There currently is no nice way of finding the MyLaps.com id for a race, except to find the race on MyLaps.com and copy the id embedded in its URL. :(

P1Software.com

The P1Software.com Lapchart page compiles lapcharts for selected race series including:

Backstory

In 2010-2012 Grand-Am race seasons, I worked weekends with Phoenix Performance for the Subaru Road Racing Team. I wrote custom software that normalized the live track information transmitted to teams. A program parsed the putty.log stream attached to our TransNET RS232 receiver and produced CSV files that RTDFile used to populated our Excel spreadsheet. A series of web-based dashboards written by Michael and David then used this data to derive lap, time, and fuel information to help with race strategy. These were fun, but very tense weekends!

Unfortunately, at the beginning of 2013, the factory terminated funding. Phoenix Performance continues to build, race, and sell championship winning cars. I continue to tinker at the intersection of software and motorsports.

2014 Update

I've returned to the rebooted Phoenix American Motorsports team for the 2014 IMSA Continental Tire SportsCar Challenge where we are campaigning a pair of Boss 302R Mustangs.

Read more about race analytics at P1Software.com.

2015 Update

I now work on P1Software full time and have two data products serving IMSA WeatherTech and Continental race teams:

  • P1TS software provides team members with real-time information an visualizations they need for race strategy.

  • P1Analysis.com subscription provides team members with post-session reports for study and analysis.

About

Lapchart web service in Node/Express with D3 client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published