Export Code
Connected
viz.js
import {
csvParse,
select,
min,
max,
extent,
group,
flatGroup,
rollup,
flatRollup,
sum,
bin,
} from 'd3';

export const viz = (
container,
{ state, setState }
) => {
if (state.data && state.data !== 'LOADING') {
const data = state.data;
// console.log(data.map(d => d.petal_length));
// console.log(data.filter(d => d.species === "versicolor"));
// const speciesSet = new Set(
// data.map((d) => d.species)
// );
// console.log(Array.from(data));
// console.log(min(data, (d) => d.petal_length));
// console.log(max(data, (d) => d.petal_length));
// console.log(
// extent(data, (d) => d.petal_length)
// );
// console.log(
// flatGroup(
// data,
// (d) => d.species
// )

Spotify Peak Position Transforming Data 2

flanagancarlie

Last edited Mar 06, 2023
Created on Feb 13, 2023

Uses the Spotify Top 10,000 Songs data set and calculates the number of songs each artist has eached the #1 spot with.

MIT Licensed