Skip to main content
Public

Share visualization

Loading preview…

02_Loading and Parsing Data for color

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

02_Loading and Parsing Data for color

0
AAbdul Salam Almadani
Last edited Sep 23, 2020
Created on Sep 9, 2020

This example demonstrates the size and structure of a CSV dataset containing CSS color keywords by displaying the file size, number of rows, and number of columns in a large text block. It uses D3 v5’s `d3.csv` method to load and parse the remote CSV file from MDN web docs, then formats the data with `d3.csvFormat` to calculate its size. The code also includes commented alternatives using `fetch`, `async`/`await`, and `d3.csvParse`, as well as a nested promise approach. The visualization simply presents these summary statistics as text.

AI-generated description

This dataset about "color data in CSS".


This dataset show that the list of accepted keywords has undergone many changes during the evolution of CSS:

  • CSS Level 1 only included 16 basic colors, called the VGA colors as they were taken from the set of displayable colors on VGA graphics cards.
  • CSS Level 2 added the orange keyword.
  • Although various colors not in the specification (mostly adapted from the X11 colors list) were supported by early browsers, it wasn't until SVG 1.0 and CSS Colors Level 3 that they were formally defined. They are called the extended color keywords, the X11 colors, or the SVG colors.
  • CSS Colors Level 4 added the rebeccapurple keyword to honor web pioneer Eric Meyer.

Comments

Sign in to join the discussion.

MIT Licensed