-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
375 lines (326 loc) · 17.4 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
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<title>ngd3</title>
<!-- Required stylesheet -->
<link rel="stylesheet" href="core/deck.core.css">
<!-- Extension CSS files go here. Remove or add as needed. -->
<link rel="stylesheet" media="screen" href="extensions/goto/deck.goto.css">
<link rel="stylesheet" media="screen" href="extensions/menu/deck.menu.css">
<link rel="stylesheet" media="screen" href="extensions/navigation/deck.navigation.css">
<link rel="stylesheet" media="screen" href="extensions/status/deck.status.css">
<link rel="stylesheet" media="screen" href="extensions/hash/deck.hash.css">
<link rel="stylesheet" media="screen" href="extensions/scale/deck.scale.css">
<!-- Style theme. More available in /themes/style/ or create your own. -->
<link rel="stylesheet" media="screen" href="themes/style/mnml.css">
<!-- Transition theme. More available in /themes/transition/ or create your own. -->
<link rel="stylesheet" media="screen" href="themes/transition/horizontal-slide.css">
<link rel="stylesheet" media="screen" href="styles/style.css">
<!-- Basic black and white print styles -->
<!-- Required Modernizr file -->
<script src="modernizr.custom.js"></script>
<script src="lib/angular.min.js"></script>
<script src="lib/d3.min.js"></script>
<script src="lib/topojson.min.js"></script>
<script src="lib/highlight.min.js"></script>
<script type="text/javascript" src="scripts/app.js"></script>
<script type="text/javascript" src="scripts/SimpleMiniMapCtrl.js"></script>
<script type="text/javascript" src="scripts/TodoController.js"></script>
<script type="text/javascript" src="scripts/DemoPlaygroundCtrl.js"></script>
<script type="text/javascript" src="scripts/SimpleMiniMapWithSearchCtrl.js"></script>
<script type="text/javascript" src="scripts/MapCanvasDirective.js"></script>
<script type="text/javascript" src="scripts/HelloDirective.js"></script>
<script type="text/javascript" src="lib/angular-highlightjs.js"></script>
</head>
<body ng-app="ngd3">
<div class="deck-container">
<!-- Begin slides. Just make elements with a class of slide. -->
<section class="slide">
<h1> <img height="91" src="img/AngularJS-large.png"> Directives <br> for
<svg width="96" height="91" style="position:relative;top:2px;">
<linearGradient id="logo-gradient-1" gradientUnits="userSpaceOnUse" x1="37.2417" y1="7.0552" x2="97.9669" y2="67.7803">
<stop offset="0" stop-color="#F9A03C"/>
<stop offset="1" stop-color="#F7974E"/>
</linearGradient>
<linearGradient id="logo-gradient-2" gradientUnits="userSpaceOnUse" x1="-8.0391" y1="17.2148" x2="45.724" y2="70.978">
<stop offset="0" stop-color="#F9A03C"/>
<stop offset="1" stop-color="#F7974E"/>
</linearGradient>
<linearGradient id="logo-gradient-3" gradientUnits="userSpaceOnUse" x1="11.9321" y1="36.5513" x2="66.3901" y2="91.0092">
<stop offset="0" stop-color="#F9A03C"/>
<stop offset="1" stop-color="#F7974E"/>
</linearGradient>
<linearGradient id="logo-gradient-4" gradientUnits="userSpaceOnUse" x1="1.6533" y1="-1.6533" x2="86.899" y2="83.5924">
<stop offset="0" stop-color="#F26D58"/>
<stop offset="1" stop-color="#F9A03C"/>
</linearGradient>
<linearGradient id="logo-gradient-5" gradientUnits="userSpaceOnUse" x1="45.2446" y1="-9.5483" x2="108.0998" y2="53.3068">
<stop offset="0" stop-color="#B84E51"/>
<stop offset="1" stop-color="#F68E48"/>
</linearGradient>
<linearGradient id="logo-gradient-6" gradientUnits="userSpaceOnUse" x1="6.6323" y1="64.3193" x2="49.6788" y2="107.3658">
<stop offset="0" stop-color="#F9A03C"/>
<stop offset="1" stop-color="#F7974E"/>
</linearGradient>
<path fill="url(#logo-gradient-1)" d="M95.82,65.857c0.043-0.418,0.074-0.84,0.098-1.264c0.029-0.502-30.211-29.194-30.211-29.194h-0.723C64.984,35.399,95.635,67.73,95.82,65.857z"/>
<path fill="url(#logo-gradient-2)" d="M31.302,55.904c-0.04,0.088-0.08,0.176-0.121,0.264c-0.043,0.092-0.087,0.184-0.131,0.275c-0.964,2.01,13.495,16.145,14.658,14.428c0.053-0.076,0.106-0.156,0.159-0.232c0.059-0.09,0.117-0.176,0.175-0.266C46.972,68.961,31.715,54.986,31.302,55.904z"/>
<path fill="url(#logo-gradient-3)" d="M51.734,75.781c-0.041,0.09-0.332,0.582-0.598,0.842c-0.045,0.09,14.115,14.133,14.115,14.133h1.275C66.527,90.756,53.234,76.375,51.734,75.781z"/>
<path fill="url(#logo-gradient-4)" d="M95.938,64.338c-0.662,14.68-12.807,26.418-27.645,26.418h-2.006L51.469,76.158c1.219-1.719,2.352-3.5,3.361-5.357h13.463c4.258,0,7.723-3.463,7.723-7.723c0-4.258-3.465-7.723-7.723-7.723h-7.967c0.607-3.209,0.939-6.518,0.939-9.903c0-3.437-0.338-6.793-0.967-10.053h4.949l30.604,30.155C95.887,65.15,95.916,64.746,95.938,64.338z M8.05,0H0v19.955h8.05c14.06,0,25.5,11.437,25.5,25.497c0,3.825-0.853,7.456-2.369,10.716l14.686,14.471c4.822-7.215,7.641-15.877,7.641-25.187C53.508,20.39,33.115,0,8.05,0z"/>
<path fill="url(#logo-gradient-5)" d="M68.293,0H35.695c7.962,4.861,14.555,11.754,19.047,19.955h13.551c4.258,0,7.723,3.463,7.723,7.723c0,4.259-3.465,7.722-7.723,7.722h-3.045l30.604,30.155c0.072-0.818,0.117-1.641,0.117-2.477c0-6.727-2.414-12.898-6.422-17.701c4.008-4.801,6.422-10.973,6.422-17.699C95.969,12.417,83.555,0,68.293,0z"/>
<path fill="url(#logo-gradient-6)" d="M66.287,90.756H35.928C42.039,86.982,47.322,82,51.469,76.158L66.287,90.756z M45.867,70.639L31.182,56.168C27.125,64.887,18.284,70.951,8.05,70.951H0v19.953h8.05C23.804,90.904,37.709,82.846,45.867,70.639z"/>
</svg></h1>
<h2>Enhancing the dynamic behavior of data visualization</h2>
<ul>
<li><h3>D3 and AngularJS basics</h3></li>
<li><h3>Mini map application via D3 and AngularJS</h3></li>
</ul>
</section>
<section class="slide">
<h1>Me</h1>
<h2>Front-end developer @Argela Technologies</h2>
<ul>
<li><h3>Developing UI of a SDN based network management and monitoring system</h3></li>
<li><h3>Developing a network library for visualazing the network topology via D3JS and AngularJS</h3></li>
</ul>
</section>
<section class="slide">
<h1>AngularJS</h1>
<h2>What?</h2>
<ul>
<li><h3>Framework for dynamic web apps</h3></li>
<li><h3>SPA specialized</h3></li>
<li><h3>Supports MVW (Model View Whatever) such as MVC and MVVM</h3></li>
<li><h3>Powerful data binding</h3></li>
<li><h3>Easy to test</h3></li>
</ul>
<h2>Sponsored by Google</h2>
<h2>Used by</h3></h2>
<ul>
<li><h3>nasa.gov, istockphoto.com, mamba.ru, msnbc.com, dfiles.eu</h3></li>
</ul>
</section>
<section class="slide">
<h1>ng-Basics</h1>
<div hljs include="'ng-basic'" language="html"> </div>
<div>
<label style="font-size: 1.5em;">Name:</label>
<input style="font-size: 1.5em;" type="text" ng-model="yourName" placeholder="Enter a name here">
<h3>Hello {{yourName}}!</h3>
</div>
</section>
<script type="text/ng-template" id="ng-basic">
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<h1>Hello {{yourName}}!</h1>
</div>
</script>
<section class="slide">
<h1>Ng Todo List</h1>
<div class="inline">
<iframe width="700" height="450" src="http://jsfiddle.net/yaprak/duLkerLo/4/embedded/html,js" frameborder="0"></iframe>
<div style="float: right; margin-left: 0.4em" ng-controller="TodoController">
<span>{{remaining()}} of {{todos.length}} remaining</span>
[ <a href="" ng-click="archive()">archive</a> ]
<ul class="unstyled">
<li ng-repeat="todo in todos">
<input type="checkbox" ng-model="todo.done">
<span class="done-{{todo.done}}">{{todo.text}}</span>
</li>
</ul>
<form ng-submit="addTodo()">
<input type="text" ng-model="todoText" size="30"
placeholder="add new todo here">
<input class="btn-primary" type="submit" value="add">
</form>
</div>
</div>
</section>
<section class="slide">
<h1>D3JS</h1>
<h2>What?</h2>
<ul>
<li><h3>JS visualization library</h3></li>
<li><h3>Geometry (Voronoi, Quadtree, Polygon)</h3></li>
<li><h3>Geography (Map, Path)</h3></li>
<li><h3>Layouts (Force - with gravitational force definitions, pie, tree, treemap)</h3></li>
<li><h3>Behavioral properties (zoom, drag)</h3></li>
<li><h3>Transitions and animations</h3></li>
</ul>
<h2>Used in</h3></h2>
<ul>
<li><h3>The New York Times, Disqus, Github</h3></li>
</ul>
</section>
<section class="slide">
<h1>D3 Basic</h1>
<div class="inline">
<h2>Add chart manually</h2>
<iframe width="500" height="300" src="http://jsfiddle.net/yaprak/duLkerLo/5/embedded/html,result/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</div>
<div class="inline" style="margin-left: 0.4em">
<h2>Add chart with D3</h2>
<iframe width="500" height="300" src="http://jsfiddle.net/yaprak/duLkerLo/8/embedded/html,js,result/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</div>
</section>
<section class="slide">
<h1>D3 - Force Layout</h1>
<iframe width="90%" height="450" src="http://mbostock.github.io/d3/talk/20111116/force-collapsible.html" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</section>
<section class="slide">
<h1>D3 - Us</h1>
<h3>When we were young...</h3>
<iframe width="90%" height="350" src="http://bl.ocks.org/mbostock/raw/1136236/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</section>
<section class="slide">
<h1>MINI MAP APP</h1>
<h2>Lets develop a mini map application</h2>
<ul>
<li><h3>Draw a map only with D3</h3></li>
<li><h3>Add a search functionality with AngularJS</h3></li>
<li><h3>Brief intro to AngularJS Directives</h3></li>
<li><h3>Turn this map application into an AngularJS Directive</h3></li>
</ul>
</section>
<section class="slide">
<h1>MAP with D3</h1>
<div class="inline">
<iframe width="600" height="450" src="http://jsfiddle.net/yaprak/duLkerLo/24/embedded/js,html/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</div>
<div class="inline" ng-controller="SimpleMiniMapCtrl">
<div class="mini-map"></div>
</div>
</section>
<section class="slide">
<h1>Search Place</h1>
<div class="inline">
<iframe width="600" height="480" src="http://jsfiddle.net/yaprak/duLkerLo/31/embedded/js,html/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</div>
<div class="inline" ng-controller="SimpleMiniMapWithSearchCtrl">
<input ng-model="inpSearch"><button ng-click="search()">Search</button>
<div id="searchable-map" class="mini-map-search"></div>
</div>
</section>
<section class="slide">
<h1>Drawbacks</h1>
<h2>Single Map: Ok!</h2>
<h2>Multiple Maps?</h2>
<ul>
<li><h3>We may have different map size, map init parameters</h3></li>
<li><h3>Is it ok to have parameters such as width1(map1), width2(map2), etc.?</h3></li>
<li><h3>It would be great to have DOM element that holds this map behavior!</h3></li>
<li><h3>Angular Directive is the best match for this need!</h3></li>
</ul>
</section>
<section class="slide">
<h1>Directives</h1>
<h2>Attach specified behaviours to DOM elements</h2>
<iframe class="in" width="43%" height="400" src="http://jsfiddle.net/yaprak/duLkerLo/32/embedded/html,js/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
<iframe class="in" width="30%" height="400" src="http://jsfiddle.net/yaprak/duLkerLo/32/embedded/result/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</section>
<section class="slide" ng-controller="DemoPlaygroundCtrl">
<h1>Map Directive</h1>
<h2>Lets play with the parameters!</h2>
<form role="form">
<input class="map-form" ng-model="rotateYaw" type="text" placeholder="Enter Rotate Yaw!">
<input class="map-form" ng-model="rotatePitch" type="text" placeholder="Enter Rotate Pitch!">
<input class="map-form" ng-model="centerLon" type="text" placeholder="Enter Center Lon!">
<input class="map-form" ng-model="centerLat" type="text" placeholder="Enter Center Lat!">
<input class="map-form" ng-model="scale" type="text" placeholder="Enter Scale!">
<button class="map-form" class="btn btn-default" ng-click="update()">Update</button>
</form>
<script type="text/ng-template" id="compileMe" class="ng-scope"><map-canvas id="canvas1" rotate-yaw="{{rotateYaw}}" rotate-pitch="{{rotatePitch}}" center-lon="{{centerLon}}" center-lat="{{centerLat}}" scale="{{scale}}"></map-canvas></script>
<div hljs include="'compileMe'" language="html" compile="true"> </div>
<map-canvas data="{{data}}" id="canvas4" rotate-yaw="{{rotateYaw}}" rotate-pitch="{{rotatePitch}}" center-lon="{{centerLon}}" center-lat="{{centerLat}}" scale="{{scale}}" ng-init="init(-45, 0, 0, 37, 1200)"></map-canvas>
</section>
<section class="slide">
<h1>Multiple Maps</h1>
<h2>Directive allows me to define my map in single line!</h2>
<pre><code><map-canvas id="canvas2" rotate-yaw="-45" rotate-pitch="0" center-lon="0" center-lat="37" scale="1200"></map-canvas>
<div> map-canvas id="canvas3" rotate-yaw="-30" rotate-pitch="0" center-lon="0" center-lat="45" scale="800"></div></code></pre>
<div>
<map-canvas id="canvas2" rotate-yaw="-45" rotate-pitch="0" center-lon="0" center-lat="37" scale="1200"></map-canvas>
<map-canvas id="canvas3" rotate-yaw="-30" rotate-pitch="0" center-lon="0" center-lat="45" scale="800"></map-canvas>
</div>
</section>
<section class="slide">
<h1>Map Directive</h1>
<iframe width="85%" height="550" src="http://jsfiddle.net/yaprak/cxgco8ra/11/embedded/js/presentation" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
</section>
<section class="slide">
<h1>Summary</h1>
<h3>Directives allows us to create new DOM elements with specific behavior</h3>
<h3>D3 functionality is added behind a directive</h3>
<h3>With D3 you can visualize your data in various types of ways such as charts, maps, etc.</h3>
<h3>AngularJS will be handy to turn this module to a reusable DOM!</h3>
</section>
<section class="slide">
<h1>References</h1>
<h3>More examples about D3: D3 Gallery</h3>
<h3>Learn D3 Basics: Interactive Data Visualization for the Web</h3>
<h3>@Lean Pub: D3 Tips and Tricks</h3>
<h3>@Lean Pub: D3 on AngularJS</h3>
<h3>https://angularjs.org/</h3>
<h3>https://d3js.org/</h3>
<h3>Watch AngularJS conference videos given at https://angularjs.org/</h3>
</section>
<section class="slide">
<h1>Contact Info</h1>
<h3>website: www.yaprakayazoglu.com</h3>
<h3>email: yaprak.ayazoglu@gmail.com</h3>
<h3>github: ankakusu</h3>
<h3>twitter: @yaprakaya</h3>
</section>
<section class="slide">
<h1>Thanks!</h1>
<h2>Any Questions?</h2>
<h2>Contact Info</h2>
<ul><h3>website: www.yaprakayazoglu.com</h3></ul>
<ul><h3>email: yaprak.ayazoglu@gmail.com</h3></ul>
<ul><h3>github: ankakusu</h3></ul>
<ul><h3>twitter: @yaprakaya</h3></ul>
</section>
<!-- End slides. -->
<!-- Begin extension snippets. Add or remove as needed. -->
<!-- deck.navigation snippet -->
<a href="#" class="deck-prev-link" title="Previous">←</a>
<a href="#" class="deck-next-link" title="Next">→</a>
<!-- deck.status snippet -->
<p class="deck-status">
<span class="deck-status-current"></span>
/
<span class="deck-status-total"></span>
</p>
<!-- deck.goto snippet -->
<form action="." method="get" class="goto-form">
<label for="goto-slide">Go to slide:</label>
<input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
<datalist id="goto-datalist"></datalist>
<input type="submit" value="Go">
</form>
<!-- deck.hash snippet -->
<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
<!-- End extension snippets. -->
</div>
<!-- Required JS files. -->
<script src="jquery.min.js"></script>
<script src="core/deck.core.js"></script>
<!-- Extension JS files. Add or remove as needed. -->
<script src="core/deck.core.js"></script>
<!--<script src="extensions/hash/deck.hash.js"></script>-->
<script src="extensions/menu/deck.menu.js"></script>
<script src="extensions/goto/deck.goto.js"></script>
<script src="extensions/status/deck.status.js"></script>
<script src="extensions/navigation/deck.navigation.js"></script>
<script src="extensions/scale/deck.scale.js"></script>
<!-- Initialize the deck. You can put this in an external file if desired. -->
<script>
$(function() {
$.deck('.slide');
});
</script>
</body>
</html>