-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
258 lines (223 loc) · 10.8 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!DOCTYPE HTML>
<head>
<!-- Metadata -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MLB Salaries with CartoDB</title>
<!-- CSS Files -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<link href="css/ion.rangeSlider.css" rel="stylesheet">
<link href="css/ion.rangeSlider.skinSimple.css" rel="stylesheet">
<style>
#map,
#map1 {
height: 400px;
padding: 0;
margin: 0;
width: 500px;
}
</style>
</head>
<body>
<!-- Header Space -->
<ul class="nav" id="side-menu">
<li class="nav-header">
<div id="header-div">
<img id="header-picture" alt="image" class="img-responsive" src="img/MLB-Panorama.jpg">
<!-- Public Domain Image -->
</div>
<div class="logo-element">
IN+
</div>
</li>
</ul>
<!-- Main Body and Charts -->
<div class="row wrapper border-bottom white-bg page-heading center-block">
<div class="col-lg-8 col-lg-offset-2">
<h2 class="pull-left" id="title">MLB Salaries</h2>
<button type="button" class="btn btn-success pull-right" style="margin-top:20px; background-color:#293846;" data-toggle="modal" data-target="#modal2">
About Project
</button>
</div>
</div>
<div class="modal inmodal fade" id="modal2" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title">MLB Payroll</h4>
</div>
<div class="modal-body">
<p>Player and team salaries have been steadily increasing for years. But does a higher payroll translate to more wins? This tool is used to visualize overall salary trends in the MLB from 2000 to 2014, and to compare how much teams spent on their payroll over the years, how it translated into wins and how effective teams are at spending their money. </p>
<p>The maps represent the amount of money each team spent on their overall payroll for the selected year. Click on a team to find out more info for the two selected years and click another team on the opposite map to compare.</p>
<p>The line graph shows the overall trend of the average MLB payroll (grey line) and how it has increased over the years. Select a team to see their spending trends and how they compare to the league average.
</p>
<p>The Pie charts show how many wins each team had for the given seasons and how well the team spent their money to obtain the wins. Total wins is how many wins the team had for the selected season compared to the .500 mark of 81 wins. Cost per win compares overall season payroll with the season wins to determine how effective each team spends their money. Cost per win is calculated by the total payroll divided by number of wins.
</p>
<p>All MLB data downloaded from the Lahman’s baseball database
<a href="http://seanlahman.com/baseball-archive/statistics">http://seanlahman.com/baseball-archive/statistics</a>
<br> MLB logos downloaded from <a href="http://github.com/teamcolors/teamcolors.github.io">https://github.com/teamcolors/teamcolors.github.io</a>
<br> Yankee stadium panoramic field picture <a href="http://public-domain.pictures/view/image/id/1441973100#!Yankee+Stadium+Panorama">http://public-domain.pictures/view/image/id/1441973100#!Yankee+Stadium+Panorama</a>
</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="wrapper wrapper-content">
<!-- Frame for first maps and graphs -->
<table id="tab_1">
<thead>
<th class="custom" colspan="2">
<h1>MLB Annual Payroll</h1>
</th>
</thead>
<tbody>
<tr class="custom">
<td class="custom2">
<h3 class='year1'>2000</h3>
</td>
<td class="custom2">
<h3 class='year2'>2014</h3>
</td>
</tr>
<tr>
<!-- Map 1 -->
<td>
<div id="map"></div>
</td>
<!-- Map 2 -->
<td>
<div id="map1"></div>
</td>
</tr>
<div>
<tr>
<td>
<center>
<h3 id="team1" style="padding:20px;">Select team to compare</h3>
</center>
</td>
<td>
<center>
<h3 id="team2" style="padding:20px;">Select team to compare</h3>
</center>
</td>
</tr>
</div>
<tr>
<td id="canvas" colspan="2">
<div>
<input type="text" id="slide" name="Years" value="" />
</div>
</td>
</tr>
<tr>
<td class="custom">
<h1 id="graphTitle">Average MLB Salary</h1>
</td>
<td id="legend"></td>
</tr>
<!-- Line Graph -->
<tr>
<td id="canvas" colspan="2">
<canvas id="lineChart"></canvas>
</td>
</tr>
<tr>
<td id="canvas" colspan="2">
<div>
<h1 class="text-center">Total Wins</H1>
</div>
</td>
</tr>
<div>
<tr>
<td>
<center>
<h2 class='year1'>2000</h2>
</center>
</td>
<td>
<center>
<h2 class='year2'>2014</h2>
</center>
</td>
</tr>
</div>
<tr>
<td>
<canvas id="polar1"></canvas>
</td>
<td>
<canvas id="polar2"></canvas>
</td>
</tr>
<tr>
<td id="canvas" colspan="2">
<div>
<h1 class="text-center">Cost per Win</H1>
</div>
</td>
</tr>
<div>
<tr>
<td>
<center>
<h2 class='year1'>2000</h2>
</center>
</td>
<td>
<center>
<h2 class='year2'>2014</h2>
</center>
</td>
</tr>
</div>
<tr>
<td>
<canvas id="polar3"></canvas>
</td>
<td>
<canvas id="polar4"></canvas>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="footer fixed" id="foot" style="padding:0px 0px 5px 20px;">
<p style="margin:0px;"><img src="img/crestone-digital-logo-white-lg.jpg" alt="Crestone Digital" style="width:95px;height:45px;float:left;" align="bottom"> Software Solutions Provider
<br>
<b>Hire us for your next mapping project!</b>
<br> Website: <a href="http://www.crestonedigital.com" target="_blank">www.crestonedigital.com</a> Email: <a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
<!-- Javascript for Maps-->
<script src="http://cdn.crestonedigital.com/mapstats/mapstats.min.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.14/cartodb.js"></script>
<script src="js/jquery.eventemitter.js"></script>
<script src="js/L.Map.Sync.js"></script>
<script src="js/mlbMaps.js"></script>
<script src="js/jquery-2.1.1.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- Javascript for Line graph -->
<script src="js/Chart.min.js"></script>
<script src="js/lineGraph.js"></script>
<!-- Javascript for Slider -->
<script src="js/ion.rangeSlider.min.js"></script>
<!-- Javscript for Polar Graphs -->
<script src="js/polarGraph.js"></script>
<!-- Async Javascript -->
<script src="js/async.js"></script>
<script src="js/jquery.metisMenu.js"></script>
<!-- Javascript Controller Function -->
<script src="js/controller.js"></script>
</body>