Dashing widget (and associated job) to display recent earthquakes location and intensity. The included job can be easily altered to display other geospatial data sources (location of recent signups, bus stops, tweets, etc) via google heatmaps.
rest-client - convenient http client for retrieving quake data
Add to dashing's gemfile:
To use this widget, copy
heatmap.scss into the
/widgets/heatmap directory. Put the
heatmap.rb file in your
You'll need to add the following line inside the header in the
dashboards/layouts.erb file. Replace the '<YOUR_KEY>' with the free google api key you get from following the instructions on this page
To include the widget in a dashboard, add the following snippet to the dashboard layout file:
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> <div data-id="heatmap" data-view="Heatmap" data-title="Recent Earthquakes"></div> </li>
Should you decide to use the heatmap widget for another source of data, you may find these configuration attributes helpful.
- data-zoom => [0-15], 0 is global and 15 is street level, default is 2
- data-center-lat and data-center-long => the map's centerpoint, default is centerish of US
- data-map-type => [HYBRID | ROADMAP | SATELLITE | TERRAIN], default is SATELLITE
The full options for google heatmaps cam be seen here and can be configured in the coffeescript.