This example demonstrates how to use a heatmap to show time series data. The actual heatmap visualization is not difficult to generate---more time in this example is spent on preparing the data using d3.nest()
and on creating the color legend.
This data is not adjusted for changes in population, and this spans enough time that what we could really be seeing is a change in population and not a change in crime.
We might be able to fix that using these numbers:
But, this is not yet fixed in this example.
You can access the dataset for this example directly at:
https://data.sfgov.org/Public-Safety/Monthly-Property-Crime-2005-to-2015/k5vw-3yuz
The dataset is derived from the SFPD Incidents - from 1 January 2003 dataset available at data.sfgov.org.
forked from sjengle's block: SF Monthly Property Crime 2005 to 2015
https://d3js.org/d3.v4.min.js