A gem to generate heatmaps.
require 'heatmap'
heatmap = Heatmap::Map.new
heatmap.points << Heatmap::Point.new(0, 0, 0.1)
heatmap.points << Heatmap::Point.new(80, 5, 0.3)
heatmap.points << Heatmap::Point.new(10, 5, 0.2)
heatmap.points << Heatmap::Point.new(23, 5, 0.8)
heatmap.points << Heatmap::Point.new(50, 50, 0.9)
heatmap.points << Heatmap::Point.new(20, 10, 0.9)
heatmap.points << Heatmap::Point.new(100, 85, 1.0)
heatmap.points << Heatmap::Point.new(100, 60, 1.0)
heatmap.points << Heatmap::Point.new(90, 90, 1.0)
heatmap.points << Heatmap::Point.new(90, 30, 0.8)
heatmap.points << Heatmap::Point.new(90, 45, 0.9)
heatmap.output("output.png")
$ git clone git@github.com:hyfen/heatmap.git
$ cd heatmap
$ rake build
$ gem install pkg/heatmap-0.0.2.gem
In IRB:
require 'heatmap'
heatmap = Heatmap::Map.new
- gheat (gradient and dot files in examples/ come from here)
- Ruby implementation of GMercatorProject comes from this gist
- customizability
- generate tiles useful for Google Map mashups