Tests for edge cases with d3.geom.voronoi, mainly N=2.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing d3.js in Leaflet.js</title> | |
<link rel="stylesheet" href="leaflet.css"></link> | |
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js?2.10.0"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script> | |
<style type="text/css"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing d3.js in Leaflet.js</title> | |
<link rel="stylesheet" href="leaflet.css"></link> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script> | |
<style type="text/css"> | |
svg , g |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font: 14px sans-serif; | |
} | |
.axis path, .axis line { | |
fill: none; |
This map shows the graph distance of each county from the Pacific or Atlantic coast; it is a recreation of a map posted to /r/dataisbeautiful using TopoJSON. Coastal counties are dark blue, while counties nine or more counties away from the coast are light yellow. (I opted not to reuse the original’s cycling color scale.)
See also the underlying graph.
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.node { | |
font: 300 11px "Helvetica Neue", Helvetica, Arial, sans-serif; | |
fill: #282828 ; | |
} | |
.node:hover { |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Orbits 2</title> | |
<meta charset="utf-8" /> | |
</head> | |
<style> | |
#viz, svg { | |
width: 900px; | |
height: 900px; |
.DS_Store | |
build | |
node_modules |
An implementation in D3 of Figure 4-42 "Step chart showing change in postage rate" in "Visualize This" by Nathan Yau.
Both the tickFormat function used for the x axis and the function used to render the amounts use a directly executed JavaScript function. This function returns another JavaScript function and creates a closure on the first variable, allowing them to have a specific format for the first option in the dataset.
Issues:
- The tickmark for 2001 renders as '01 instead of 2001
height: 540 |