-
Notifications
You must be signed in to change notification settings - Fork 1
/
baseline.html
179 lines (152 loc) · 6.34 KB
/
baseline.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
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.24/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.24/dijit/themes/claro/claro.css">
<style type="text/css" id="title-font">
.sections h1, .sections h2, .sections h3, .sections h4, .sections h5, .sections h6
{ font-family: 'open_sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;}
</style>
<style type="text/css" id="body-font">
.sections { font-family: 'noto_serif', 'Georgia', 'Hoefler Text', 'Palatino', cursive;}
p.section-layout-sequence { font-size: 12px; line-height: 150%; text-align: center; }
</style>
<style>
@media screen and (min-width: 320px) and (max-width: 700px)
{
.sections
{
width: 100%;
height: 600px;
text-align:center;
}
ul {list-style-type:none; }
ul li
{
padding:10px;
}
}
@media screen and (min-width: 700px) and (max-width: 1280px)
{
.sections
{
width: 100%;
height:600px;
text-align:center;
}
ul {list-style-type:none; }
ul li
{
padding:10px;
}
}
@media screen and (min-width: 1281px) and (max-width: 1500px)
{
.sections
{
width: 100%;
height: 600px;
text-align:center;
}
ul {display: inline;}
ul li {
width:25%;
padding-left: 4px;
display: inline;
}
}
@media screen and (min-width: 1501px) and (max-width: 4000px)
{
.sections
{
width: 1500px;
height: 600px;
text-align:center;
}
ul {display: inline;}
ul li {
width: 25%;
padding-left: 4px;
display: inline;
}
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script>
function loadTableau()
{
var cc = document.getElementById("cc").value;
var population = document.getElementById("population").value;
var gdp = document.getElementById("gdp").value;
var tc = document.getElementById("tc").value;
var output = "";
output += "<p class ='section-layout-sequence' align='center'> You selected Population growth = "+ population+", GDP = "+gdp+", Climate change = "+ cc+ ", and Technology change = "+ tc+". See the simulation results (population at risk of hunger, Production, and Yield) based on given assumptions, comparing to the baseline (SSP2-NoCC).</p>";
console.log("output:"+output);
if (cc === "MIRO")
document.getElementById("tableau").innerHTML = output+ "<iframe src='https://public.tableau.com/views/interactiveScenario2/MIRO?:embed=true&:showVizHome=no' width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center'></iframe>";
else if (cc === "IPSL")
document.getElementById("tableau").innerHTML = output+"<iframe src='https://public.tableau.com/views/interactiveScenario2/IPSL?:embed=true&:showVizHome=no' width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center'></iframe>";
else if (cc === "GFDL")
document.getElementById("tableau").innerHTML = output+"<iframe src='https://public.tableau.com/views/interactiveScenario2/GFDL?:embed=true&:showVizHome=no' width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center'></iframe>";
else if (cc === "HGEM")
document.getElementById("tableau").innerHTML = output+"<iframe src='https://public.tableau.com/views/interactiveScenario2/HGEM?:embed=true&:showVizHome=no' width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center'></iframe>";
else
document.getElementById("tableau").innerHTML =output+ "<iframe src='https://public.tableau.com/views/interactiveScenario2/HGEM?:embed=true&:showVizHome=no' width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center'></iframe>";
}
</script>
<div class="sections" align="center">
<ul>
<li id = "one"> <label> Population </label><select id="population" onchange="loadTableau()" >
<option>Shared Social economic Pathway (SSP2) </option>
</select> </li>
<li id = "two"><label>GDP</label> <select id="gdp" onchange="loadTableau()" >
<option>Shared Social economic Pathway (SSP2) </option>
</select></li>
<li id = "three"> <label>Climate change</label><select id="cc" onchange="loadTableau()" >
<option>MIRO</option>
<option>IPSL</option>
<option>GFDL</option>
<option selected="selected">HGEM</option>
</select> </li>
<li id = "four"> <label>Technology change</label><select id="tc" onchange="loadTableau()" >
<option>Not yet available</option></select> </li>
</ul>
<!--
<table id="responsive-table">
<thead>
<tr>
<th>Population growth</th>
<th>GDP</th>
<th>Climate change</th>
<th>Technology change</th>
</tr>
</thead>
<tbody>
<tr>
<td><select id="population" onchange="loadTableau()" >
<option>Shared Social economic Pathway (SSP2) </option>
</select></td>
<td><select id="gdp" onchange="loadTableau()" >
<option>Shared Social economic Pathway (SSP2) </option>
</select></td>
<td><select id="cc" onchange="loadTableau()" >
<option>MIRO</option>
<option>IPSL</option>
<option>GFDL</option>
<option selected="selected">HGEM</option>
</select></td>
<td><select id="tc" onchange="loadTableau()" ><option>
<option>Not yet available</option></select></td>
</tr>
</tbody>
</table>
-->
<div id="tableau" align="center">
<p class ='section-layout-sequence' align="center">This default simulation results were generated, based on the following assumptions: Population growth = Social conomic Pathway 2 (SSP2), GDP = Social conomic Pathway 2 (SSP2), Climate change = HGEM, and Technology change = N/A. See the simulation results including Population at risk of hunger, Production, and Yield, comparing with the baseline (SSP2-NoCC). </p>
<iframe src="https://public.tableau.com/views/interactiveScenario2/HGEM?:embed=true&:showVizHome=no" width='100%' height ='100%' frameborder='0' scrolling='no' id='iframe' align='center' ></iframe>
</div>
</div>
</body>
</html>