Skip to main content
100%

D3: Loading data from a CSV file

✓ Published0🌍 Public
GGerardoFurtado
Last edited Apr 3, 2018
Created on Apr 3, 2018

This example demonstrates how D3.js loads data from a CSV file and renders an interactive bar chart. It shows the “Deliciousness” ratings for different foods, with radio buttons to switch between two market groups (A and B). The visualization uses D3 v4’s `d3.csv` to parse the external `food.csv`, then updates the chart via a `redraw` function that recomputes the band and linear scales (`d3.scaleBand`, `d3.scaleLinear`). SVG rectangles are bound to the data, and axes are generated with `d3.axisBottom` and `d3.axisLeft`. The interaction relies on radio-button change events to filter the dataset and trigger transitions.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes