Slope Graph example

Charlie Park wrote an essay explaining Edward Tufte's Slope Graph idea. However, as he says, Canvas is not great for doing subtle hairlines.

Interested in the idea, I hacked this up using the lovely Raphaël library that generates SVG.

The code is on GitHub as slopegraph

, July 13th 2011

A generated example, based on Tufte's data

Current Receipts of Government as a Percentage of Gross Domestic Product, 1970 and 1979

country19701979
Sweden 46.957.4
Netherlands 44.055.8
Norway 43.552.2
Britain 40.739.0
France 39.043.4
Germany 37.542.9
Belgium 35.243.2
Canada 35.235.8
Finland 34.938.2
Italy 30.435.7
United States30.332.5
Greece 26.830.6
Switzerland 26.533.2
Spain 22.527.1
Japan 20.726.6
Created with Raphaël19701979Sweden 46.9Sweden 57.4Netherlands 44.0Netherlands 55.8Norway 43.5Norway 52.2Britain 40.7Britain 39.0France 39.0France 43.4Germany 37.5Germany 42.9Belgium 35.2Belgium 43.2Canada 35.2Canada 35.8Finland 34.9Finland 38.2Italy 30.4Italy 35.7United States30.3United States32.5Greece 26.8Greece 30.6Switzerland 26.5Switzerland 33.2Spain 22.5Spain 27.1Japan 20.7Japan 26.6

Tufte's original image from print, for comparison