Interactive lap chart visualization of Formula 1 races. The application is hosted here.
This project is based on the lap chart designed by Chris Pudney. Chris used a custom JSON for a single race. I developed a backend service that is able to automatically generate the JSON needed to draw the chart for any race starting from the 2011 season.
I have used Angular JS for the frontend, and Express JS and MongoDB for the backend. I retrieve the race results from the Ergast web service using this Ergast client for NodeJS.
I have included a tool that populates the DB automatically. This tool retrieves all the information needed
to draw the charts from the Ergast web service. The tool is under the db_update directory.
To use this tool:
- You need to have Node.js installed.
- Go to the
db_updatedirectory and executenpm install. - Specify an IP, a port, and your mongodb credentials in /db_update/config/config.js
- Start the service with
npm start.
First, save the list of races of the available seasons in the DB with PUT http://ip:port/seasons.
Next, save the race results with a PUT request to http://ip:port/raceresults.
You can also use PUT http://ip:port/raceresults/{season} or
http://ip:port/raceresults/{season}/{round} if you only need to update some races.
- You need to have the race results stored in the database (see previous section).
- You need to have Node.js installed.
- Go to the
backenddirectory and executenpm install. - Specify an IP, a port, and your mongodb credentials in /backend/config/config.js
- Start the service with
npm start.
You need to use an HTTP Server. For example, you can execute python -m SimpleHTTPServer 9999 in the
frontend directory.
The webapp will be available in http://localhost:9999. You can choose a different port.
If you modified the address or the port of the backend service, you will need to change the BASE_URL constant in /frontend/app/configuration.js
There are at least a couple of races that are not visualized correctly:
- The 11th race of 2014.
- The 18th race of 2014.
Creative Commons. Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)