Skip to main content
Public

Share visualization

Loading preview…

Heatmap with p5.js

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Heatmap with p5.js

3
OOlha
Last edited Dec 5, 2022
Created on Feb 8, 2022
Forked from HTML Starter

This heatmap visualizes abortion rates per 1,000 women for eight U.S. states over 16 years, using a green color scale where darker shades represent lower rates and lighter shades indicate higher rates. It is rendered with p5.js through a React-based VizHub setup, loading CSV data from a GitHub gist. The code iterates through table rows, positioning colored squares in a grid while labeling state abbreviations and years along the axes. A supplemental legend explains the rate categories from below 10 to above 40.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter. My dataset was not appropriate for the heatmap, so I found this one https://www.kaggle.com/yamqwe/pregnancy-birth-abortion-rates-in-the-united-stae/version/2 and I took only 8 states to make it readable.

Comments

Sign in to join the discussion.

MIT Licensed