Skip to main content
100%

ICE6 - Bar Chart

✓ Published1🌍 Public
Nneffer77
Last edited Mar 10, 2023
Created on Mar 10, 2023
Forked from ICE5

This interactive bar chart compares direct N₂O emissions in 2020 across several countries, including China, India, the United States, and Germany. Built with React and D3 v5, it uses `d3.csv` to load data from a GitHub-hosted CSV file and `scaleBand` and `scaleLinear` to map countries to horizontal bars. The visualization renders as SVG elements, with red grid lines and axis labels generated from the scales’ tick values.

AI-generated description

Boilerplate code for a React + D3 visualization with:

  • CDN links for React, ReactDOM, and D3
  • Basic React boilerplate
  • Variables for dimensions and margins
  • A VizContainer component that:
    • Abstracts SVG/group container elements
    • Follows the margin convention
    • Show the margins, which can be easily removed by deleting the showMargins={true} prop
MIT Licensed

Similar vizzes