-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3js_word_cloud.html
179 lines (155 loc) · 8.15 KB
/
d3js_word_cloud.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>
<title>D3 SVG Primitives</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="stylesheet" href="./css/d3js.css">
</head>
<body>
<!-- ******** Top header ************ -->
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="./index.html">FIT5147 Data Viz Project</a>
<!-- <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="#">Sign out</a>
</li>
</ul> -->
</nav>
<div class="container-fluid">
<!-- ******** Navigation ************ -->
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" href="./index.html">
<span data-feather="database"></span>
Data Overview
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="./d3js_word_cloud.html">
<span data-feather="bar-chart-2"></span>
Customer Satisfaction
</a>
</li>
<li class="nav-item">
<a class="nav-link " href="./d3js_network_graph.html">
<span data-feather="activity"></span>
Product Similarity
</a>
</li>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Saved reports</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<!-- <li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Current month
</a>
</li> -->
</ul>
</div>
</nav>
<!-- /******** Navigation ************ -->
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4" id="first" >
<!-- Dashboard Header -->
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h2 class="bd-title text-primary">Are customers happy to buy products?</h2>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<button class="btn btn-sm text-success btn-outline-secondary">Share</button>
<button onclick="printFunc()" class="btn btn-sm text-success btn-outline-secondary">Export</button>
</div>
<!-- <button class="btn btn-sm text-success btn-outline-secondary dropdown-toggle">
<span data-feather="calendar"></span>
This week
</button> -->
</div>
</div>
<!-- /Dashboard Header -->
<!-- Visualization : Network Graph -->
<div class="row justify-content-md-center full-height">
<div class="col-md-12">
<div class="card border-secondary mb-3">
<div class="card-header">
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text text-success" for="asin_selector">Filter by ASIN</label>
</div>
<select class="custom-select" id="asin_selector">
<option selected>Choose...</option>
</select>
</div>
</div>
<div class="card-body text-secondary">
<!-- Display Section -->
<div class="row hard-svg-size" id="word_cloud"></div>
</div>
</div>
</div>
</div>
<!-- Detail Content -->
<hr>
<div class="row justify-content-md-center full-height" id="second" >
<!-- D3js Map Area -->
<div class="col-md-7 exclude-nav-bar">
<h3 class="text-success">Where do the reviews come from?</h3>
<div id="review_map" style="position: relative; width: 100%; max-height: 700px; min-height: 500px"></div>
</div>
<div class="col-md-5 exclude-nav-bar">
<!-- Horitzontal bar chart -->
<!-- <div class="card border-secondary mb-3">
<div class="card-header"><strong>Top Reviewed Albums</strong> : Bag of Words</div>
<div class="card-body hard-bar-size" id="hori-bar-chart"> -->
<!-- horizontal bar charts : Drawing Area -->
<!-- </div>
</div> -->
<h3 class="text-success" align="center">Top Reviewed Albums</h3>
<div class="hard-svg-size" id="hori_bar_chart"></div>
</div>
</div>
<!-- story button : floating butn -->
<a href="#first" id="float-btn">
<button type="button" class="btn btn-success btn-lg btn-circle btn-play faa-burst animated">
<span data-feather="play" class=""></span>
</button>
</a>
</main>
</div>
</div>
<div class="container-fluid">
<div class="row flex-xl-nowrap">
<div class="d-none d-xl-block col-xl-2 bd-toc">
</div>
</div>
<!-- content -->
<div class="row">
<div class="col-7 col-md-7">
</div>
<div class="col-5 col-md-5">
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<script>
feather.replace()
</script>
<!-- External Libs -->
<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="./lib/topojson.v1.min.js"></script>
<script src="./lib/datamaps.world.hires.min.js"></script>
<script type="text/javascript" src="./lib/cloud_algorithm.js"></script>
<script type="text/javascript" src="./js/d3js_word_cloud.js"></script>
<script type="text/javascript" src="./js/d3js.js"></script>
</body>
</html>