There has been debates between basketball fans for years now in regards to who is the real Greatest Of All Time. The aim of this project is to provide the stats side by side to end that discussion.
-
Landing page
-
D3.js dynamic chart
-
Ability to compare regular season stats between Michael Jordan and LeBron James based on Points, Assists, Rebounds, and Turnovers
JS, CSS, Webpack, D3.js
https://www.balldontlie.io/ for player stat comparisons.
- Host on Github pages
- Read documentation on d3.js
- Fetch regular season stats for both players; parse and store data
- Implement chart, establish clean and dynamic code to allow for comparison upon various fields
- Style page, add links, source
-
src/
-
playerStats/
- lebronSeasonStats.json
- jordanSeasonStats.json
-
scripts/
- chart.js
- main.js
-
styles/
- index.scss
-
index.js
-
index.js
document.addEventListener("DOMContentLoaded", () => {
let dropdownOption = "pts"
const main = document.getElementById("main");
let content = new Main(dropdownOption);
const dropdown = document.getElementById("category").onchange = function(){
dropdownOption = this.value
document.getElementById('d3-container').innerHTML = ''
content = new Main(dropdownOption)
}
Allow stats comparison for playoffs