Skip to main content
100%

ChatGPT

✓ Published0🌍 Public
BBart van Pelt
Last edited Jan 27, 2023
Created on Jan 27, 2023

This bar chart displays COVID-19 death counts by country, using rectangular bars sized proportionally to each nation’s reported deaths. The code loads data from `deaths.csv` via `d3.csv`, then uses D3’s selection methods (`selectAll`, `data`, `enter`) to append SVG `rect` elements and `text` labels. Bar heights are scaled against the maximum death value, with labels positioned at each bar’s base. The visualization reads a local CSV file and renders entirely as SVG, with styling defined in an inline HTML stylesheet.

AI-generated description

Javascript and tooling from https://www.youtube.com/watch?v=xkBheRZTkaw starting at 6:55 - 8:04

  • npm is company and package manager
  • npm is commandline tool
  • yarn is alternative for npm (package manager) using npm packages
  • rollup is module bundler. Alternatives webpack / parcel

package manager repository tool

module manager uses local packages

Guidelines (un)named exports

  • Default exports give other name to imports. This can be confusing.
  • Best practice always use named exports.
MIT Licensed

Similar vizzes