Skip to main content
100%

Correlation matrix

✓ Published0🌍 Public
Sstanley.shen2003@gmail.com
Last edited Nov 23, 2023
Created on Sep 26, 2023

This visualization shows a correlation matrix for the Abalone dataset, displaying the relationships between eight physical measurements and age rings. The matrix uses colored rectangles, with a tomato-to-steelblue color scale via chroma-js, to represent correlation values between variable pairs. Built with React and D3 v4, the code uses `jz.arr.correlationMatrix` to compute correlations and `data2grid.grid` to structure the data. Hovering over a rectangle highlights the corresponding row and column labels while displaying the exact correlation coefficient in a tooltip.

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