Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Fork of React & D3 Starter

Public visualization

Viewing a saved revision (read-only)

11fde2b98a384387af96acb216dbca7a

Fork of Fork of Fork of React & D3 Starter

0 stars1🌍 Public
Ppvvaishnavi93@gmail.com
Last edited Mar 4, 2026
Created on Mar 4, 2026

This bar chart displays the average calories for each fast-food restaurant, using a dataset of individual menu items with their nutritional information. The visualization is rendered as an SVG using the D3.js v7 library. The code loads the CSV data, groups it by restaurant, and computes the mean calorie value for each. It then applies `d3.scaleBand` for the categorical x-axis and `d3.scaleLinear` for the numeric y-axis, drawing bars via appended `rect` elements. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, and the x-axis labels are rotated for readability.

AI-generated description