Skip to main content
100%

Fork of Marks and Channels

✓ Published0🌍 Public
Ppbruss@bu.edu
Last edited Sep 24, 2024
Created on Sep 23, 2024
Forked from Marks and Channels

This fork of Marks and Channels demonstrates fundamental D3 visualization concepts by plotting a small dataset of seven countries according to their personal freedom and capital scores. The visualization uses circles as point marks, with horizontal and vertical positions encoding the two metrics, while circle radius encodes the average of both scores and color distinguishes countries using `d3.scaleOrdinal` with `d3.schemeCategory10`. The implementation shows a bubble chart built with SVG circle elements, `d3.axisBottom` and `d3.axisLeft` for axes, and linear scales for positioning. Country labels are placed inside each circle using SVG text elements. The code illustrates scaling factors, SVG attributes `transform` and `fill`, and D3 color schemes.

AI-generated description

A demonstration of basic D3 usage to implement the concept of Marks and Channels. Includes usage of:

  • Point Marks by X, Y, Size
  • Line mark varying in length
  • Scaling factors
  • SVG Rectangles
  • selection.each()
  • SVG Path Elements
  • d3.symbol()
  • SVG attributes transform and fill
  • D3 Color Schemes
  • JavaScript Modules

Part of the Constructing Visualizations Playlist.

See also blocks.roadtolarissa.com: Marks and Channels (a vanilla JavaScript version of this).

MIT Licensed

Similar vizzes