-
Notifications
You must be signed in to change notification settings - Fork 1
/
map[Conflict].html
36 lines (32 loc) · 1.01 KB
/
map[Conflict].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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="js/topojson.v0.min.js"></script>
<script src="js/d3.v3.min.js"></script>
<script type="text/javascript" src="js/crossfilter.min.js"></script>
<script type="text/javascript" src="js/dc.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/dc.css" rel="stylesheet">
<body>
<div id="map">
</div>
<script>
d3.csv("data/districtgdp1.csv", function(csv){
var data =crossfilter(csv);
var district = data.dimension(function(d){return d["District"];});
var gdp = district.group().reduceSum(function(d){return d["GDP"];});
// load and display the World
cc= dc.geoChoroplethChart("#map");
d3.json("india.json", function(topology) {
cc.width(990)
.height(450)
.overlayGeoJson(topology.features, "india", function(d){return d.properties.district_n;})
.dimension(district)
.group(gdp)
.colors('purple');
});
});
</script>
</body>
</html>