formula-one-six-degree-graph-util
v1.0.0
Published
A Library to Perform Graphing between Multiple Drivers of Formula One
Downloads
4
Maintainers
Readme
Formula One Graph Names
Website https://pratikpc.github.io/six-degree-f1/
Graph Operations utilised by the website to parse JSON and Abstract processing
import Graph from 'formula-one-six-degree-graph-util';
console.log(Graph.GetDriverName('5'));
const graph = new Graph();
graph.CalculateDistancesBetweenAllElements({ cache: true });
console.log(graph.GetSixDegreesOfFreedomInMainComponent());
console.log(
'Closest between 1950 and 2020',
Graph.GetDriverName(graph.GetClosestDriverPairingBetweenSeasons(1950, 2020))
);
console.log(
Graph.GetDriverName(graph.GetClosestTeamPairing('mclaren', 'lotus'))
);
console.log(
Graph.GetDriverName(
graph.GetClosestTeamAndDriverPairing('mclaren', 'kimi-raikkonen')
)
);
console.log('Farthest');
console.log(
Graph.GetDriverName(graph.GetFarthestDriverPairingBetweenSeasons(1950, 2020))
);
console.log(
Graph.GetDriverName(graph.GetFarthestTeamPairing('mclaren', 'lotus'))
);
console.log(
Graph.GetDriverName(
graph.GetClosestTeamAndDriverPairing('mclaren', 'kimi-raikkonen')
)
);