v-lai / popular_music

Data visualization for popular music singles sold
0 stars 0 forks source link

Visualization Feedback #1

Open mmmaaatttttt opened 7 years ago

mmmaaatttttt commented 7 years ago

Hey Vivian,

Nice work on the visualization. It's great to see multiple graphs, and it looks like your tooltip is working well.

I've broken out feedback into two pieces: feedback on the end product, and code review.

End Product

Code Review

https://github.com/v-lai/popular_music/blob/master/app.js#L1-L7 https://github.com/v-lai/popular_music/blob/master/app.js#L69-L75 https://github.com/v-lai/popular_music/blob/master/app.js#L214

div.html(`
  <strong>Artist:</strong> <span style='color:red'>${d.artist}</span><br>
  <strong>Song:</strong> <span style='color:red'>${d.single}</span><br>
  <strong>Year:</strong> <span style='color:red'>${d.released}</span><br>
  <strong>Sales (mil):</strong> <span style='color:red'>${d.sales}</span><br>
`)

Also, I'd advocate for using something like a p tag rather than using spans and br tags. I try to avoid using br tags, since it mixes styling with markup; rules for how the text looks should be in CSS, not in HTML.

Again, nice work!

v-lai commented 7 years ago

Matt, Thanks for the great feedback- I did not see this until now. I totally agree on both the end product items: I should sort the data for a more consistent look (the data was straight from Wikipedia minus the footnotes I took out), and there is no "third dimension" to the scatterplot data, which would have made it more "data driven" and not just duplicating data for sizing.