Skip to main content
100%

1117 of HW3 Loading and Parsing CSV Data

✓ Published0🌍 Public
JJoshuoYang
Last edited Nov 17, 2022
Created on Nov 17, 2022

This example visualizes the distribution of energy levels in Spotify tracks, split into two groups based on popularity. It loads a CSV file using Plotly’s `d3.csv` method and processes the data to compute histograms. The code calculates quantiles with `d3.quantile` and bins the `energy` values into categories. Using Plotly’s `newPlot`, it renders bar and line charts for both groups: tracks with popularity above 33 and those below, showing the percentage of tracks in each energy range. The data source is a CSV of Spotify tracks.

AI-generated description
MIT Licensed

Similar vizzes