Viewing a saved revision (read-only)
f813b58638a84138bff0d37412c960d6
Pseudo-Visualization NFL Passing
This pseudo-visualization maps 100 randomly generated data points across two statistical axes, colored by a categorical legend for Pro Bowl, No Award, and All Pro. Built with D3 v7, it uses `scaleLinear` for position scaling, `scaleOrdinal` for legend colors, and the `@curran/axis-labels` library for labeled axes. The `plot` function draws an inner rectangle, axes, and a legend, while a nested `mark` function renders scatterplot circles. The code demonstrates composable D3 modules and scales, though the data itself is synthetic random values rather than actual NFL passing statistics.
AI-generated descriptionA 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
transformandfill - 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).