Skip to content

Instantly share code, notes, and snippets.

@curran
Last active December 12, 2015 23:09
Show Gist options
  • Save curran/510b528b8ed8bed0b5d2 to your computer and use it in GitHub Desktop.
Save curran/510b528b8ed8bed0b5d2 to your computer and use it in GitHub Desktop.
fresh block
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<link href="http://d3-geomap.github.io/d3-geomap/css/d3.geomap.css" rel="stylesheet">
<script src="http://d3-geomap.github.io/d3-geomap/vendor/d3.geomap.dependencies.min.js"></script>
<script src="http://d3-geomap.github.io/d3-geomap/js/d3.geomap.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
svg { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = d3.geomap.choropleth()
.geofile('USA.json')
.projection(d3.geo.albersUsa)
.column('2012')
.unitId('fips')
.scale(600)
.legend(true);
d3.csv('venture-capital.csv', function(error, data) {
d3.select('#map')
.datum(data)
.call(map.draw, map);
});
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
State 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 fips
0 Alabama 0.77 0.59 2.3 0.67 0.46 0.23 0.27 0.13 0.12 0.19 0.14 0.26 0.0 0.02 0.13 US01
1 Alaska 0.0 0.0 0.14 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 US02
2 Arizona 1.51 2.14 0.21 1.16 1.11 0.39 0.51 0.06 1.1 0.78 0.8 0.44 0.34 0.89 0.83 US04
3 Arkansas 0.11 0.39 9.15 0.15 0.13 0.01 0.04 1.39 0.42 0.0 0.0 0.0 0.05 0.0 0.05 US05
4 California 7.14 19.14 32.61 12.46 6.87 5.86 5.95 6.52 6.99 7.88 7.51 5.06 5.95 7.92 7.08 US06
5 Colorado 5.11 11.23 24.21 6.98 2.88 3.27 2.2 2.96 2.79 2.51 3.22 1.93 1.84 2.31 2.13 US08
6 Connecticut 2.6 6.19 9.23 3.19 1.08 1.22 1.47 1.03 1.18 1.34 0.58 0.72 0.9 0.69 0.69 US09
7 Delaware 0.0 0.45 3.32 3.77 0.44 0.01 0.04 0.13 0.0 0.11 1.08 0.28 0.49 0.4 0.14 US10
8 District of Columbia 0.91 5.11 8.21 2.55 0.3 0.78 0.94 0.34 1.33 0.98 0.32 0.49 0.93 0.43 0.58 US11
9 Florida 1.31 3.79 5.58 1.77 0.77 0.54 0.42 0.48 0.43 1.01 0.32 0.4 0.26 0.45 0.26 US12
10 Georgia 1.69 4.16 7.91 3.06 1.8 0.91 1.71 0.7 0.94 1.19 1.05 0.77 0.83 0.92 0.6 US13
11 Hawaii 0.11 0.33 4.9 0.89 0.1 0.27 0.49 0.21 0.28 0.08 0.11 0.11 0.16 0.01 0.01 US15
12 Idaho 1.02 0.5 0.54 0.07 0.28 1.32 0.06 0.16 0.0 0.3 0.22 0.26 0.14 0.09 0.26 US16
13 Illinois 1.0 3.16 4.97 1.97 0.62 0.73 0.5 0.49 0.68 0.81 0.7 0.36 0.9 1.15 0.82 US17
14 Indiana 0.22 0.25 1.36 0.27 0.19 0.11 0.28 0.43 0.28 0.32 0.47 0.62 0.25 0.63 0.28 US18
15 Iowa 0.1 0.16 0.33 0.06 0.02 0.0 0.09 0.27 0.0 0.05 0.3 0.62 0.37 0.19 0.03 US19
16 Kansas 0.13 0.37 3.09 0.45 0.08 0.26 0.38 0.02 0.1 0.68 0.37 0.07 0.33 0.42 0.34 US20
17 Kentucky 0.35 0.72 1.78 0.2 0.11 0.04 0.41 0.23 0.24 0.35 0.19 0.09 0.07 0.08 0.14 US21
18 Louisiana 0.56 2.36 0.86 0.58 0.14 0.01 0.02 0.02 0.06 0.08 0.04 0.05 0.08 0.09 0.05 US22
19 Maine 1.92 1.68 3.85 0.1 0.39 0.02 0.59 0.1 0.17 0.1 0.41 0.16 0.04 0.74 0.24 US23
20 Maryland 2.03 3.8 9.95 5.12 3.08 1.61 2.21 1.98 2.53 2.26 1.7 1.03 1.21 1.03 0.89 US24
21 Massachusetts 8.52 19.71 37.77 16.91 8.77 9.22 8.94 7.99 8.52 10.54 8.22 5.75 6.3 7.9 7.74 US25
22 Michigan 0.41 0.77 1.0 0.46 0.31 0.22 0.4 0.22 0.27 0.27 0.67 0.38 0.41 0.22 0.59 US26
23 Minnesota 2.2 3.68 5.5 2.47 2.0 1.1 1.55 1.02 1.32 1.93 1.87 1.03 0.52 0.98 0.86 US27
24 Mississippi 0.06 3.7 0.3 0.44 0.07 0.01 0.04 0.12 0.11 0.06 0.0 0.0 0.0 0.01 0.1 US28
25 Missouri 3.71 0.97 3.26 1.34 0.4 0.39 0.3 0.26 0.28 0.39 0.36 0.08 0.25 0.54 0.08 US29
26 Montana 0.0 0.79 0.77 1.08 0.0 0.0 0.01 0.91 0.0 0.11 0.44 0.41 0.05 0.08 0.15 US30
27 Nebraska 0.56 1.06 2.5 0.99 0.21 3.08 0.0 0.18 0.08 0.0 0.19 0.0 0.13 0.0 0.11 US31
28 Nevada 0.38 0.33 0.41 0.36 0.38 0.45 0.09 1.38 0.15 0.22 0.1 0.13 0.23 0.08 0.05 US32
29 New Hampshire 4.78 5.81 17.0 5.04 4.45 3.16 2.84 1.72 1.35 2.34 3.1 0.64 0.93 0.88 0.94 US33
30 New Jersey 1.53 2.82 9.4 4.14 2.4 2.26 1.75 2.06 1.72 1.34 1.47 1.16 0.93 0.98 0.87 US34
31 New Mexico 0.17 0.25 0.42 0.27 1.0 0.06 0.44 1.13 0.42 1.73 0.9 0.07 0.3 0.82 0.45 US35
32 New York 1.89 4.72 8.88 2.6 0.97 0.78 0.81 1.17 1.25 1.05 1.2 0.86 1.18 2.0 1.55 US36
33 North Carolina 1.35 3.0 6.48 2.02 1.86 1.24 1.02 1.11 1.35 1.38 1.13 0.65 1.07 0.7 0.43 US37
34 North Dakota 0.03 0.17 0.33 0.05 0.0 0.65 0.09 0.0 0.0 0.0 0.01 0.28 0.0 0.1 0.04 US38
35 Ohio 0.88 1.36 2.56 0.61 0.67 0.44 0.17 0.32 0.1 0.41 0.53 0.26 0.34 0.35 0.56 US39
36 Oklahoma 1.26 0.8 0.58 0.31 0.33 0.3 0.57 0.0 0.11 0.06 0.11 0.04 0.09 0.17 0.21 US40
37 Oregon 0.53 5.23 7.01 2.07 1.26 0.86 1.14 0.94 0.89 1.87 1.01 0.52 0.96 1.25 0.62 US41
38 Pennsylvania 1.54 4.27 7.26 2.36 1.07 1.13 1.14 1.0 1.51 1.54 1.27 0.76 0.91 0.87 0.87 US42
39 Rhode Island 0.88 1.01 2.22 3.33 2.51 1.61 1.87 1.73 2.44 0.15 0.83 0.82 1.34 0.85 1.67 US44
40 South Carolina 1.33 1.23 3.88 0.81 0.64 0.11 0.12 0.02 0.07 0.55 0.16 0.03 0.13 0.36 0.22 US45
41 South Dakota 0.0 0.03 0.01 0.02 0.66 0.12 0.06 0.0 0.0 0.11 0.01 0.02 0.0 0.1 0.0 US46
42 Tennessee 0.66 2.88 2.55 1.16 0.6 0.42 0.38 0.4 0.2 0.51 0.26 0.19 0.21 0.41 0.31 US47
43 Texas 1.85 4.77 8.34 3.86 1.66 1.52 1.21 1.21 1.32 1.28 1.06 0.6 0.73 1.21 0.67 US48
44 Utah 1.91 6.32 9.69 2.9 1.82 1.37 2.29 2.12 1.69 1.74 1.7 1.37 1.21 1.96 2.44 US49
45 Vermont 0.09 0.0 2.57 0.62 0.19 0.25 0.21 1.55 0.42 0.36 1.75 0.58 1.28 0.94 0.15 US50
46 Virginia 3.4 4.85 12.64 3.5 1.47 1.34 0.83 1.48 1.05 1.43 1.22 0.62 0.89 1.42 0.83 US51
47 Washington 3.69 8.74 12.25 4.97 2.45 1.88 3.36 3.0 3.44 4.25 2.86 1.83 1.79 1.54 2.42 US53
48 West Virginia 0.05 0.0 0.11 0.03 0.36 0.27 0.18 0.2 0.07 0.18 0.41 0.05 0.06 0.03 0.22 US54
49 Wisconsin 0.56 0.51 1.08 0.51 0.27 0.19 0.27 0.31 0.26 0.38 0.32 0.04 0.5 0.29 0.36 US55
50 Wyoming 0.0 0.0 0.0 0.0 0.0 0.0 0.06 0.15 0.21 0.01 0.04 0.0 0.27 0.0 0.0 US56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment