/
index.html
140 lines (126 loc) · 4.06 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
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>US 2016 elections by zipcode</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<style>
.tract {
stroke: #777;
stroke-width: 0.05px;
pointer-events: all;
}
.tract:hover {
stroke: orange;
pointer-events: all;
}
.tract-border {
fill: none;
/*stroke: #777;*/
stroke-width: 0.05px;
pointer-events: none;
}
@media (max-width: 767px) {
.label {
transform: rotate(-45deg) translate(-10px, 25px);
}
}
.tract-border-state {
fill: none;
stroke: #333;
stroke-width: 0.5px;
pointer-events: none;
}
.legend {
font-family: sans-serif;
font-size: 10pt;
}
.legendTitle {
font-weight: bold;
font-size:11pt;
}
.background {
fill:#f5f5f5;
}
body {
background: #f5f5f5;
/*font-family: sans-serif;*/
}
.bar {
font-family: sans-serif;
font-size: 8pt;
}
#cityLegend {
font-family: sans-serif;
text-anchor: middle;
}
#details .background {
fill: #f5f5f5;
fill-opacity: 0.7;
}
svg {
width:100%;
}
.tooltip {
top: 100px;
left: 100px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 2px solid #000;
background: #fff;
opacity: .9;
color: black;
padding: 10px;
width: 450px;
font-size: 1.2em;
line-height: 28pt;
}
</style>
</head>
<body>
<div class="row">
<div class="col-md-1 col-xs-1"></div>
<div class="col-md-10 col-xs-10">
<h2>2016 US Presidential Election results</h2>
<h4>Click on the map to explore</h4>
</div>
<div class="col-md-1 col-xs-1">
<a href="https://github.com/john-guerra/US_Elections_Results"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
</div>
</div>
<div class="row">
<div class="col-md-12 col-xs-12">
<svg ></svg>
</div>
</div>
<div class="row">
<div class="col-md-1 col-xs-1"></div>
<div class="col-md-10 col-xs-10">
<p>
By <a href="http://johnguerra.co">John Alexis Guerra Gómez</a> and <a href="https://github.com/tonmcg">Tonmcg</a>
</p>
</div> <!-- col-md-10 -->
<div class="col-md-1">
</div>
</div> <!-- .row -->
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-legend/2.11.0/d3-legend.min.js"></script>
<!-- Bootstrap -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="main.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45612277-1', 'auto');
ga('send', 'pageview');
</script>
</body>