Based on D3 Stacked Bar Chart by Mike Bostock https://bl.ocks.org/mbostock/3886208
Tooltip code based on D3 Stacked Bar Chart with Tooltips by Michael Stanaland http://bl.ocks.org/mstanaland/6100713
Based on D3 Stacked Bar Chart by Mike Bostock https://bl.ocks.org/mbostock/3886208
Tooltip code based on D3 Stacked Bar Chart with Tooltips by Michael Stanaland http://bl.ocks.org/mstanaland/6100713
Updated from D3js v3 Threshold Map by Mike Bostock http://bl.ocks.org/mbostock/3306362
city | rats | coffee | rats2 | coffee2 | |
---|---|---|---|---|---|
Somerville | 60 | 40 | 40 | 60 | |
Cambridge | 30 | 90 | 80 | 100 | |
Boston | 90 | 120 | 10 | 30 | |
Brookline | 40 | 50 | 60 | 30 | |
Chelsea | 10 | 10 | 100 | 120 |
<?php | |
/* | |
Get GeoJSON | |
Returns a GeoJSON from your table. | |
Based on: | |
https://github.com/bmcbride/PHP-Database-GeoJSON by Brian McBride | |
To be used with the Dirt-Simple PostGIS HTTP API: | |
https://github.com/tobinbradley/dirt-simple-postgis-http-api by @tobinbradley | |
*/ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet to CartoDB - Point Collection Tool Beta</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.draw/leaflet.draw.css" /> | |
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> | |
<style> |
<!doctype html> | |
<html> | |
<head> | |
<title>Color Starter - A Starter Palette</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script> | |
<script type="text/javascript"> | |
function draw(data) { | |
"use strict"; | |
var w=960, h=500; |