-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
executable file
·127 lines (110 loc) · 24.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<!--[if gte IE 9]><!--><html><!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta name="description" content="Paste in CSV data, see the data on a map, download an SVG">
<meta name="keywords" content="csv data mapper, CSV to SVG, keith collins, d3, CSV, map, counties, fips, visualize csv">
<title>Keith Collins | CSV Data Mapper</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
</head>
<body>
<link href="../css/bootstrap.min.css" media="all" rel="stylesheet" />
<link href="../css/index.css" media="all" rel="stylesheet" />
<link href="datamapper.css" media="all" rel="stylesheet" />
<div id="main-container">
<!-- body -->
<div class="row">
<div class="span10 offset1" style="position:relative">
<h1 class="hello">Hello, I’m a Data Mapper</h1>
<p class="description">You give me data, I give you map.</p>
<div id="map" style="position:relative"></div>
</div>
</div>
<div class="row">
<div class="span10 offset1">
<h4>Input CSV</h4>
<p>Paste your CSV below and, as long as it has a <span class="bold">fips</span> field, Data Mapper will make you a map. Your CSV can also include an optional <span class="bold">sequence</span> field, which can be a date, year, day of the week, or any category that you may want to group your data by.</p>
<p>Data Mapper will currently only map county-level data. It'll assume any field not named "fips" or "sequence" is something you want to map.<p>
<textarea id="input"></textarea>
<h4>Select map type</h4>
</div>
</div>
<div class="row">
<div class="span8 offset1">
<label class="radio inline">
<input type="radio" name="mapType" id="bubble" value="bubble" checked="checked"> Bubble<br>(best when your data doesn't include each county)
</label>
<label class="radio inline">
<input type="radio" name="mapType" id="choropleth" value="choropleth"> Choropleth<br>(best when you have statistical data for each county)
</label>
</div>
<div class="span2" style="text-align:right">
<button id="update-map" class="btn">Update Map</button>
</div>
</div>
<div class="row">
<div class="span10 offset1 footer-container">
<h4>Output SVG</h4>
<p>Save the map with the currently selected fields to an SVG for use on the web or to edit in a program like Illustrator</p>
<button id="download-svg" class="btn btn-primary">Download SVG</button>
<!-- footer -->
<div class="footer-container">
<p>Data Mapper is a project by <a href="/">Keith Collins</a>. See the code or fork it <a href="https://github.com/keithcollins/data-mapper">here</a>.
<p>Made possible by <a href="http://d3js.org">D3.js</a>, <a href="http://bost.ocks.org/mike/bubble-map/">Let's Make a Bubble Map</a>, and this <a href="http://bl.ocks.org/mbostock/4060606">Choropleth example</a> by Mike Bostock.</p>
<p>Inspired by <a href="http://bl.ocks.org/shancarter/raw/4748131/">Mister Nester</a> and <a href="http://shancarter.github.io/mr-data-converter/">Mr. Data Converter</a> by Shan Carter.</p>
</div>
</div>
</div>
</div><!--/main-container-->
<!-- js -->
<script src="../js/all.js"></script>
<script src="../js/FileSaver.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="datamapper.js"></script>
<script type="text/javascript">
(function() {
// load sample data into textarea
var dataSample = 'fips,sequence,establishments,employees,payroll\n1065,2009,1,0,0\n1065,2010,1,0,0\n1073,2009,1,0,0\n1073,2010,1,0,0\n1073,2008,1,0,0\n1073,2011,1,0,0\n1073,2012,1,0,0\n1097,2011,1,0,0\n1121,2008,1,0,0\n1121,2009,1,0,0\n1121,2010,1,0,0\n1121,2011,1,0,0\n1121,2012,1,0,0\n2020,2008,1,0,0\n2020,2009,1,0,0\n2020,2010,1,0,0\n2020,2011,1,0,0\n2020,2012,1,0,0\n2170,2008,1,0,0\n2170,2009,1,0,0\n2170,2010,1,0,0\n2170,2011,1,0,0\n2170,2012,1,0,0\n5027,2008,1,0,0\n5027,2009,1,0,0\n5027,2010,1,0,0\n5027,2011,1,0,0\n5027,2012,1,0,0\n5049,2008,1,0,0\n5049,2009,1,0,0\n5049,2010,1,0,0\n5145,2008,1,0,0\n5145,2009,1,0,0\n5145,2010,1,0,0\n5145,2012,1,0,0\n6013,2010,1,0,0\n6013,2011,1,0,0\n6013,2008,1,0,0\n6013,2009,1,0,0\n6019,2012,1,0,0\n6023,2008,1,0,0\n6023,2009,1,0,0\n6023,2010,1,0,0\n6023,2011,1,0,0\n6023,2012,1,0,0\n6041,2010,1,0,0\n6055,2012,1,0,0\n6061,2012,1,0,0\n6065,2009,1,0,0\n6075,2010,1,0,0\n6083,2012,1,0,0\n6097,2008,1,0,0\n6097,2009,1,0,0\n6097,2011,1,0,0\n6099,2008,1,0,0\n6099,2009,1,0,0\n6107,2008,1,0,0\n6107,2009,1,0,0\n6107,2010,1,0,0\n6107,2011,1,0,0\n6107,2012,1,0,0\n6111,2008,1,0,0\n8013,2008,1,0,0\n8013,2009,1,0,0\n8013,2010,1,0,0\n8013,2012,1,0,0\n8031,2010,1,0,0\n8031,2011,1,0,0\n8041,2008,1,0,0\n8041,2009,1,0,0\n8041,2010,1,0,0\n8041,2011,1,0,0\n8041,2012,1,0,0\n8069,2009,1,0,0\n8069,2010,1,0,0\n8069,2011,1,0,0\n8069,2012,1,0,0\n9001,2012,1,0,0\n9005,2008,1,0,0\n9005,2009,1,0,0\n9005,2010,1,0,0\n9005,2011,1,0,0\n9005,2012,1,0,0\n9011,2008,1,0,0\n9011,2009,1,0,0\n9011,2011,1,0,0\n9011,2012,1,0,0\n12001,2008,1,0,0\n12001,2009,1,0,0\n12001,2010,1,0,0\n12001,2011,1,0,0\n12001,2012,1,0,0\n12009,2010,1,0,0\n12009,2011,1,0,0\n12009,2012,1,0,0\n12009,2009,1,0,0\n12019,2012,1,0,0\n12031,2010,1,0,0\n12031,2011,1,0,0\n12057,2008,1,0,0\n12057,2009,1,0,0\n12057,2010,1,0,0\n12057,2011,1,0,0\n12071,2008,1,0,0\n12071,2009,1,0,0\n12071,2010,1,0,0\n12071,2012,1,0,0\n12083,2009,1,0,0\n12085,2010,1,0,0\n12085,2011,1,0,0\n12095,2008,1,0,0\n12095,2010,1,0,0\n12095,2011,1,0,0\n12095,2012,1,0,0\n12097,2010,1,0,0\n12097,2011,1,0,0\n12105,2008,1,0,0\n12105,2009,1,0,0\n12105,2011,1,0,0\n12105,2012,1,0,0\n12109,2012,1,0,0\n12115,2010,1,0,0\n12115,2011,1,0,0\n12117,2010,1,0,0\n12117,2011,1,0,0\n12117,2012,1,0,0\n12127,2008,1,0,0\n13067,2008,1,0,0\n13067,2009,1,0,0\n13067,2010,1,0,0\n13067,2011,1,0,0\n13089,2011,1,0,0\n13089,2012,1,0,0\n13127,2008,1,0,0\n13127,2011,1,0,0\n13135,2008,1,0,0\n13135,2009,1,0,0\n13135,2010,1,0,0\n13135,2012,1,0,0\n13313,2012,1,0,0\n15001,2009,1,0,0\n15001,2010,1,0,0\n15007,2009,1,0,0\n15007,2010,1,0,0\n15007,2011,1,0,0\n15007,2012,1,0,0\n15007,2008,1,0,0\n15009,2008,1,0,0\n15009,2009,1,0,0\n15009,2010,1,0,0\n15009,2011,1,0,0\n15009,2012,1,0,0\n16001,2008,1,0,0\n16001,2009,1,0,0\n16027,2012,1,0,0\n16045,2009,1,0,0\n17007,2008,1,0,0\n17007,2009,1,0,0\n17007,2010,1,0,0\n17007,2011,1,0,0\n17007,2012,1,0,0\n17097,2008,1,0,0\n17113,2009,1,0,0\n17115,2008,1,0,0\n17115,2009,1,0,0\n17115,2010,1,0,0\n17115,2011,1,0,0\n17115,2012,1,0,0\n17161,2008,1,0,0\n17161,2009,1,0,0\n17161,2010,1,0,0\n17161,2011,1,0,0\n17161,2012,1,0,0\n17163,2008,1,0,0\n17163,2009,1,0,0\n17163,2010,1,0,0\n17163,2011,1,0,0\n17163,2012,1,0,0\n17167,2008,1,0,0\n17167,2009,1,0,0\n17167,2010,1,0,0\n17167,2011,1,0,0\n17197,2009,1,0,0\n18001,2008,1,0,0\n18003,2008,1,0,0\n18003,2009,1,0,0\n18003,2010,1,0,0\n18003,2011,1,0,0\n18003,2012,1,0,0\n18023,2008,1,0,0\n18023,2009,1,0,0\n18023,2010,1,0,0\n18023,2011,1,0,0\n18023,2012,1,0,0\n18039,2008,1,0,0\n18039,2009,1,0,0\n18039,2010,1,0,0\n18039,2011,1,0,0\n18039,2012,1,0,0\n18069,2008,1,0,0\n18069,2009,1,0,0\n18069,2010,1,0,0\n18069,2011,1,0,0\n18069,2012,1,0,0\n18097,2012,1,0,0\n18113,2008,1,0,0\n18113,2009,1,0,0\n18113,2010,1,0,0\n18113,2011,1,0,0\n18127,2008,1,0,0\n18127,2009,1,0,0\n18127,2010,1,0,0\n18127,2011,1,0,0\n18127,2012,1,0,0\n18141,2008,1,0,0\n18141,2009,1,0,0\n18141,2010,1,0,0\n18141,2011,1,0,0\n18141,2012,1,0,0\n18157,2008,1,0,0\n18157,2009,1,0,0\n18157,2010,1,0,0\n18157,2011,1,0,0\n18157,2012,1,0,0\n18165,2008,1,0,0\n18165,2009,1,0,0\n18165,2010,1,0,0\n18165,2011,1,0,0\n18165,2012,1,0,0\n19153,2012,1,0,0\n19153,2008,1,0,0\n19153,2009,1,0,0\n19153,2010,1,0,0\n19153,2011,1,0,0\n19179,2010,1,0,0\n19179,2012,1,0,0\n19179,2008,1,0,0\n19179,2009,1,0,0\n19179,2011,1,0,0\n21037,2011,1,0,0\n21111,2009,1,0,0\n21111,2012,1,0,0\n21117,2011,1,0,0\n21145,2012,1,0,0\n21145,2008,1,0,0\n21145,2009,1,0,0\n21145,2010,1,0,0\n21145,2011,1,0,0\n22005,2010,1,0,0\n22005,2011,1,0,0\n22073,2008,1,0,0\n22073,2009,1,0,0\n22073,2010,1,0,0\n22073,2012,1,0,0\n22073,2011,1,0,0\n22079,2011,1,0,0\n22079,2012,1,0,0\n23005,2010,1,0,0\n23005,2012,1,0,0\n23009,2009,1,0,0\n23009,2010,1,0,0\n23015,2008,1,0,0\n23015,2009,1,0,0\n23015,2010,1,0,0\n23015,2011,1,0,0\n23015,2012,1,0,0\n23025,2008,1,0,0\n23025,2009,1,0,0\n23025,2010,1,0,0\n23025,2011,1,0,0\n23025,2012,1,0,0\n24003,2008,1,0,0\n24003,2009,1,0,0\n24003,2010,1,0,0\n24005,2012,1,0,0\n24031,2008,1,0,0\n24035,2008,1,0,0\n24043,2008,1,0,0\n24043,2009,1,0,0\n24043,2010,1,0,0\n24043,2011,1,0,0\n24043,2012,1,0,0\n24510,2008,1,0,0\n24510,2010,1,0,0\n24510,2012,1,0,0\n25001,2008,1,0,0\n25001,2009,1,0,0\n25001,2010,1,0,0\n25001,2011,1,0,0\n25003,2011,1,0,0\n25003,2012,1,0,0\n25005,2008,1,0,0\n25011,2008,1,0,0\n25011,2010,1,0,0\n25011,2012,1,0,0\n25013,2010,1,0,0\n25013,2011,1,0,0\n25013,2012,1,0,0\n25013,2008,1,0,0\n25013,2009,1,0,0\n25021,2008,1,0,0\n26005,2008,1,0,0\n26005,2009,1,0,0\n26005,2010,1,0,0\n26005,2011,1,0,0\n26005,2012,1,0,0\n26055,2009,1,0,0\n26055,2010,1,0,0\n26055,2011,1,0,0\n26065,2008,1,0,0\n26065,2009,1,0,0\n26065,2010,1,0,0\n26065,2011,1,0,0\n26065,2012,1,0,0\n26077,2008,1,0,0\n26077,2009,1,0,0\n26077,2010,1,0,0\n26087,2012,1,0,0\n26099,2008,1,0,0\n26099,2009,1,0,0\n26099,2010,1,0,0\n26099,2011,1,0,0\n26099,2012,1,0,0\n26105,2008,1,0,0\n26105,2009,1,0,0\n26105,2010,1,0,0\n26105,2011,1,0,0\n26105,2012,1,0,0\n26115,2008,1,0,0\n26115,2009,1,0,0\n26115,2010,1,0,0\n26115,2011,1,0,0\n26115,2012,1,0,0\n26161,2008,1,0,0\n26163,2008,1,0,0\n26163,2009,1,0,0\n26163,2010,1,0,0\n26163,2011,1,0,0\n26163,2012,1,0,0\n27053,2009,1,0,0\n27109,2008,1,0,0\n27109,2009,1,0,0\n27109,2010,1,0,0\n27109,2011,1,0,0\n27109,2012,1,0,0\n27123,2012,1,0,0\n29077,2012,1,0,0\n29161,2008,1,0,0\n29161,2009,1,0,0\n29161,2010,1,0,0\n29161,2011,1,0,0\n29161,2012,1,0,0\n29183,2008,1,0,0\n29183,2009,1,0,0\n29183,2010,1,0,0\n29183,2012,1,0,0\n29189,2012,1,0,0\n29201,2008,1,0,0\n29201,2009,1,0,0\n29201,2010,1,0,0\n29201,2011,1,0,0\n29201,2012,1,0,0\n29510,2008,1,0,0\n29510,2009,1,0,0\n29510,2010,1,0,0\n29510,2011,1,0,0\n29510,2012,1,0,0\n30067,2008,1,0,0\n30067,2009,1,0,0\n30067,2010,1,0,0\n30067,2011,1,0,0\n30067,2012,1,0,0\n30111,2008,1,0,0\n30111,2009,1,0,0\n30111,2010,1,0,0\n30111,2011,1,0,0\n30111,2012,1,0,0\n31043,2010,1,0,0\n31043,2011,1,0,0\n31043,2012,1,0,0\n31119,2008,1,0,0\n31119,2009,1,0,0\n31119,2010,1,0,0\n31119,2011,1,0,0\n31119,2012,1,0,0\n32005,2011,1,0,0\n33001,2008,1,0,0\n33001,2009,1,0,0\n33001,2010,1,0,0\n33001,2011,1,0,0\n33001,2012,1,0,0\n33003,2009,1,0,0\n33005,2008,1,0,0\n33005,2009,1,0,0\n33005,2010,1,0,0\n33005,2012,1,0,0\n33015,2008,1,0,0\n34001,2011,1,0,0\n34001,2012,1,0,0\n34003,2012,1,0,0\n34007,2008,1,0,0\n34011,2008,1,0,0\n34011,2009,1,0,0\n34011,2010,1,0,0\n34017,2011,1,0,0\n34017,2012,1,0,0\n34021,2008,1,0,0\n34021,2009,1,0,0\n34021,2010,1,0,0\n34021,2011,1,0,0\n34021,2012,1,0,0\n34025,2008,1,0,0\n34025,2011,1,0,0\n34025,2012,1,0,0\n34027,2009,1,0,0\n34027,2010,1,0,0\n34027,2011,1,0,0\n34027,2012,1,0,0\n34029,2008,1,0,0\n34029,2009,1,0,0\n34029,2010,1,0,0\n34029,2011,1,0,0\n34029,2012,1,0,0\n34039,2008,1,0,0\n34039,2009,1,0,0\n34039,2010,1,0,0\n34039,2011,1,0,0\n34041,2009,1,0,0\n35003,2010,1,0,0\n35003,2011,1,0,0\n35047,2009,1,0,0\n35047,2010,1,0,0\n35047,2011,1,0,0\n35047,2012,1,0,0\n36005,2008,1,0,0\n36005,2009,1,0,0\n36005,2011,1,0,0\n36005,2012,1,0,0\n36005,2010,1,0,0\n36013,2008,1,0,0\n36013,2009,1,0,0\n36013,2010,1,0,0\n36013,2011,1,0,0\n36013,2012,1,0,0\n36017,2008,1,0,0\n36017,2009,1,0,0\n36027,2008,1,0,0\n36027,2009,1,0,0\n36027,2010,1,0,0\n36027,2011,1,0,0\n36027,2012,1,0,0\n36035,2008,1,0,0\n36035,2009,1,0,0\n36035,2010,1,0,0\n36035,2011,1,0,0\n36035,2012,1,0,0\n36053,2008,1,0,0\n36059,2009,1,0,0\n36059,2011,1,0,0\n36065,2009,1,0,0\n36065,2008,1,0,0\n36065,2010,1,0,0\n36065,2011,1,0,0\n36065,2012,1,0,0\n36111,2008,1,0,0\n36111,2009,1,0,0\n36111,2010,1,0,0\n36111,2011,1,0,0\n36111,2012,1,0,0\n36119,2009,1,0,0\n36119,2010,1,0,0\n36119,2011,1,0,0\n36119,2012,1,0,0\n37013,2008,1,0,0\n37013,2009,1,0,0\n37013,2010,1,0,0\n37025,2012,1,0,0\n37057,2010,1,0,0\n37057,2011,1,0,0\n37063,2008,1,0,0\n37063,2009,1,0,0\n37063,2010,1,0,0\n37063,2011,1,0,0\n37063,2012,1,0,0\n37071,2008,1,0,0\n37071,2009,1,0,0\n37071,2010,1,0,0\n37071,2011,1,0,0\n37071,2012,1,0,0\n37081,2008,1,0,0\n37081,2009,1,0,0\n37081,2010,1,0,0\n37081,2011,1,0,0\n37081,2012,1,0,0\n37097,2008,1,0,0\n37097,2010,1,0,0\n37129,2011,1,0,0\n37183,2008,1,0,0\n37183,2009,1,0,0\n37183,2010,1,0,0\n39017,2010,1,0,0\n39025,2012,1,0,0\n39035,2010,1,0,0\n39035,2011,1,0,0\n39035,2012,1,0,0\n39045,2008,1,0,0\n39045,2009,1,0,0\n39045,2010,1,0,0\n39045,2011,1,0,0\n39045,2012,1,0,0\n39049,2011,1,0,0\n39049,2012,1,0,0\n39075,2010,1,0,0\n39075,2011,1,0,0\n39075,2012,1,0,0\n39085,2008,1,0,0\n39089,2008,1,0,0\n39089,2009,1,0,0\n39089,2010,1,0,0\n39089,2011,1,0,0\n39089,2012,1,0,0\n39095,2012,1,0,0\n39133,2011,1,0,0\n39151,2009,1,0,0\n39151,2010,1,0,0\n39153,2008,1,0,0\n39153,2009,1,0,0\n39153,2010,1,0,0\n39153,2011,1,0,0\n39153,2012,1,0,0\n40027,2008,1,0,0\n40027,2009,1,0,0\n40027,2010,1,0,0\n40051,2009,1,0,0\n40051,2010,1,0,0\n40109,2008,1,0,0\n40109,2009,1,0,0\n40145,2008,1,0,0\n40145,2009,1,0,0\n40145,2010,1,0,0\n40145,2011,1,0,0\n40145,2012,1,0,0\n40147,2008,1,0,0\n40147,2009,1,0,0\n40147,2010,1,0,0\n41003,2010,1,0,0\n41003,2011,1,0,0\n41011,2008,1,0,0\n41011,2009,1,0,0\n41011,2010,1,0,0\n41011,2011,1,0,0\n41047,2008,1,0,0\n41047,2009,1,0,0\n41047,2012,1,0,0\n41047,2010,1,0,0\n41047,2011,1,0,0\n42003,2008,1,0,0\n42011,2012,1,0,0\n42011,2009,1,0,0\n42011,2010,1,0,0\n42011,2011,1,0,0\n42017,2008,1,0,0\n42029,2008,1,0,0\n42029,2009,1,0,0\n42029,2010,1,0,0\n42039,2012,1,0,0\n42043,2008,1,0,0\n42043,2009,1,0,0\n42043,2010,1,0,0\n42043,2011,1,0,0\n42043,2012,1,0,0\n42055,2008,1,0,0\n42055,2009,1,0,0\n42055,2010,1,0,0\n42055,2011,1,0,0\n42055,2012,1,0,0\n42069,2008,1,0,0\n42069,2009,1,0,0\n42071,2008,1,0,0\n42071,2010,1,0,0\n42071,2011,1,0,0\n42071,2012,1,0,0\n42099,2008,1,0,0\n42099,2009,1,0,0\n42099,2010,1,0,0\n42099,2011,1,0,0\n42099,2012,1,0,0\n42103,2012,1,0,0\n42107,2012,1,0,0\n42109,2009,1,0,0\n42133,2008,1,0,0\n42133,2009,1,0,0\n42133,2010,1,0,0\n42133,2011,1,0,0\n44003,2008,1,0,0\n44003,2010,1,0,0\n44003,2011,1,0,0\n44003,2009,1,0,0\n44007,2008,1,0,0\n44007,2009,1,0,0\n44007,2010,1,0,0\n44007,2011,1,0,0\n44007,2012,1,0,0\n45007,2012,1,0,0\n45013,2008,1,0,0\n45013,2009,1,0,0\n45013,2010,1,0,0\n45013,2011,1,0,0\n45013,2012,1,0,0\n45015,2011,1,0,0\n45019,2008,1,0,0\n45019,2011,1,0,0\n45019,2012,1,0,0\n45035,2010,1,0,0\n45045,2008,1,0,0\n45045,2009,1,0,0\n45073,2010,1,0,0\n45073,2011,1,0,0\n47109,2009,1,0,0\n47109,2010,1,0,0\n47109,2011,1,0,0\n47109,2012,1,0,0\n47155,2010,1,0,0\n47155,2011,1,0,0\n47155,2012,1,0,0\n47157,2008,1,0,0\n47157,2009,1,0,0\n47157,2010,1,0,0\n47157,2011,1,0,0\n47157,2012,1,0,0\n47167,2008,1,0,0\n47167,2009,1,0,0\n47167,2010,1,0,0\n47167,2011,1,0,0\n48061,2012,1,0,0\n48085,2008,1,0,0\n48085,2009,1,0,0\n48085,2010,1,0,0\n48085,2011,1,0,0\n48085,2012,1,0,0\n48141,2008,1,0,0\n48141,2009,1,0,0\n48141,2011,1,0,0\n48141,2012,1,0,0\n48183,2010,1,0,0\n48183,2011,1,0,0\n48203,2008,1,0,0\n48203,2009,1,0,0\n48215,2008,1,0,0\n48215,2009,1,0,0\n48215,2012,1,0,0\n48257,2009,1,0,0\n48257,2010,1,0,0\n48257,2011,1,0,0\n48423,2008,1,0,0\n48423,2009,1,0,0\n48423,2010,1,0,0\n48423,2011,1,0,0\n48423,2012,1,0,0\n48439,2010,1,0,0\n48453,2008,1,0,0\n48453,2009,1,0,0\n48453,2010,1,0,0\n48453,2011,1,0,0\n48453,2012,1,0,0\n48477,2008,1,0,0\n48477,2009,1,0,0\n48477,2010,1,0,0\n48477,2011,1,0,0\n48477,2012,1,0,0\n49011,2009,1,0,0\n49011,2010,1,0,0\n49011,2011,1,0,0\n49011,2008,1,0,0\n49035,2011,1,0,0\n49035,2012,1,0,0\n49049,2008,1,0,0\n49051,2012,1,0,0\n49053,2008,1,0,0\n49053,2009,1,0,0\n49053,2010,1,0,0\n49053,2011,1,0,0\n49053,2012,1,0,0\n50003,2008,1,0,0\n50003,2009,1,0,0\n50003,2010,1,0,0\n50003,2011,1,0,0\n50003,2012,1,0,0\n50007,2008,1,0,0\n50007,2009,1,0,0\n50007,2010,1,0,0\n50007,2011,1,0,0\n50011,2008,1,0,0\n50011,2009,1,0,0\n50011,2010,1,0,0\n50011,2011,1,0,0\n50011,2012,1,0,0\n50023,2012,1,0,0\n50023,2008,1,0,0\n50023,2009,1,0,0\n50023,2010,1,0,0\n50023,2011,1,0,0\n50025,2010,1,0,0\n50025,2011,1,0,0\n50025,2012,1,0,0\n51003,2008,1,0,0\n51069,2008,1,0,0\n51069,2009,1,0,0\n51069,2010,1,0,0\n51069,2012,1,0,0\n51079,2008,1,0,0\n51079,2009,1,0,0\n51087,2008,1,0,0\n51087,2009,1,0,0\n51087,2010,1,0,0\n51087,2011,1,0,0\n51087,2012,1,0,0\n51700,2008,1,0,0\n51700,2009,1,0,0\n51700,2010,1,0,0\n51700,2011,1,0,0\n51700,2012,1,0,0\n51820,2009,1,0,0\n53011,2008,1,0,0\n53021,2008,1,0,0\n53021,2009,1,0,0\n53021,2010,1,0,0\n53021,2011,1,0,0\n53021,2012,1,0,0\n53029,2010,1,0,0\n53029,2011,1,0,0\n53029,2012,1,0,0\n53033,2011,1,0,0\n53035,2008,1,0,0\n53045,2008,1,0,0\n53045,2009,1,0,0\n53045,2010,1,0,0\n53045,2011,1,0,0\n53045,2012,1,0,0\n53055,2008,1,0,0\n53055,2009,1,0,0\n53055,2010,1,0,0\n53055,2011,1,0,0\n53061,2008,1,0,0\n53061,2009,1,0,0\n53061,2010,1,0,0\n53061,2011,1,0,0\n53061,2012,1,0,0\n53063,2008,1,0,0\n53063,2009,1,0,0\n53063,2010,1,0,0\n53063,2011,1,0,0\n54069,2008,1,0,0\n54069,2009,1,0,0\n54069,2010,1,0,0\n54069,2011,1,0,0\n54069,2012,1,0,0\n55033,2012,1,0,0\n55059,2008,1,0,0\n55071,2008,1,0,0\n55071,2009,1,0,0\n55071,2010,1,0,0\n55071,2011,1,0,0\n55071,2012,1,0,0\n55097,2009,1,0,0\n55097,2010,1,0,0\n55097,2012,1,0,0\n55097,2011,1,0,0\n55113,2008,1,0,0\n55113,2009,1,0,0\n55113,2010,1,0,0\n55113,2011,1,0,0\n55113,2012,1,0,0\n55117,2008,1,0,0\n55133,2010,1,0,0\n1065,2008,2,0,0\n4013,2011,2,0,0\n4013,2012,2,0,0\n5145,2011,2,0,0\n6001,2008,2,0,0\n6001,2009,2,0,0\n6013,2012,2,0,0\n6019,2008,2,0,0\n6019,2009,2,0,0\n6019,2010,2,0,0\n6019,2011,2,0,0\n6029,2008,2,0,0\n6029,2009,2,0,0\n6029,2010,2,0,0\n6029,2011,2,0,0\n6029,2012,2,0,0\n6041,2008,2,0,0\n6041,2009,2,0,0\n6041,2011,2,0,0\n6065,2008,2,0,0\n6065,2010,2,0,0\n6065,2011,2,0,0\n6065,2012,2,0,0\n6075,2011,2,0,0\n6075,2012,2,0,0\n6075,2008,2,0,0\n6075,2009,2,0,0\n6079,2008,2,0,0\n6079,2009,2,0,0\n6079,2011,2,0,0\n6079,2012,2,0,0\n6083,2008,2,0,0\n6083,2009,2,0,0\n6083,2010,2,0,0\n6083,2011,2,0,0\n6087,2008,2,0,0\n6087,2009,2,0,0\n6087,2010,2,0,0\n6087,2011,2,0,0\n6087,2012,2,0,0\n6097,2012,2,0,0\n6097,2010,2,0,0\n6099,2010,2,0,0\n6111,2009,2,0,0\n8013,2011,2,0,0\n8031,2008,2,0,0\n8031,2009,2,0,0\n8031,2012,2,0,0\n8059,2008,2,0,0\n8059,2009,2,0,0\n8059,2010,2,0,0\n8059,2011,2,0,0\n8059,2012,2,0,0\n8069,2008,2,0,0\n9001,2008,2,0,0\n9001,2009,2,0,0\n9001,2010,2,0,0\n9001,2011,2,0,0\n9003,2012,2,0,0\n9011,2010,2,0,0\n12011,2009,2,0,0\n12021,2008,2,0,0\n12021,2009,2,0,0\n12021,2010,2,0,0\n12021,2011,2,0,0\n12021,2012,2,0,0\n12057,2012,2,0,0\n12071,2011,2,0,0\n12083,2010,2,0,0\n12083,2011,2,0,0\n12095,2009,2,0,0\n12097,2012,2,0,0\n12103,2012,2,0,0\n12103,2008,2,0,0\n12105,2010,2,0,0\n15001,2008,2,0,0\n15003,2008,2,0,0\n15003,2009,2,0,0\n15003,2011,2,0,0\n15003,2012,2,0,0\n17167,2012,2,0,0\n19061,2008,2,0,0\n19149,2008,2,0,0\n19149,2009,2,0,0\n19149,2010,2,0,0\n19149,2011,2,0,0\n19149,2012,2,0,0\n21111,2010,2,0,0\n21111,2011,2,0,0\n23009,2008,2,0,0\n24005,2008,2,0,0\n24027,2008,2,0,0\n24027,2009,2,0,0\n24027,2010,2,0,0\n24027,2012,2,0,0\n24031,2009,2,0,0\n24031,2012,2,0,0\n24510,2009,2,0,0\n24510,2011,2,0,0\n25005,2012,2,0,0\n25009,2008,2,0,0\n25009,2009,2,0,0\n25011,2009,2,0,0\n25011,2011,2,0,0\n26055,2012,2,0,0\n27053,2008,2,0,0\n32003,2009,2,0,0\n32003,2012,2,0,0\n32003,2010,2,0,0\n32003,2011,2,0,0\n32005,2012,2,0,0\n33003,2008,2,0,0\n33005,2011,2,0,0\n34013,2009,2,0,0\n34013,2010,2,0,0\n34013,2012,2,0,0\n34023,2008,2,0,0\n34023,2009,2,0,0\n34023,2010,2,0,0\n34023,2011,2,0,0\n34031,2008,2,0,0\n34031,2010,2,0,0\n34039,2012,2,0,0\n36059,2010,2,0,0\n36059,2012,2,0,0\n36061,2008,2,0,0\n36061,2009,2,0,0\n36061,2011,2,0,0\n36103,2010,2,0,0\n36103,2011,2,0,0\n36103,2012,2,0,0\n36119,2008,2,0,0\n37001,2012,2,0,0\n37097,2009,2,0,0\n37097,2011,2,0,0\n37119,2008,2,0,0\n39035,2008,2,0,0\n39035,2009,2,0,0\n39061,2012,2,0,0\n39061,2008,2,0,0\n39061,2009,2,0,0\n39061,2010,2,0,0\n39061,2011,2,0,0\n40109,2010,2,0,0\n40109,2011,2,0,0\n40109,2012,2,0,0\n41039,2012,2,0,0\n41051,2008,2,0,0\n42011,2008,2,0,0\n42017,2009,2,0,0\n42017,2010,2,0,0\n42017,2011,2,0,0\n42017,2012,2,0,0\n42045,2008,2,0,0\n42045,2009,2,0,0\n42045,2010,2,0,0\n42045,2011,2,0,0\n42045,2012,2,0,0\n42069,2010,2,0,0\n42069,2011,2,0,0\n42069,2012,2,0,0\n42071,2009,2,0,0\n42091,2008,2,0,0\n42091,2009,2,0,0\n42091,2012,2,0,0\n42091,2010,2,0,0\n42091,2011,2,0,0\n45019,2009,2,0,0\n45019,2010,2,0,0\n47167,2012,2,0,0\n48029,2012,2,0,0\n48113,2012,2,0,0\n48141,2010,2,0,0\n48215,2010,2,0,0\n48215,2011,2,0,0\n48469,2012,2,0,0\n49005,2008,2,0,0\n49005,2009,2,0,0\n49005,2010,2,0,0\n49005,2011,2,0,0\n49005,2012,2,0,0\n49011,2012,2,0,0\n49035,2008,2,0,0\n49035,2009,2,0,0\n49035,2010,2,0,0\n51069,2011,2,0,0\n53033,2009,2,0,0\n53033,2010,2,0,0\n53033,2012,2,0,0\n55025,2008,2,0,0\n55025,2009,2,0,0\n55025,2010,2,0,0\n55025,2011,2,0,0\n55025,2012,2,0,0\n4013,2008,3,0,0\n6001,2010,3,0,400\n6001,2011,3,0,374\n6041,2012,3,0,0\n6067,2012,3,0,0\n6067,2009,3,142,4396\n6067,2008,3,142,4467\n6071,2011,3,0,0\n6073,2008,3,0,183\n6073,2012,3,0,96\n6073,2009,3,0,0\n6079,2010,3,43,394\n6081,2009,3,0,0\n6081,2010,3,0,0\n6081,2011,3,0,0\n6081,2008,3,47,1975\n6099,2012,3,0,0\n9003,2008,3,0,0\n12086,2008,3,0,0\n12103,2010,3,0,0\n12103,2011,3,0,0\n12103,2009,3,0,0\n15003,2010,3,0,0\n17043,2012,3,0,0\n24027,2011,3,0,0\n24031,2011,3,0,0\n25005,2011,3,0,0\n25005,2009,3,0,2501\n25005,2010,3,69,4348\n25009,2010,3,0,0\n25009,2011,3,0,0\n25009,2012,3,0,0\n25025,2008,3,37,920\n27083,2009,3,0,0\n27083,2012,3,0,0\n27083,2010,3,0,0\n27083,2011,3,0,0\n29189,2008,3,0,0\n29189,2009,3,0,0\n29189,2010,3,0,0\n29189,2011,3,0,0\n32003,2008,3,0,0\n34013,2011,3,0,0\n34023,2012,3,0,0\n34031,2012,3,0,0\n34031,2009,3,0,293\n34031,2011,3,11,322\n36029,2008,3,0,0\n36061,2010,3,0,0\n36103,2009,3,0,0\n36103,2008,3,2,203\n37119,2009,3,0,0\n37119,2010,3,0,0\n37119,2012,3,0,925\n37119,2011,3,0,0\n41051,2012,3,0,135\n41051,2009,3,0,0\n41051,2010,3,0,0\n41051,2011,3,0,0\n48029,2008,3,0,0\n48029,2009,3,0,0\n48029,2010,3,0,0\n48029,2011,3,0,0\n48113,2009,3,0,0\n48113,2010,3,0,0\n48113,2008,3,0,166\n48113,2011,3,12,114\n53035,2012,3,0,0\n4013,2009,4,0,0\n6059,2010,4,148,3979\n6059,2009,4,160,4162\n6067,2010,4,0,0\n6067,2011,4,0,0\n6071,2010,4,0,0\n6071,2012,4,0,0\n6081,2012,4,0,0\n6099,2011,4,0,0\n9003,2009,4,0,0\n9003,2011,4,0,0\n9009,2012,4,0,0\n12011,2008,4,0,0\n12086,2009,4,0,0\n12099,2008,4,0,0\n12099,2010,4,0,0\n17043,2008,4,0,0\n17043,2009,4,0,0\n17043,2010,4,0,0\n17043,2011,4,0,0\n34013,2008,4,0,0\n36029,2009,4,0,0\n36029,2012,4,0,0\n36047,2011,4,0,0\n36061,2012,4,0,244\n41039,2011,4,148,7628\n41039,2010,4,192,10296\n41039,2009,4,208,9215\n53033,2008,4,0,0\n4013,2010,5,0,0\n6001,2012,5,0,388\n6059,2012,5,0,0\n6059,2011,5,151,4818\n6071,2009,5,272,6850\n6073,2010,5,0,0\n6073,2011,5,0,0\n9003,2010,5,0,0\n9009,2011,5,64,916\n9009,2008,5,68,1166\n12011,2010,5,2,177\n12011,2011,5,28,416\n12086,2010,5,0,0\n12099,2009,5,0,0\n24031,2010,5,27,518\n25017,2012,5,0,0\n25025,2010,5,40,1274\n25025,2009,5,41,1235\n25025,2011,5,44,1060\n25025,2012,5,45,1118\n36029,2010,5,0,0\n36029,2011,5,0,0\n36047,2012,5,0,0\n36047,2010,5,10,257\n36081,2012,5,37,1680\n36081,2011,5,44,1720\n36081,2010,5,45,1737\n36081,2009,5,47,1667\n36081,2008,5,49,1692\n6059,2008,6,163,4356\n6071,2008,6,288,6688\n9009,2010,6,81,1222\n9009,2009,6,81,1232\n12099,2011,6,0,0\n6085,2008,7,59,1637\n6085,2012,7,62,1798\n12086,2012,7,0,747\n12099,2012,7,0,0\n36047,2009,7,0,657\n41039,2008,7,0,0\n6085,2009,8,70,1756\n17031,2010,8,82,2084\n25017,2010,8,0,0\n25017,2011,8,313,5038\n27083,2008,8,0,0\n36047,2008,8,0,731\n6085,2010,9,56,1867\n12011,2012,9,41,380\n12086,2011,9,0,0\n17031,2008,9,59,1998\n25017,2008,9,0,0\n25017,2009,9,0,0\n48201,2011,9,0,0\n48201,2012,9,0,0\n48201,2008,9,236,5139\n6085,2011,10,71,2068\n17031,2011,10,48,1561\n17031,2012,10,63,1431\n17031,2009,10,93,2101\n48201,2009,10,252,5096\n48201,2010,11,0,0\n6037,2010,16,565,19427\n6037,2011,16,637,19597\n6037,2012,17,666,25016\n6037,2009,19,835,24473\n6037,2008,21,1028,34355';
d3.select("#input").property("value", dataSample);
// get text from box
var t = d3.select("#input").property("value");
// parse text
var data = d3.csv.parse(t);
// set initial map type
var mapType = "bubble";
// launch
datamapper("#map", mapType, data);
d3.select("#update-map").on("click",function() {
// get text from box
t = d3.select("#input").property("value");
// parse text
data = d3.csv.parse(t);
// get map type
var radios = document.getElementsByName('mapType');
for (var i=0;i<radios.length;i++) {
if (radios[i]["checked"] === true) {
mapType = radios[i]["value"];
}
}
datamapper("#map", mapType, data);
});
d3.select("#download-svg").on("click",function() {
var svgtext = document.getElementById("map").innerHTML;
var regex = /<div(.*)/;
svgtext = svgtext.replace(regex,'');
var blob = new Blob([svgtext], {type: "image/svg+xml"});
saveAs(blob, "datamapper.svg");
});
})();
// google google-analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19469914-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>