forked from peterhadlaw/personal-website-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simpleviz.html
49 lines (47 loc) · 1.96 KB
/
simpleviz.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Dropdown Events</title>
<link rel="stylesheet" href="assets/css/main.css" />
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<h2>Government Spending</h2>
<p>Numbers on hover reflect the rounded USD (in millions) spent in each category in 2017.</p>
<select id="selDataset">
<option value="australia">Australia</option>
<option value="brazil">Brazil</option>
<option value="uk">United Kingdom</option>
<option value="mexico">Mexico</option>
<option value="singapore">Singapore</option>
<option value="southAfrica">South Africa</option>
</select>
<div id="pie"></div>
<p>Data Sources:<br />
<ul>
<li>
<a href="https://data.worldbank.org/indicator/NE.CON.GOVT.ZS">General government final consumption expenditure (% of GDP)</a>
</li>
<li>
<a href="https://data.worldbank.org/indicator/SE.XPD.TOTL.GD.ZS">Government expenditure on education, total (% of GDP)</a>
</li>
<li>
<a href="https://data.worldbank.org/indicator/SH.XPD.GHED.GD.ZS">Domestic general government health expenditure (% of GDP)</a>
</li>
<li>
<a href="https://data.worldbank.org/indicator/GB.XPD.RSDV.GD.ZS">Research and development expenditure (% of GDP)</a>
</li>
<li>
<a href="https://data.worldbank.org/indicator/NY.GDP.MKTP.CD">GDP (current US$)</a>
</li>
</ul>
</p>
<script src="data.js"></script>
<script src="plots.js"></script>
</body>
</html>