CSAllenISD / 2023-ISP-iStudy

1 stars 1 forks source link

topTracks.py needs to output JSON instead of CSV #15

Open shariq-h opened 1 year ago

shariq-h commented 1 year ago

Website needs to be able to fetch json const res = await fetch("https://raw.githubusercontent.com/llimllib/nbastats/cb9551776bcfdce57177d2e569da0e1d70f58890/playoff/data.json"); const stats = await res.json(); window.stats = stats; document.dispatchEvent(dataDownloaded); const lineGraph = Plot.dot(stats, { x: "date", y: "rank"}).plot(); document.body.append(lineGraph);

shariq-h commented 1 year ago

image JSON format created. We need to add to the data: {} object for every XML read. That means topTracks.py needs to write & save the json after every XML parse, then for the next one see if the songs already has an object (search with mbid not name), and if not, create it.