-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
index.html
120 lines (95 loc) · 3.99 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
<head>
<title>World Bank Data Dashboard</title>
<!--import script files needed from plotly and bootstrap-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<!--navbar links-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
<a class="navbar-brand" href="#">World Bank Dashboard</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarTogglerDemo02"
aria-controls="navbarTogglerDemo02" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item">
<a class="nav-link" href="https://www.udacity.com">Udacity</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://data.worldbank.org/">World Bank Data</a>
</li>
</ul>
</div>
</nav>
<!--middle section-->
<div class="row">
<!--social media buttons column-->
<div class="col-1 border-right">
<div id="follow-me" class="mt-3">
<a href="#">
<img src="/static/img/linkedinlogo.png" alt="linkedin" class="img-fluid mb-4 ml-2">
</a>
<a href="#">
<img src="/static/img/githublogo.png" alt="github" class="img-fluid ml-2">
</a>
</div>
</div>
<!--visualizations column-->
<div class="col-11">
<!--chart descriptions-->
<div id="middle-info" class="mt-3">
<h2 id="tag-line">World Bank Data Dashboard</h2>
<h4 id="tag-line" class="text-muted">Top 10 World Economies Land Use</h4>
</div>
<!--charts-->
<div id="charts" class="container mt-3 text-center">
<!--top two charts-->
<div class="row">
<div class="col-6">
<div id="{{ids[0]}}"></div>
</div>
<div class="col-6">
<div id="{{ids[1]}}"></div>
</div>
</div>
<!--bottom two charts-->
<div class="row mb-6">
<div class="col-6">
<div id="chart3">
<div id="{{ids[2]}}"></div>
</div>
</div>
<div class="col-6">
<div id="chart4">
<div id="{{ids[3]}}"></div>
</div>
<div>
</div>
<!--TODO: Create another row and place a fifth chart in that row-->
</div>
<div>
</div>
<!--footer section-->
<div id="footer" class="container"></div>
</body>
<footer>
<script type="text/javascript">
// plots the figure with id
// id much match the div id above in the html
var figures = {{figuresJSON | safe}};
var ids = {{ids | safe}};
for(var i in figures) {
Plotly.plot(ids[i],
figures[i].data,
figures[i].layout || {});
}
</script>
</footer>
</html>