-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathejscreen-report-digest.html
273 lines (236 loc) · 11.8 KB
/
ejscreen-report-digest.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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!--
***************************************************************************************************
* Title: EJScreen Report Digest
* Description: The EJScreen report digest presents a detailed analysis of Environmental Justice (EJ)
* Index or Supplemental Index percentiles, showing their calculations at both the state and national levels
* for specific block group.
*
* Author: SAIC, EPA OMS Contractor
* Creation Date: 01/22/2024
* Last Updated: 01/22/2024
****************************************************************************************************
-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>EJScreen Report API</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.11/esri/css/main.css">
<link rel="SHORTCUT ICON" href="images/ej.ico" />
<link rel="stylesheet" href="css/bootstrap.css" />
<script language="javascript" type="text/javascript" src="mapdijit/javascript/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="mapdijit/javascript/jquery.colorPicker.js"></script>
<style>
body {
margin: 8px;
font-family: Verdana;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
#loadingDiv {
background-color: #FFFFFF;
border: 1px solid #CCCCCC;
display: none;
z-index: 500;
position: absolute;
left: 40%;
top: 50%;
}
.formTable {
background-color: #d9edf7;
width: 100%;
font-family: Verdana;
font-size: 11pt;
padding-top: 4px;
}
.blackfont {
color: Black !important;
}
.custompanel {
margin: 4px 15px 4px 15px;
word-wrap: break-word;
}
td,
th {
padding: 3px;
}
</style>
<script src="https://js.arcgis.com/4.11/"></script>
<script type="text/javascript" src="javascript/config.js"></script>
<script type="text/javascript" src="javascript/ejscreen-report-digest.js"></script>
<script>
$(document).ready(function () {
console.log("ready!");
$("#submitEJ").click(function () {
$("#ejIndexIndText").html($("#ejIndexSelect option:selected").text());
var radioValue = $("input[name='ejIndRadio']:checked").val();
$("#ejSelectedRadio").val(radioValue);
// var supplemental = radioValue === "suppl";
// alert(radioValue);
if (!$('#blockgroupId').val()) {
alert('Enter Blockgroup ID!');
return;
} else {
$('#resultPanel').show();
$("#stateSelected").html(getStateAbbr($('#blockgroupId').val()));
$("#regionSelected").html(getRegion($('#blockgroupId').val()));
}
});
$("#ejIndexSelect").change(function () {
// alert("changed");
$(".digestSpan").html("");
//$("#ejIndexIndText").html($( "#ejIndexSelect option:selected" ).text());
});
});
</script>
<script type="text/javascript">
</script>
</head>
<body>
<div class="container-fluid">
<div class="row padding">
<div class="custompanel">
<h4>EJScreen Report API
<a href="EJAPIinstructions.pdf" class="btn btn-link btn-sm" role="button" target="_blank"
title="Instruction">Help</a>
</h4>
</div>
</div>
<div class="row padding">
<div class="custompanel">
<form id="ejform" onsubmit="return false;">
<input type="hidden" name="namestr" value="" />
<table id="censusdiv" class="formTable">
<tr>
<td width="120px" nowrap>Blockgroup ID:</td>
<td align="left">
<!-- <input type="text" id="blockgroupId" value="391650316002" /> -->
<input type="text" id="blockgroupId" value="191731801001" />
</td>
</tr>
</table>
<table class="formTable">
<tr>
<td> <input type="radio" id="ejIndRadioBtn" name="ejIndRadio" value="ej" checked>
<label for="ejIndRadioBtn">EJ Index</label></td>
<td><input type="radio" id="ejSupplRadioBtn" name="ejIndRadio" value="suppl">
<label for="ejSupplRadioBtn">Supplemental Index</label></td>
<input type="hidden" name="ejSelectedRadio" value="" />
</tr>
<tr>
<td width="120px">EJ/Suppl Index:</td>
<td align="left">
<select name="ejIndexSelect" id="ejIndexSelect">
<option value="PM25" selected> Particulate Matter 2.5</option>
<option value="OZONE">Ozone</option>
<option value="DSLPM">Diesel Particulate Matter</option>
<option value="CANCER">Air Toxics Cancer Risk</option>
<option value="RESP">Air Toxics Respiratory HI</option>
<option value="RSEI_AIR">Toxics Releases to Air</option>
<option value="PTRAF">Traffic Proximity</option>
<option value="PRE1960PCT">Lead Paint</option>
<option value="PNPL">Superfund Proximity</option>
<option value="PRMP">RMP Facility Proximity</option>
<option value="PTSDF">Hazardous Waste Proximity</option>
<option value="UST">Underground Storage Tanks</option>
<option value="PWDIS">Wastewater Discharge</option>
</select>
</td>
</tr>
</table>
<table>
<tr>
<td colspan="2">
<button id="submitEJ" title="Get EJ Index">Submit</button>
</td>
</tr>
</table>
</form>
</div>
</div>
<div class="row padding" id="resultPanel" style="display: none;">
<div class="custompanel">
<div class="panel panel-info" id="reportdiv">
<div class="panel-heading blackfont">Results</div>
<div>
<span>State: </span><span id="stateSelected" class="digestSpan"></span>
<br />
<span>Region: </span><span id="regionSelected" class="digestSpan"></span>
<br />
<span>Blockgroup (BG): </span><span id="bgInput" class="digestSpan"></span>
<br />
<span>% people of color for BG=</span><span id="minorpct" class="digestSpan"></span>
<br />
<span>% low income for BG=</span><span id="lowincpct" class="digestSpan"></span>
<br />
<span>% disability for BG=</span><span id="disabilitypct" class="digestSpan"></span>
<br />
<span>% limited english speaking population for BG=</span><span id="lingpct" class="digestSpan"></span>
<br />
<span>% less than HS for BG=</span><span id="lesshspct" class="digestSpan"></span>
<br />
<span>% life expectancy for BG=</span><span id="lifexppct" class="digestSpan"></span>
<br />
<span>BG population=</span><span id="acstotpop" class="digestSpan"></span>
<br />
<div id="nationalPercentileId"></div>
<div id="statePercentileId"></div>
<br />
<span>Demographic Index for BG for USA = </span><span id="demoIndexTextUSA"></span>
<br />
<span id="demoFormulaValuesUSA"></span>
</br>
<span>Demographic Index for BG for USA= </span> <span id="demoIndex2USA" class="digestSpan"> </span>
<br />
<br />
<span>Demographic Index for BG for State = </span><span id="demoIndexText"> </span>
<br />
<span id="demoFormulaValues"></span>
</br>
<span>Demographic Index for BG for State= </span> <span id="demoIndex2" class="digestSpan"> </span>
<br />
<br/>
National <span class="indexClass">EJ Index</span>:<br />
<span class="ejIndexInd digestSpan"></span> <span class="indexClass">EJ Index </span><span> =
</span>
<span>National Percentile for Environmental Indicator *
Nation Demographic Index for BG </span>
<br />
<span id="demoCalsId"></span>
<br />
<span id="demoIndexFinalVal"></span>
<br />
<br />
State <span class="indexClass">EJ Index</span>:<br />
<span class="ejIndexInd digestSpan"></span> <span class="indexClass">EJ Index </span><span> = </span>
<span>State Percentile for Environmental Indicator * State Demographic Index for BG</span>
<br />
<span id="stateFormulaWithVal"></span>
<br />
<span id="stateFinalCalVal"></span>
<br />
<br />
<span class="indexClass">EJ Index</span><span> Percentile in USA = </span></span><span class="digestSpan"
id="ejIndexUSAPercentage"> </span>
<br />
<span class="indexClass">EJ Index</span><span> Percentile in State =</span></span><span class="digestSpan"
id="ejIndexStatePercentage"> </span>
<br/>
<br/>
<span>Environmental Indicators Percentile in USA </span> <span>= </span></span><span class="digestSpan" id="envIndUSAPercentage"> </span>
<br />
<span>Environmental Indicators Percentile in State </span> <span>= </span></span><span class="digestSpan" id="envIndStatePercentage"> </span>
</div>
</div>
</div>
</div>
</div>
</body>
</html>