Create a gist now

Instantly share code, notes, and snippets.

@emeeks /index.html
Last active Dec 15, 2015

What would you like to do?
Constrained Voronoi with Derived Areas
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
<style type="text/css">
circle {
stroke: #EFEDF5;
fill: #EFEDF5;
}
line {
stroke: #EFEDF5;
pointer-events: none
}
path{
stroke: black
}
</style>
</head>
<body>
<select id="colorSelect" onchange="setColor('menu')">
<option value="density">Density</option>
<option value="equity">Equity</option>
<option value="area">Area</option>
<option value="statecode">State</option>
<option value="green">Green</option>
<option value="unpaved">Unpaved</option>
</select>
<div id="chart">
</div>
<script type="text/javascript">
statesKey = {"AZ": 9,"CA": 9,"CO": 8,"DC": 3,"FL": 4,"GA": 4,"IL": 5,"MA": 1,"MI": 5,"NC": 4,"NM": 6,"NV": 9,"NY": 2,"OH": 5,"OR": 10,"PA": 3,"TN": 4,"TX": 6,"VA": 3,"WA": 10,"WI": 5};
w = 960,
h = 960,
links = [],
voronoiVertices = [],
color = d3.scale.quantize().domain([7000, 10000]).range(d3.range(2, 9));
var numVertices = 50;
// vertices = d3.range(numVertices).map(function(d) { return {x: d.x, y: d.y}; })
d3.json("neighborhoods.json", function(json) {
/* vertices = [{x: 0, y: 1, narea: 10}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 100}, {x: 100, y: 0, narea: 500}, {x: 0, y: 1, narea: 500}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 10}, {x: 100, y: 0, narea: 10},
{x: 0, y: 1, narea: 10}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 100}, {x: 100, y: 0, narea: 500}, {x: 0, y: 1, narea: 500}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 10}, {x: 100, y: 0, narea: 10},
{x: 0, y: 1, narea: 10}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 100}, {x: 100, y: 0, narea: 500}, {x: 0, y: 1, narea: 500}, {x: 100, y: 100, narea: 10}, {x: 0, y: 100, narea: 10}, {x: 100, y: 0, narea: 10}
]
*/
vertices = json;
sizeMin = d3.min(vertices, function (d) { return d["area"];});
sizeMax = d3.max(vertices, function (d) { return d["area"];});
sizeMed = (sizeMin + sizeMax ) / 2;
var prevEventScale = 1;
xMin = d3.min(vertices, function (d) { return d["x"];});
xMax = d3.max(vertices, function (d) { return d["x"];});
yMin = d3.min(vertices, function (d) { return d["y"];});
yMax = d3.max(vertices, function (d) { return d["y"];});
sizeRamp = d3.scale.linear().domain([sizeMin,sizeMed,sizeMax]).range([-50,-250,-1000]);
xRamp = d3.scale.linear().domain([xMin,xMax]).range([225,700]).clamp(true)
yRamp = d3.scale.linear().domain([yMin,yMax]).range([700,225]).clamp(true)
for ( n in vertices) {
vertices[n]["x"] = xRamp(vertices[n]["x"]);
vertices[n]["y"] = yRamp(vertices[n]["y"]);
vertices[n]["statecode"] = statesKey[vertices[n]["state"]];
}
/* var zoom = d3.behavior.zoom().on("zoom", function(d,i) {
if (d3.event.scale > prevEventScale) {
vertices.push(function(d) { return {x: d.x, y: d.y}; })
} else if (vertices.length > 2) {
vertices.pop();
}
force.nodes(vertices).start()
prevEventScale = d3.event.scale;
});
*/
var svg = d3.select("#chart")
.append("svg")
.attr("width", w)
.attr("height", h)
.attr("class", "Purples")
// .call(zoom)
circleClip = svg.append("svg:clipPath").attr("id", "clipper").append("circle").attr("cx", w / 2).attr("cy", h / 2).attr("r", 325);
force = self.force = d3.layout.force()
.charge(function (d, i) { return sizeRamp(vertices[i].area)})
.size([w, h])
.on("tick", update);
force.nodes(vertices).start();
circle = svg.selectAll("g.nodes");
path = svg.selectAll("path");
link = svg.selectAll("line");
})
function update(e) {
voronoiVertices = vertices.map(function(o){return [o.x, o.y, o]})
path = path.data(d3.geom.voronoi(voronoiVertices))
path.enter().append("path") //group all the path elements first so they have the lowest z-order
.attr("class", function(d, i) { return "q"+color(d3.geom.polygon(d).area())+"-9"; })
.attr("d", function(d) { return "M" + d.join("L") + "Z"; })
.attr("clip-path", "url(#clipper)")
.style("stroke", "white")
.style("stroke-width", 3)
path.attr("class", function(d, i) { return "q"+color(d3.geom.polygon(d).area())+"-9"; })
.attr("d", function(d) { return "M" + d.join("L") + "Z"; })
.attr("clip-path", "url(#clipper)")
path.exit().remove();
circle = circle.data(vertices)
circleEnter = circle.enter().append("g")
.call(force.drag)
.attr("class", "nodes")
.attr("r", 0)
.attr("transform", function (d) { return "translate("+d.x+","+d.y+")"});
// .attr("cy", function(d) { return d.y; })
circleEnter.append("circle")
.transition().duration(1000).attr("r", 5);
text1 = circleEnter.append("text")
.attr("opacity", 0)
.style("fill", "white")
.style("stroke", "white")
.style("stroke-width", "3")
.text(function (d,i) {return vertices[i].name})
.transition().duration(1000).attr("opacity", .75);
text2 = circleEnter.append("text")
.attr("opacity", 0)
.style("fill", "black")
.text(function (d,i) {return vertices[i].name})
.transition().duration(1000).attr("opacity", 1);
circle.attr("transform", function (d) { return "translate("+d.x+","+d.y+")"});
circle.exit().transition().attr("opacity", 0).remove();
links = []
d3.geom.delaunay(voronoiVertices).forEach(function(d) {
links.push(edge(d[0], d[1]));
links.push(edge(d[1], d[2]));
links.push(edge(d[2], d[0]));
});
link = link.data(links)
link.enter().append("line")
link.attr("x1", function(d) { return d.source[2].x; })
.attr("y1", function(d) { return d.source[2].y; })
.attr("x2", function(d) { return d.target[2].x; })
.attr("y2", function(d) { return d.target[2].y; })
.style("stroke", "none")
link.exit().remove()
circleClip.attr("r", function() { return d3.max(vertices, function (d) { return d["x"] - (w / 2) + (w / 20);}) } );
}
function edge(a, b) {
return {
source: a,
target: b
};
}
function setColor(inputString) {
if (inputString == "menu") {
inputString = document.getElementById("colorSelect").value;
}
colorMin = d3.min(vertices, function (d) { return d[inputString];});
colorMax = d3.max(vertices, function (d) { return d[inputString];});
colorMed = (colorMin + colorMax ) / 2;
// colorRamp = d3.scale.linear().domain([colorMin,colorMed,colorMax]).range(["blue","yellow","red"]);
colorRamp = d3.scale.linear().domain([1,100,400]).range(["green","yellow","purple"]);
path.style("fill", function(d, i) { return colorRamp(vertices[i][inputString])})
text1.text(function (d,i) {return vertices[i][inputString]})
text2.text(function (d,i) {return vertices[i][inputString]})
}
</script>
</body>
</html>
[{"state": "NM","city": "Albuquerque", "name": "Jade Park", "green": 178.31, "unpaved": 150.44, "equity": 0, "density": 4411.825, "area": 0.000059, "x": -106.573406480822, "y": 35.1675956099702},{"state": "NM","city": "Albuquerque", "name": "North Hills", "green": 332.81, "unpaved": 139.91, "equity": 0.076, "density": 5732.7, "area": 0.000014, "x": -106.567144678556, "y": 35.1692325499817},{"state": "GA","city": "Atlanta", "name": "Five Points", "green": 215.71, "unpaved": 199.98, "equity": 0, "density": 6888.816667, "area": 0.000120, "x": -84.385465384228, "y": 33.7563737151874},{"state": "IL","city": "Chicago", "name": "Archer Heights", "green": 239.07, "unpaved": 547.27, "equity": 0.348, "density": 11610.210526, "area": 0.000563, "x": -87.7263313156044, "y": 41.8107972447685},{"state": "IL","city": "Chicago", "name": "Bridgeport", "green": 239.8, "unpaved": 346.82, "equity": 0.015, "density": 16217.991837, "area": 0.000585, "x": -87.6486614217964, "y": 41.8361045075355},{"state": "IL","city": "Chicago", "name": "Brighton Park", "green": 236.06, "unpaved": 481.32, "equity": 0.393, "density": 20873.123256, "area": 0.000766, "x": -87.6988516466353, "y": 41.8173406178146},{"state": "IL","city": "Chicago", "name": "Gage Park", "green": 244.41, "unpaved": 384.46, "equity": 0.61, "density": 20898.885, "area": 0.000620, "x": -87.6962712128945, "y": 41.7953267360652},{"state": "IL","city": "Chicago", "name": "Hermosa", "green": 242.82, "unpaved": 353.93, "equity": 0.01, "density": 21960.58125, "area": 0.000329, "x": -87.7346592549289, "y": 41.9242546176081},{"state": "IL","city": "Chicago", "name": "Logan Square", "green": 203.26, "unpaved": 348.88, "equity": 0.031, "density": 25074.923656, "area": 0.000999, "x": -87.6993012469114, "y": 41.922720623487},{"state": "IL","city": "Chicago", "name": "Lower West Side", "green": 210.49, "unpaved": 267.35, "equity": 0.059, "density": 18677.606897, "area": 0.000828, "x": -87.6674408155398, "y": 41.8502928015622},{"state": "IL","city": "Chicago", "name": "Near North Side", "green": 242.11, "unpaved": 210.55, "equity": 0.106, "density": 29556.759677, "area": 0.000776, "x": -87.633348169987, "y": 41.8996121032495},{"state": "IL","city": "Chicago", "name": "South Lawndale", "green": 188.97, "unpaved": 304.36, "equity": 0.279, "density": 24669.617241, "area": 0.001284, "x": -87.7139746958142, "y": 41.8390189847862},{"state": "CO","city": "Denver", "name": "Baker", "green": 334.562, "unpaved": 164.65, "equity": 0.352, "density": 7171.47, "area": 0.000406, "x": -104.99622186268, "y": 39.7152273776428},{"state": "CO","city": "Denver", "name": "Capitol Hill", "green": 239.207, "unpaved": 114.91, "equity": 0.002, "density": 20299.568421, "area": 0.000184, "x": -104.980208711056, "y": 39.733654030677},{"state": "CO","city": "Denver", "name": "CBD", "green": 259.792, "unpaved": 137.5, "equity": 0, "density": 10145.311111, "area": 0.000117, "x": -104.993170760701, "y": 39.7451290005502},{"state": "CO","city": "Denver", "name": "Cole", "green": 178.788, "unpaved": 141.99, "equity": 0.018, "density": 9217.355556, "area": 0.000139, "x": -104.96621166265, "y": 39.7671919496971},{"state": "CO","city": "Denver", "name": "Elyria Swansea", "green": 321.114, "unpaved": 158.32, "equity": 0.36, "density": 3568.969231, "area": 0.000707, "x": -104.957567345871, "y": 39.782529006577},{"state": "CO","city": "Denver", "name": "Five Points", "green": 308.466, "unpaved": 188.39, "equity": 0.246, "density": 8745.933333, "area": 0.000481, "x": -104.98332338078, "y": 39.7590826101989},{"state": "CO","city": "Denver", "name": "Globeville", "green": 285.209, "unpaved": 139.07, "equity": 0.513, "density": 4095.290909, "area": 0.000561, "x": -104.986838210888, "y": 39.780553470417},{"state": "CO","city": "Denver", "name": "Lincoln Park", "green": 237.13, "unpaved": 153.83, "equity": 0.151, "density": 6997.57, "area": 0.000347, "x": -105.00486475429, "y": 39.7325463378095},{"state": "MI","city": "Detroit", "name": "Downtown", "green": 213.8, "unpaved": 206.55, "equity": 0.007, "density": 5658.44375, "area": 0.000349, "x": -83.0479311809308, "y": 42.3331543966093},{"state": "MI","city": "Detroit", "name": "Oakwood Heights", "green": 247.79, "unpaved": 182.93, "equity": 0.404, "density": 3683.69, "area": 0.000215, "x": -83.1554729868667, "y": 42.2874451212601},{"state": "TX","city": "El Paso", "name": "Alameda Business", "green": 337.71, "unpaved": 141.45, "equity": 0.306, "density": 7568.8, "area": 0.000086, "x": -106.452141613848, "y": 31.7738030707013},{"state": "TX","city": "El Paso", "name": "A Presidential Neighborhood", "green": 468.62, "unpaved": 132.14, "equity": 0.071, "density": 5003.2, "area": 0.000021, "x": -106.457986637011, "y": 31.773176367271},{"state": "NV","city": "Las Vegas", "name": "Charleston Heights", "green": 343.61, "unpaved": 222.56, "equity": 0.551, "density": 8017.73617, "area": 0.001139, "x": -115.232439232955, "y": 36.1696357732002},{"state": "NV","city": "Las Vegas", "name": "Downtown East", "green": 375.44, "unpaved": 143.89, "equity": 0.73, "density": 11393.052941, "area": 0.000272, "x": -115.109273099528, "y": 36.1631856346969},{"state": "NV","city": "Las Vegas", "name": "Huntridge", "green": 378.12, "unpaved": 243.22, "equity": 0.559, "density": 7251.474074, "area": 0.000641, "x": -115.13051684355, "y": 36.1508344924651},{"state": "NV","city": "Las Vegas", "name": "Michael Way", "green": 268.74, "unpaved": 131.86, "equity": 0.636, "density": 8710.304545, "area": 0.001271, "x": -115.226019645584, "y": 36.198794326284},{"state": "NV","city": "Las Vegas", "name": "Rancho Charleston", "green": 229.7, "unpaved": 170.29, "equity": 0.451, "density": 7047.487879, "area": 0.001503, "x": -115.188077802561, "y": 36.154400766166},{"state": "NV","city": "Las Vegas", "name": "Sunrise", "green": 259.53, "unpaved": 123.74, "equity": 0.47, "density": 9215.62, "area": 0.000539, "x": -115.071262939493, "y": 36.1737416271532},{"state": "CA","city": "Long Beach", "name": "Bixby Area", "green": 212.29, "unpaved": 151.7, "equity": 0, "density": 9901.688, "area": 0.000438, "x": -118.174448609751, "y": 33.8403520722534},{"state": "CA","city": "Long Beach", "name": "Circle Area", "green": 305.68, "unpaved": 229.37, "equity": 0, "density": 19557.592857, "area": 0.000496, "x": -118.147112861476, "y": 33.7915282082338},{"state": "CA","city": "Long Beach", "name": "Lakewood Village", "green": 262.89, "unpaved": 120.92, "equity": 0, "density": 7775.28, "area": 0.000256, "x": -118.133862273243, "y": 33.8397546659374},{"state": "CA","city": "Long Beach", "name": "North Long Beach", "green": 335.22, "unpaved": 228.91, "equity": 0, "density": 14358.080597, "area": 0.001631, "x": -118.177776792323, "y": 33.8641857729106},{"state": "CA","city": "Long Beach", "name": "North West Long Beach", "green": 302.05, "unpaved": 177.42, "equity": 0, "density": 10987.691667, "area": 0.000229, "x": -118.200565165054, "y": 33.873359097665},{"state": "CA","city": "Long Beach", "name": "Poly High District", "green": 338.31, "unpaved": 318.18, "equity": 0, "density": 23819.619355, "area": 0.000408, "x": -118.181196117069, "y": 33.7938237393816},{"state": "CA","city": "Long Beach", "name": "West Side", "green": 259.28, "unpaved": 223.21, "equity": 0, "density": 9693.693103, "area": 0.000613, "x": -118.214354099698, "y": 33.8039787444095},{"state": "CA","city": "Long Beach", "name": "Wrigley", "green": 431.87, "unpaved": 270.51, "equity": 0, "density": 18250.969767, "area": 0.000658, "x": -118.198133658227, "y": 33.8010320932043},{"state": "CA","city": "Los Angeles Study Area", "name": "Arleta", "green": 317.85, "unpaved": 125.26, "equity": 0.641992, "density": 10686.871875, "area": 0.000785, "x": -118.432075415734, "y": 34.2414160296821},{"state": "CA","city": "Los Angeles Study Area", "name": "Boyle Heights", "green": 354.94, "unpaved": 160.94, "equity": 0.387357, "density": 19324.693333, "area": 0.001648, "x": -118.208926999358, "y": 34.0386027081446},{"state": "CA","city": "Los Angeles Study Area", "name": "Central-Alameda", "green": 590.16, "unpaved": 322.51, "equity": 0.100405, "density": 19437.325581, "area": 0.000552, "x": -118.247751319866, "y": 34.0051929135462},{"state": "CA","city": "Los Angeles Study Area", "name": "Cypress Park", "green": 281.61, "unpaved": 155.21, "equity": 0.105596, "density": 11532.875, "area": 0.000183, "x": -118.224905397887, "y": 34.0909028520198},{"state": "CA","city": "Los Angeles Study Area", "name": "East Hollywood", "green": 555.38, "unpaved": 246.07, "equity": 0.858197, "density": 34163.269565, "area": 0.000602, "x": -118.297391681494, "y": 34.0887009705411},{"state": "CA","city": "Los Angeles Study Area", "name": "Elysian Valley", "green": 267.03, "unpaved": 115.43, "equity": 0.234168, "density": 7167.915385, "area": 0.000200, "x": -118.241711007575, "y": 34.0973280370171},{"state": "CA","city": "Los Angeles Study Area", "name": "Florence", "green": 565.43, "unpaved": 428.56, "equity": 1.03039, "density": 20117.774468, "area": 0.000707, "x": -118.26855190255, "y": 33.9745486327386},{"state": "CA","city": "Los Angeles Study Area", "name": "Gramercy Park", "green": 390.38, "unpaved": 365.23, "equity": 0.228981, "density": 12598.77, "area": 0.000286, "x": -118.30941912194, "y": 33.9511915664162},{"state": "CA","city": "Los Angeles Study Area", "name": "Green Meadows", "green": 415.64, "unpaved": 268.84, "equity": 0.567033, "density": 15628.1, "area": 0.000561, "x": -118.261889732465, "y": 33.941180134108},{"state": "CA","city": "Los Angeles Study Area", "name": "Harvard Park", "green": 473.98, "unpaved": 434.19, "equity": 0.367871, "density": 14821.252632, "area": 0.000162, "x": -118.304566467927, "y": 33.9837968613331},{"state": "CA","city": "Los Angeles Study Area", "name": "Highland Park", "green": 256.24, "unpaved": 115.56, "equity": 0.320364, "density": 14963.753571, "area": 0.000865, "x": -118.192785922752, "y": 34.1155561337189},{"state": "CA","city": "Los Angeles Study Area", "name": "Historic South-Central", "green": 479.5, "unpaved": 379.22, "equity": 0.38275, "density": 22411.653846, "area": 0.000646, "x": -118.267450682766, "y": 34.0170416487767},{"state": "CA","city": "Los Angeles Study Area", "name": "Hyde Park", "green": 562.97, "unpaved": 352.07, "equity": 0.473065, "density": 11966.343636, "area": 0.000729, "x": -118.329781832313, "y": 33.9861260461638},{"state": "CA","city": "Los Angeles Study Area", "name": "Koreatown", "green": 476.04, "unpaved": 245.81, "equity": 1.05496, "density": 46230.577465, "area": 0.000683, "x": -118.302420083493, "y": 34.0641453322464},{"state": "CA","city": "Los Angeles Study Area", "name": "Los Feliz", "green": 204.53, "unpaved": 112.62, "equity": 0.438808, "density": 17059.436111, "area": 0.000660, "x": -118.287835793289, "y": 34.10843971754},{"state": "CA","city": "Los Angeles Study Area", "name": "Marina del Rey", "green": 372.66, "unpaved": 134.28, "equity": 0.001075, "density": 11607.74, "area": 0.000368, "x": -118.448610165869, "y": 33.9764975876365},{"state": "CA","city": "Los Angeles Study Area", "name": "Mar Vista", "green": 240.75, "unpaved": 199.24, "equity": 0.669064, "density": 11989.577273, "area": 0.000732, "x": -118.435470871511, "y": 34.0093773322211},{"state": "CA","city": "Los Angeles Study Area", "name": "Mid-Wilshire", "green": 321.13, "unpaved": 295.57, "equity": 0.479419, "density": 14951.611538, "area": 0.000703, "x": -118.345330729167, "y": 34.0575517076971},{"state": "CA","city": "Los Angeles Study Area", "name": "Panorama City", "green": 524.18, "unpaved": 125.05, "equity": 0.469174, "density": 17379.274419, "area": 0.000924, "x": -118.445325590873, "y": 34.2243669825402},{"state": "CA","city": "Los Angeles Study Area", "name": "Playa Vista", "green": 257.63, "unpaved": 167.93, "equity": 0.768829, "density": 6672.538462, "area": 0.000328, "x": -118.414942132187, "y": 33.9787379873429},{"state": "CA","city": "Los Angeles Study Area", "name": "Rancho Park", "green": 197.77, "unpaved": 149.92, "equity": 0.689364, "density": 7368.963636, "area": 0.000151, "x": -118.425988899336, "y": 34.0343252534171},{"state": "CA","city": "Los Angeles Study Area", "name": "Sawtelle", "green": 343.09, "unpaved": 208.36, "equity": 0.532611, "density": 15160.732609, "area": 0.000680, "x": -118.449208294917, "y": 34.0361379912853},{"state": "CA","city": "Los Angeles Study Area", "name": "University Park", "green": 244.75, "unpaved": 189.4, "equity": 0.19003, "density": 18589.038095, "area": 0.000295, "x": -118.283438012566, "y": 34.0282121411966},{"state": "CA","city": "Los Angeles Study Area", "name": "Valley Glen", "green": 346.26, "unpaved": 118.18, "equity": 0.48492, "density": 14685.796078, "area": 0.001217, "x": -118.418506537625, "y": 34.1864081219169},{"state": "CA","city": "Los Angeles Study Area", "name": "Vermont-Slauson", "green": 574.27, "unpaved": 459.81, "equity": 0.756711, "density": 19999.127586, "area": 0.000364, "x": -118.290419557596, "y": 33.9838688698625},{"state": "CA","city": "Los Angeles Study Area", "name": "Vermont Square", "green": 566.44, "unpaved": 553.38, "equity": 0.521779, "density": 19736.4, "area": 0.000643, "x": -118.298998160563, "y": 34.001981071922},{"state": "CA","city": "Los Angeles Study Area", "name": "Watts", "green": 304.32, "unpaved": 238.53, "equity": 0.068745, "density": 16805.028205, "area": 0.000536, "x": -118.24077212112, "y": 33.939841585636},{"state": "CA","city": "Los Angeles Study Area", "name": "West Adams", "green": 610.95, "unpaved": 456.25, "equity": 0.574442, "density": 14089.863636, "area": 0.000375, "x": -118.352783431523, "y": 34.0294435616572},{"state": "CA","city": "Los Angeles Study Area", "name": "Westchester", "green": 358.07, "unpaved": 172.78, "equity": 0.895932, "density": 8732.284286, "area": 0.002730, "x": -118.400379389739, "y": 33.9533863519426},{"state": "CA","city": "Los Angeles Study Area", "name": "Westlake", "green": 451.71, "unpaved": 179.64, "equity": 0.456344, "density": 45201.789231, "area": 0.000687, "x": -118.273903915978, "y": 34.0620041350221},{"state": "NY","city": "New York", "name": "Astoria-Long Island City", "green": 378.55, "unpaved": 368.62, "equity": 0.014, "density": 59795.184314, "area": 0.000835, "x": -73.926686408679, "y": 40.7624514450141},{"state": "NY","city": "New York", "name": "Bay Ridge", "green": 196.87, "unpaved": 349.88, "equity": 0.003, "density": 50179.492, "area": 0.000560, "x": -74.0303514485168, "y": 40.6268593487575},{"state": "NY","city": "New York", "name": "Bedford-Stuyvesant", "green": 255.21, "unpaved": 268.24, "equity": 0.003, "density": 58033.600813, "area": 0.001149, "x": -73.9338012764959, "y": 40.6821686188823},{"state": "NY","city": "New York", "name": "Boerum Hill", "green": 261.39, "unpaved": 241.16, "equity": 0, "density": 52310.342424, "area": 0.000119, "x": -73.9858196524706, "y": 40.6846333229374},{"state": "NY","city": "New York", "name": "Borough Park", "green": 379.59, "unpaved": 491.14, "equity": 0.018, "density": 60507.285821, "area": 0.000712, "x": -73.9875550629689, "y": 40.6353013936506},{"state": "NY","city": "New York", "name": "Brownsville", "green": 254.11, "unpaved": 284.39, "equity": 0.001, "density": 44403.258621, "area": 0.000758, "x": -73.9121954717611, "y": 40.6547370475156},{"state": "NY","city": "New York", "name": "Carroll Gardens", "green": 362.94, "unpaved": 293.59, "equity": 0, "density": 46758.645833, "area": 0.000234, "x": -73.9935297241237, "y": 40.6759763624193},{"state": "NY","city": "New York", "name": "Clinton", "green": 709.67, "unpaved": 139.67, "equity": 0.028, "density": 83557.757895, "area": 0.000166, "x": -73.9963710440671, "y": 40.7599121208179},{"state": "NY","city": "New York", "name": "Cobble Hill", "green": 334.92, "unpaved": 317.18, "equity": 0.019, "density": 51332.3, "area": 0.000087, "x": -73.9998272745102, "y": 40.6883076210564},{"state": "NY","city": "New York", "name": "Fordham", "green": 240.8, "unpaved": 213.35, "equity": 0.006, "density": 100620.441304, "area": 0.000228, "x": -73.8908879024626, "y": 40.8606362775536},{"state": "NY","city": "New York", "name": "Greenwich Village", "green": 293.26, "unpaved": 165.79, "equity": 0, "density": 100674.580488, "area": 0.000142, "x": -73.9964215446787, "y": 40.7318639638778},{"state": "NY","city": "New York", "name": "Hunts Point", "green": 269.86, "unpaved": 189.14, "equity": 0.307, "density": 54655.552632, "area": 0.000485, "x": -73.8852116888877, "y": 40.8117450428593},{"state": "NY","city": "New York", "name": "Jackson Heights", "green": 467.49, "unpaved": 276.83, "equity": 0.063, "density": 81055.161616, "area": 0.000683, "x": -73.8798520892826, "y": 40.7586872926457},{"state": "NY","city": "New York", "name": "Mapleton-Flatlands", "green": 219.77, "unpaved": 370.38, "equity": 0.038, "density": 51708.75404, "area": 0.001299, "x": -73.9569721311504, "y": 40.6255607253662},{"state": "NY","city": "New York", "name": "Parkchester", "green": 212.31, "unpaved": 180.26, "equity": 0, "density": 48571.241379, "area": 0.000545, "x": -73.8502577450671, "y": 40.8440601331684},{"state": "NY","city": "New York", "name": "Queensboro Hill", "green": 195.24, "unpaved": 184.84, "equity": 0.394, "density": 42993.520833, "area": 0.000634, "x": -73.8099024031597, "y": 40.7665858047923},{"state": "NY","city": "New York", "name": "Queens Village", "green": 184.01, "unpaved": 303.87, "equity": 0.011, "density": 22122.180263, "area": 0.000793, "x": -73.7402986557933, "y": 40.7102560697149},{"state": "NY","city": "New York", "name": "Ridgewood", "green": 311.84, "unpaved": 253.2, "equity": 0.159, "density": 58542.286585, "area": 0.000591, "x": -73.9014923895287, "y": 40.7089207254027},{"state": "NY","city": "New York", "name": "Sunny Side", "green": 378.89, "unpaved": 182.78, "equity": 0.336, "density": 61428.385454, "area": 0.000832, "x": -73.9348978435039, "y": 40.7427856570396},{"state": "NY","city": "New York", "name": "Sunset Park", "green": 464.98, "unpaved": 336.75, "equity": 0.075, "density": 75821.339535, "area": 0.000609, "x": -74.0136633962671, "y": 40.6458396114773},{"state": "NY","city": "New York", "name": "Upper East Side", "green": 347.06, "unpaved": 109.99, "equity": 0, "density": 120362.648958, "area": 0.000448, "x": -73.9567242088279, "y": 40.771927924549},{"state": "NY","city": "New York", "name": "Wakefield-Williamsbridge", "green": 230.05, "unpaved": 231.1, "equity": 0.06, "density": 39408.870297, "area": 0.000740, "x": -73.8518740444507, "y": 40.8899197303959},{"state": "NY","city": "New York", "name": "Williamsburg", "green": 323.73, "unpaved": 278.26, "equity": 0.065, "density": 63763.738931, "area": 0.000811, "x": -73.954652965041, "y": 40.7065105950749},{"state": "NY","city": "New York", "name": "Woodside", "green": 243.54, "unpaved": 199.88, "equity": 0.123, "density": 61329.053333, "area": 0.000390, "x": -73.9040456545408, "y": 40.7491214563438},{"state": "PA","city": "Philadelphia", "name": "Girard Estates", "green": 224.04, "unpaved": 277.85, "equity": 0.257, "density": 29335.993103, "area": 0.000256, "x": -75.1803039116668, "y": 39.9195431500292},{"state": "PA","city": "Philadelphia", "name": "Pennsport-Whitman-Queen", "green": 203.28, "unpaved": 165.8, "equity": 0.493, "density": 27815.818919, "area": 0.000659, "x": -75.1444108442644, "y": 39.9201361550397},{"state": "PA","city": "Philadelphia", "name": "Point Breeze", "green": 212.71, "unpaved": 445.69, "equity": 0.062, "density": 30676.065385, "area": 0.000222, "x": -75.1780798052084, "y": 39.9337653877439},{"state": "PA","city": "Philadelphia", "name": "Schuylkill Southwest", "green": 199.44, "unpaved": 230.54, "equity": 0.056, "density": 21966.545714, "area": 0.000158, "x": -75.1788935300806, "y": 39.9420185866153},{"state": "PA","city": "Philadelphia", "name": "South Philadelphia", "green": 291.25, "unpaved": 379.27, "equity": 0.15, "density": 31128.073077, "area": 0.000194, "x": -75.1639525226419, "y": 39.9184613292474},{"state": "PA","city": "Philadelphia", "name": "Wharton-Hawthorne-Bella Vista", "green": 271.63, "unpaved": 410.64, "equity": 0.029, "density": 30505.3375, "area": 0.000230, "x": -75.1605062518599, "y": 39.9341472480647},{"state": "OR","city": "Portland", "name": "Arbor Lodge", "green": 175.63, "unpaved": 309.05, "equity": 0.131, "density": 7022.938889, "area": 0.000260, "x": -122.690816544995, "y": 45.572169479229},{"state": "OR","city": "Portland", "name": "Buckman", "green": 232.28, "unpaved": 239.91, "equity": 0.017, "density": 9352.073333, "area": 0.000344, "x": -122.65306250973, "y": 45.5173406952722},{"state": "OR","city": "Portland", "name": "Concordia", "green": 197.83, "unpaved": 252.27, "equity": 0.238, "density": 7022.5875, "area": 0.000399, "x": -122.632671697714, "y": 45.5654546574479},{"state": "OR","city": "Portland", "name": "Eliot", "green": 188.26, "unpaved": 208.77, "equity": 0.229, "density": 7024.05, "area": 0.000258, "x": -122.668353412551, "y": 45.5403529309022},{"state": "OR","city": "Portland", "name": "Hosford", "green": 259.72, "unpaved": 237.7, "equity": 0.007, "density": 7569.21875, "area": 0.000408, "x": -122.650403283849, "y": 45.5059654018006},{"state": "OR","city": "Portland", "name": "Mount Scott", "green": 177.97, "unpaved": 226.31, "equity": 0.116, "density": 8633.65, "area": 0.000258, "x": -122.591799900551, "y": 45.4816447429387},{"state": "OR","city": "Portland", "name": "Northwest", "green": 360.46, "unpaved": 208.11, "equity": 0.482, "density": 10425.081818, "area": 0.001501, "x": -122.715722382363, "y": 45.5469108683321},{"state": "OR","city": "Portland", "name": "Overlook", "green": 201.72, "unpaved": 189.04, "equity": 0.522, "density": 6247.980952, "area": 0.000764, "x": -122.69616376171, "y": 45.5591243467472},{"state": "OR","city": "Portland", "name": "Pearl District", "green": 263.76, "unpaved": 397.66, "equity": 0.037, "density": 9726.516667, "area": 0.000130, "x": -122.681586057954, "y": 45.5297802284117},{"state": "CA","city": "San Diego", "name": "East Village", "green": 324.31, "unpaved": 227.98, "equity": 0.195, "density": 12022.594118, "area": 0.000304, "x": -117.15285360636, "y": 32.7081121708447},{"state": "CA","city": "San Diego", "name": "Gaslamp Quarter", "green": 398.58, "unpaved": 120.37, "equity": 0, "density": 19046.542857, "area": 0.000019, "x": -117.160378042763, "y": 32.7113711040542},{"state": "CA","city": "San Diego", "name": "Grant Hill", "green": 187.258, "unpaved": 186.77, "equity": 0.056, "density": 16232.275, "area": 0.000219, "x": -117.132623181927, "y": 32.7105685277624},{"state": "CA","city": "San Diego", "name": "Kearny Mesa", "green": 380.506, "unpaved": 112.49, "equity": 0.906, "density": 4804.455556, "area": 0.001456, "x": -117.141678350961, "y": 32.8261392280866},{"state": "CA","city": "San Diego", "name": "Lincoln Park", "green": 208.742, "unpaved": 219.13, "equity": 0.383, "density": 11249.409091, "area": 0.000124, "x": -117.09030918069, "y": 32.6978851018309},{"state": "CA","city": "San Diego", "name": "Memorial", "green": 291.482, "unpaved": 285.19, "equity": 0.087, "density": 14778.248, "area": 0.000250, "x": -117.13142288524, "y": 32.7012629544608},{"state": "CA","city": "San Diego", "name": "Midtown District", "green": 259.89, "unpaved": 222.28, "equity": 0.733, "density": 6372.336842, "area": 0.000985, "x": -117.203159330831, "y": 32.7364542360824},{"state": "CA","city": "San Diego", "name": "Mountain View", "green": 178.87, "unpaved": 177.91, "equity": 0.43, "density": 12469.511765, "area": 0.000212, "x": -117.107107847144, "y": 32.6976405065755},{"state": "CA","city": "San Diego", "name": "Normal Heights", "green": 255.524, "unpaved": 145.38, "equity": 0.153, "density": 14505.775, "area": 0.000369, "x": -117.119380062038, "y": 32.7658830308193},{"state": "CA","city": "San Diego", "name": "Talmadge", "green": 216.922, "unpaved": 119.26, "equity": 0.325, "density": 12541.584615, "area": 0.000225, "x": -117.091349037742, "y": 32.7625985050824},{"state": "CA","city": "San Francisco", "name": "Mission", "green": 445.22, "unpaved": 405.37, "equity": 0.01, "density": 39994.421739, "area": 0.000448, "x": -122.415345540238, "y": 37.7588736440625},{"state": "CA","city": "San Francisco", "name": "Nob Hill", "green": 335.41, "unpaved": 217.61, "equity": 0, "density": 69260.523809, "area": 0.000098, "x": -122.416004502313, "y": 37.7930429323395},{"state": "CA","city": "San Francisco", "name": "Ocean View", "green": 248.41, "unpaved": 169.18, "equity": 0.06, "density": 20557.106452, "area": 0.000350, "x": -122.462223568493, "y": 37.7177987191459},{"state": "CA","city": "San Francisco", "name": "Outer Mission", "green": 208.33, "unpaved": 191.1, "equity": 0.095, "density": 24114.891892, "area": 0.000360, "x": -122.443907708463, "y": 37.7239019554037},{"state": "CA","city": "San Francisco", "name": "Outer Richmond", "green": 308.47, "unpaved": 278.61, "equity": 0, "density": 23958.623684, "area": 0.000374, "x": -122.492835550455, "y": 37.7779885144861},{"state": "CA","city": "San Francisco", "name": "Potrero Hill", "green": 372.88, "unpaved": 163.18, "equity": 0.074, "density": 11128.38, "area": 0.000381, "x": -122.392988071797, "y": 37.7582710711791},{"state": "CA","city": "San Francisco", "name": "South Of Market", "green": 365.07, "unpaved": 291.35, "equity": 0.073, "density": 17988.53913, "area": 0.000581, "x": -122.399422849731, "y": 37.7764407605431},{"state": "CA","city": "San Jose", "name": "Fairgrounds", "green": 204.05, "unpaved": 163.82, "equity": 0.53, "density": 13640.7, "area": 0.001896, "x": -121.858911593838, "y": 37.3019088454648},{"state": "WA","city": "Seattle", "name": "Ballard", "green": 290.71, "unpaved": 284.68, "equity": 0.064, "density": 11085.669565, "area": 0.000462, "x": -122.375239206595, "y": 47.6684288389499},{"state": "WA","city": "Seattle", "name": "Belltown", "green": 332.13, "unpaved": 322.09, "equity": 0, "density": 25429.055556, "area": 0.000089, "x": -122.348156276776, "y": 47.6150898900233},{"state": "WA","city": "Seattle", "name": "Downtown", "green": 354.07, "unpaved": 186.68, "equity": 0.071, "density": 23976.375, "area": 0.000283, "x": -122.337215036753, "y": 47.608110714308},{"state": "WA","city": "Seattle", "name": "Eastlake", "green": 275.36, "unpaved": 125.5, "equity": 0.001, "density": 9791.577778, "area": 0.000143, "x": -122.327256190918, "y": 47.6372039553044},{"state": "WA","city": "Seattle", "name": "First Hill", "green": 192.53, "unpaved": 180.33, "equity": 0, "density": 28164.214286, "area": 0.000133, "x": -122.323562954904, "y": 47.608911834133},{"state": "WA","city": "Seattle", "name": "Greenwood", "green": 190.04, "unpaved": 275.17, "equity": 0.123, "density": 10170.633333, "area": 0.000466, "x": -122.355228080236, "y": 47.6941068070416},{"state": "WA","city": "Seattle", "name": "Industrial District", "green": 605.55, "unpaved": 330.37, "equity": 0.859, "density": 2559.227273, "area": 0.001438, "x": -122.340712453651, "y": 47.5727091311248},{"state": "WA","city": "Seattle", "name": "International District", "green": 189.65, "unpaved": 220.28, "equity": 0.019, "density": 17579.306667, "area": 0.000155, "x": -122.320794748043, "y": 47.5976347818742},{"state": "WA","city": "Seattle", "name": "Loyal Heights", "green": 243.59, "unpaved": 266.8, "equity": 0.002, "density": 10233.158824, "area": 0.000237, "x": -122.384900245285, "y": 47.683238943907},{"state": "WA","city": "Seattle", "name": "South Lake Union", "green": 232.35, "unpaved": 227.41, "equity": 0, "density": 14765.927273, "area": 0.000120, "x": -122.33738987442, "y": 47.6217014244904},{"state": "WA","city": "Seattle", "name": "Whittier Heights", "green": 181.49, "unpaved": 244.46, "equity": 0.022, "density": 10478.685714, "area": 0.000156, "x": -122.371404129791, "y": 47.6833121872227},{"state": "DC","city": "Washington", "name": "Dupont Circle", "green": 218.06, "unpaved": 327.55, "equity": 0, "density": 25657.6, "area": 0.000124, "x": -77.0426051211776, "y": 38.9104472905715},{"state": "DC","city": "Washington", "name": "Mount Vernon Square", "green": 178.15, "unpaved": 364.93, "equity": 0, "density": 25421.677778, "area": 0.000061, "x": -77.0198121050669, "y": 38.903115318619},{"state": "DC","city": "Washington", "name": "U Street Corridor", "green": 186.04, "unpaved": 244.18, "equity": 0, "density": 35327.109091, "area": 0.000081, "x": -77.0309370045793, "y": 38.9168629663587}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment