-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinvestment.index.php
133 lines (126 loc) · 4.72 KB
/
investment.index.php
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
<div class="grid_4 spaced-small" style="margin-right: 30px;">
<div class="ucd-pod ui-corner-all" id="map-inputs">
<h1 class="close-above">Grants Awarded</h1>
<p class="close-above">Discover Grants by clicking on map or using the options below.</p>
<? require_once('map.menu'); ?>
<fieldset>
<select id="agency" class="tooltip" title="Select a federal agency to see the<br/>grants they have funded.">
<option value="">NIH/NSF</option>
<option value="NIH">National Institutes of Health</option>
<option value="NSF">National Science Foundation</option>
</select>
</fieldset>
<fieldset class="close-below">
<div class="tooltip" title="Use the sliders on both ends to narrow the<br/>time range for years grants were awarded.">
<p> Year(s): <span class="slider" id="yrRg">2000-2009</span></p>
<div class="slider">
<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="yearSlider">
<div class="ui-slider-range ui-widget-header"></div>
<a style="left: 0%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a>
<div class="ui-slider-range ui-widget-header" ></div>
</div>
</div>
</div>
<div class="tooltip" title="Use the sliders on both ends to select<br/> grants awarded by dollar amount.">
<p> Amount: <span class="slider" id="amtRg">0.00-130.00</span>m</p>
<div class="slider">
<div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="amtSlider">
<div class="ui-slider-range ui-widget-header"></div>
<a style="left: 0%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a>
<div class="ui-slider-range ui-widget-header" ></div>
</div>
</div>
</div>
</fieldset>
<fieldset>
<p>Refine results by selecting institutions or topics:</p>
<div id="topTbl">
<h3><a href="#">Top Research Institutions</a></h3>
<div id="sectOrg" class="list tooltip" title="Select multiple institutions by clicking on<br/>each institution; to de-select, click again."></div>
<h3><a href="#">Top Topics</a></h3>
<div id="sectLabel" class="list tooltip" title="Select multiple topics by clicking on<br/>each topic; to de-select, click again."></div>
</div>
</fieldset>
<div id="downloadcsv"></div>
</div>
</div>
<div class="grid_11 omega spaced-small">
<div class="mapWrapper ui-widget-content ui-corner-all">
<div id="map"></div>
<div class="dataTables_wrapper" id="example_wrapper"></div>
</div>
</div>
<script src="js/map_framework_f.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
/* INIT STUFF -- MAY NOT BE ALL NECESSARY NOW */
google.load('maps', '3', { other_params: 'sensor=false' });
google.load("jqueryui", "1.8.4");
var G = google.maps;
var styles = [];
var markerClusterer = null;
var map = null;
var info = null;
var init = true;
var dataB = null;
var prevLine = null;
var kml = null;
var mousey = null;
var ctrl = false;
$(document).ready(function() {
<? require_once("js/map.js"); ?>
//set initial table
$.data($("#map")[0], "params", { table:"grant" });
$.data($("#map")[0], "latlng", null);
$("#yearSlider").slider({
range: true,
values: [2000, 2009],
min: 2000, max: 2009,
slide: function(event, ui) { slideChg("#yrRg", "year", ui, false); },
stop: function(event, ui) { slideChg("#yrRg", "year", ui, true); }
/*
values: [2009],
min: 2000, max: 2009,
slide: function(event, ui) { slideChg("#yrRg", "year", ui); }
*/
});
$("#amtSlider").slider({
range: true,
values: [0, 62],
min: 0, max: 62,
slide: function(event, ui) {
$("#amtRg").html(amtRg(ui));
},
stop: function(event, ui) {
$("#amtRg").html(amtRg(ui));
hoverStats = null;
var attrb = new Object();
attrb["amt"] = $("#amtRg").html();
setVal(attrb);
}
/*
values: [2009],
min: 2000, max: 2009,
slide: function(event, ui) { slideChg("#yrRg", "year", ui); }
*/
});
initializeGeo("#map", false);
<? if ($CD=="") { ?>
setVal({});
<? } else { ?>
setVal({CD:"<?=$CD?>", State:"<?=$State?>"});
<? } ?>
});
function amtRg(ui) {
rg = [];
for(i=0; i<2; i++)
if (ui.values[i] <= 20)
rg.push(((ui.values[i]*50000)/1000000).toFixed(2));
else if (ui.values[i] <= 38)
rg.push((((ui.values[i]-20)*500000+1000000)/1000000).toFixed(2));
else
rg.push((((ui.values[i]-38)*5000000+10000000)/1000000).toFixed(2));
return rg.join("-");
}
</script>
<script src="js/keydragzoom_packed.js" type="text/javascript"></script>
<!-- RL EDIT END -->