From charlesreid1

Notes

Outline:

  • Start with original example: https://bl.ocks.org/mbostock/4063318
  • How to go about implementing this ourselves?
  • Basically two components:
  • Format for the data
  • Colormap for the calendar

Lay out these two steps, focusing on these two steps only (ignore rest of code)

  • This script visualizes days of the year
  • Look at the data provided - what format is it in?
  • How are missing values handled - do we need one date for every day of the year? (No)
  • Colormap is simple - hard-coded values
  • Colormap tools - how to use colorbrewer or Python matplotlib to create custom color maps

How the entire visualization is organized:

  • Colormaps
  • Canvas data are years, linked to shapes
  • Write text for years
  • Draw a blank tile representing day of the year (use built-in date manipulation to determine which week the date is in, which gives you x, and the day of the week, which gives you y)
  • Draw outlines of months (probably the most complicated part of this visualization)
  • Load the data and create colored tiles from the data

Other

Original example: https://bl.ocks.org/mbostock/4063318

Flags