Skip to main content
100%

Calendar View v4

✓ Published0🌍 Public
TThanaporn-sk
Last edited May 11, 2017
Created on Mar 9, 2017

A calendar view displays daily Dow Jones Industrial Average returns from 2010, with each day colored by the percent change between opening and closing prices. The visualization arranges days into a grid of weeks and months across multiple SVG charts, one per year, using a diverging RdYlGn color scale from Cynthia Brewer. The code loads CSV data via `d3.csv`, processes it with `d3.nest` and `rollup` to compute daily returns, and maps values through `d3.scaleQuantize` to eleven color classes. Layout uses `d3.timeDays`, `d3.timeMonths`, and custom path generation to delineate month boundaries.

AI-generated description

This example demonstrates loading of CSV data, which is then quantized into a diverging color scale. The values are visualized as colored cells per day. Days are arranged into columns by week, then grouped by month and years. Colors by Cynthia Brewer. Layout inspired by Rick Wicklin and Robert Allison. Dow Jones historical data copyright Yahoo! Finance or independent data provider; fair use for educational purposes.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4063318'>Calendar View</a>

forked from <a href='http://bl.ocks.org/enjalot/'>enjalot</a>'s block: <a href='http://bl.ocks.org/enjalot/5e6f5a72b9c3677d72cb14b70b7a4bf5'>Calendar View v4</a>

gpl-3.0 Licensed

Similar vizzes