-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.html
641 lines (503 loc) · 26.1 KB
/
blog.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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-79254642-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-79254642-5');
</script>
<meta charset="utf-8">
<title>Yan Holtz's blog on data, science and visualization.</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Welcome to Yan Holtz's blog. I talk about data, science & viz, mainly using R and d3.js">
<meta name="keywords" content="Consulting,Freelance,Datascience,Training,Data,Dataviz,Datavisualization,Plot,Chart,Graph,R,Python,D3,Learning,Caveat,Pitfall,Mistake,Classification">
<meta name="author" content="Yan Holtz">
<!-- Control appearance when share by social media -->
<meta property="og:title" content="Yan Holtz's blog on data, science and visualization." />
<meta property="og:image" content="img/logo/logo.png" />
<meta property="og:description" content="Welcome to Yan Holtz's blog. I talk about data, science & viz, mainly using R and d3.js" />
<meta property='og:url' content="https://www.yan-holtz.com/blog.html" />
<meta property="og:type" content="website" />
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="css/agency.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg fixed-top" id="mainNav">
<div class="container">
<a href="index.html">
← YAN HOLTZ HOMEPAGE
</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav text-uppercase ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.html">Home Page</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- ======================= LANDING SECTION ======================= -->
<header class="masthead">
<div id="particles-js"></div>
<div class="textlanding">
<p style="display:inline; font-size: 35px">ONLY</p><p style="display:inline; font-size: 35px"> - </p><p style="display:inline; font-size: 35px">DATA</p>
<hr style="width: 100px; height: 1px; border:none;color:#333;background-color:#333;">
<br>
<ul class="list-inline social-buttons">
<li class="list-inline-item">
<a href="https://twitter.com/R_Graph_Gallery">
<i class="fa fa-twitter"></i>
</a>
</li>
<li class="list-inline-item social-buttons">
<a href="https://github.com/holtzy">
<i class="fa fa-github" style="color: white"></i>
</a>
</li>
<li class="list-inline-item social-buttons">
<a href="https://www.linkedin.com/in/yan-holtz-2477534a/">
<i class="fa fa-linkedin"></i>
</a>
</li>
</ul>
<br><br>
<p>Yan Holtz's <u>blog</u> on statistics, R and Dataviz. More or less linked with our world, always related to data.<br>Part of the <a href="https://www.r-bloggers.com">R bloggers</a> network.</p>
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="#blog">Visit</a>
</div>
<div class="arrowlanding">
<a class="js-scroll-trigger" href="#blog"><p style="font-size: 80px; color: #69b3a2">﹀</p></a>
</div>
</header>
<!-- scripts -->
<script src="js/particles.js"></script>
<script src="js/app.js"></script>
<!-- ======================== BLOG SECTION ============================ -->
<section id="blog" style="padding-top: 3%; padding-bottom: 3%">
<div class="container">
<div class="row">
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="blog/dataToViz.html"><p class="blogtitle">From Data to Viz - A classification of graphics based on input data format</p></a>
<p class="blogfeature">July 2018 - 6 minutes read</p>
<p class="blogtext">I’m delighted to announce a new dataviz project called <a href="https://www.data-to-viz.com">Data to Viz</a>. It is a classification of chart types based on input data format. It comes in the form of a decision tree leading to a set of potentially appropriate visualizations to represent the dataset.<span class="blogreadmore"> - <a href="blog/dataToViz.html">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="blog/pimpMyRmd.html"><p class="blogtitle">Pimp my RMD - A collection of tips for R Markdown</p></a>
<p class="blogfeature">April 2018 - 3 minutes read</p>
<p class="blogtext">R markdown creates interactive reports from R code. I’ve created a document that provides a few tips I use on a daily basis to improve the appearance of my html outputs (my memory aid). This document is built using R Markdown and hosted on Github.<span class="blogreadmore"> - <a href="blog/pimpMyRmd.html">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/a-smooth-transition-between-chloropleth-and-cartogram/"><p class="blogtitle">Map: a smooth transition to cartogram with R</p></a>
<p class="blogfeature">January 2018 - 9 minutes read</p>
<p class="blogtext">This post describes how to make a smooth transition between a <a href="https://www.r-graph-gallery.com/chloropleth-map/">choropleth map</a> and a <a href="https://github.com/sjewo/cartogram">cartogram</a>. It starts by doing a basic map of Africa and then distorts country size using the cartogram library. <a href="https://www.r-graph-gallery.com/portfolio/ggplot2-package/">Ggplot2</a> is then used to make a nice choropleth version. Finally the tweenr and the gganimate libraries build a smooth animation between both maps.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/a-smooth-transition-between-chloropleth-and-cartogram/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/how-to-draw-connecting-routes-on-map-with-r-and-great-circles/"><p class="blogtitle">How to draw connecting routes on map with R and great circles</p></a>
<p class="blogfeature">June 2017 - 8 minutes read</p>
<p class="blogtext">This post explains how to draw connection lines between several localizations on a map, using <a href="https://www.r-graph-gallery.com">R</a>. The method suggested here relies on the use of the gcIntermediate function from the <a href="https://cran.r-project.org/web/packages/geosphere/vignettes/geosphere.pdf">geosphere package</a>. Instead of making straight lines, it offers to draw the shortest routes, using <a href="https://en.wikipedia.org/wiki/Great_circle">great circles</a>. A special care is given for situations where cities are very far from each other and where the shortest connection thus passes behind the map.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/how-to-draw-connecting-routes-on-map-with-r-and-great-circles/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/get-the-best-from-ggplotly/"><p class="blogtitle">Getting the best from ggplotly</p></a>
<p class="blogfeature">June 2017 - 5 minutes read</p>
<p class="blogtext"><a href="https://plot.ly/r/">Plotly</a> is an R library allowing to make amazing <a href="http://www.r-graph-gallery.com/portfolio/interactive-r-graphics/">interactive charts</a> in a minute. This blog post shows how to get the best from ggplotly, the function of plotly allowing you to turn any <a href="http://www.r-graph-gallery.com/portfolio/ggplot2-package/">ggplot2 chart</a> interactive. A special care is given on features that are not present in ggplot2 (like hovering), and features that are not well translated by ggplotly (like legend position).<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/get-the-best-from-ggplotly/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/4-tricks-for-working-with-r-leaflet-and-shiny/"><p class="blogtitle">4 tricks for working with R, leaflet and shiny</p></a>
<p class="blogfeature">March 2017 - 7 minutes read</p>
<p class="blogtext">I recently worked on a dataviz project involving <a href="https://shiny.rstudio.com/">Shiny</a> and the <a href="http://www.r-graph-gallery.com/portfolio/maps/">Leaflet library</a>. In this post I give 4 handy tricks we used to improve the app: 1/ how to use leaflet native widgets 2/ how to trigger an action when user clicks on map 3/ how to add a research bar on your map 4/ how to propose a “geolocalize me” button. For each trick, a reproducible code snippet is provided, so you just have to copy and paste it to reproduce the image.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/4-tricks-for-working-with-r-leaflet-and-shiny/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/the-genetic-map-comparator/"><p class="blogtitle">The genetic map comparator: a user-friendly application to display and compare genetic maps</p></a>
<p class="blogfeature">January 2017 - 2 minutes read</p>
<p class="blogtext">The <a href="http://wp.me/p6CSAh-LH">Genetic Map Comparator</a> is an R Shiny application made to compare and characterize genetic maps. You can use it through the <a herf="http://www.agap-sunshine.inra.fr/genmapcomp/">online version</a> and read the related publication in <a href="https://academic.oup.com/bioinformatics/article/2908431/The-Genetic-Map-Comparator-a-user-friendly">Bioinformatics</a>.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/the-genetic-map-comparator/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/the-wordcloud2-library/"><p class="blogtitle">The Wordcloud2 R library</p></a>
<p class="blogfeature">December 2016 - 3 minutes read</p>
<p class="blogtext">A <a href="http://www.r-graph-gallery.com/portfolio/wordcloud/">wordcloud</a> (or tag cloud) is a visual representation of text data. Tags are usually single words, and the importance of each tag is shown with font size or color. In this post I give an overview of the <a href="https://github.com/Lchiffon/wordcloud2">wordcloud2</a> R library allowing to build it in minutes.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/the-wordcloud2-library/">Read more</a></span></p>
</div>
<div class="col-lg-12 text-left" style="padding-bottom: 4%">
<a href="https://www.r-graph-gallery.com/the-r-graph-gallery/"><p class="blogtitle">Welcome to the R graph gallery</p></a>
<p class="blogfeature">August 2016 - 3 minutes read</p>
<p class="blogtext">Welcome to the <a href="https://www.r-graph-gallery.com">R graph gallery</a>! One year ago, I realised that I was tired of learning how to code R charts again and again so I decided to create a reproducible code for each of them. I ultimately designed a new R graph gallery: a <a href="https://www.r-graph-gallery.com">website</a> that currently provides more than 200 R graphics and explains how to generate them.<span class="blogreadmore"> - <a href="https://www.r-graph-gallery.com/the-r-graph-gallery/">Read more</a></span></p>
</div>
</div>
</div>
</section>
<!-- ======================= CONTACT SECTION =============================== -->
<section id="contact" class="bg-light" style="padding-top: 2%; padding-bottom: 6%">
<div class="container">
<div class="row">
<div class="col-lg-2 text-center"></div>
<div class="col-lg-8 text-center">
<br><br><br>
<h2 class="section-heading text-uppercase" style="color: black">Contact</h2>
<p>Feel free to contact me for any question. For open source project, please open an issue or pull request on <a href="https://github.com/holtzy/">Github</a>. If you want to follow my work, reach me on <a href="https://twitter.com/R_Graph_Gallery">Twitter</a>. Otherwise, send me an email at <a href="mailto:[email protected]">[email protected]</a>.</p>
<div style="text-align:center">
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="https://github.com/holtzy/data_to_viz">Github</a>
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="https://twitter.com/R_Graph_Gallery">Twitter</a>
<a class="btn btn-primary btn-xl text-uppercase js-scroll-trigger" href="mailto:[email protected]">Mail</a>
</div>
</div>
</div>
</div>
</section>
<!-- ======================== MAP SECTION ============================ -->
<style>
/* Set the size of the div element that contains the map */
#map {
height: 300px; /* The height is 400 pixels */
width: 100%; /* The width is the width of the web page */
background-color: grey;
opacity: 1
}
</style>
</head>
<body>
<!--The div element for the map -->
<div id="map"></div>
<script>
function initMap() {
// Styles a map in night mode.
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: {lat: 43.61092, lng: 3.87723},
styles: [
{
"elementType": "geometry",
"stylers": [
{
"color": "#1d2c4d"
}
]
},
{
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#8ec3b9"
}
]
},
{
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#1a3646"
}
]
},
{
"featureType": "administrative.country",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#4b6878"
}
]
},
{
"featureType": "administrative.land_parcel",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#64779e"
}
]
},
{
"featureType": "administrative.province",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#4b6878"
}
]
},
{
"featureType": "landscape.man_made",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#334e87"
}
]
},
{
"featureType": "landscape.natural",
"elementType": "geometry",
"stylers": [
{
"color": "#023e58"
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#283d6a"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#6f9ba5"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#1d2c4d"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#023e58"
}
]
},
{
"featureType": "poi.park",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#3C7680"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"color": "#304a7d"
}
]
},
{
"featureType": "road",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#98a5be"
}
]
},
{
"featureType": "road",
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#1d2c4d"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#2c6675"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#255763"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#b0d5ce"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#023e58"
}
]
},
{
"featureType": "transit",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#98a5be"
}
]
},
{
"featureType": "transit",
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#1d2c4d"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#283d6a"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#3a4762"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#0e1626"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#4e6d70"
}
]
}
]
});
var contentString = '<div id="content" style="font-size: 14px; line-height: 20px">Montpellier, France<br><a href="mailto:[email protected]">[email protected]</a></div>'
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var marker = new google.maps.Marker({position: {lat: 43.61092, lng: 3.52}, map: map})
marker.addListener('click', function() {
infowindow.open(map, marker);
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA0s1a7phLN0iaD6-UE7m4qP-z21pH0eSc&callback=initMap">
</script>
<!-- ======================= FOOTER SECTION ================================ -->
<footer>
<div class="container">
<div class="row">
<div class="col-md-4">
<span class="copyright">Copyright © Yan Holtz 2018</span>
</div>
<div class="col-md-4">
<ul class="list-inline social-buttons">
<li class="list-inline-item">
<a href="https://twitter.com/R_Graph_Gallery">
<i class="fa fa-twitter"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/holtzy">
<i class="fa fa-github"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://www.linkedin.com/in/yan-holtz-2477534a/">
<i class="fa fa-linkedin"></i>
</a>
</li>
</ul>
</div>
<div class="col-md-4">
<ul class="list-inline quicklinks">
<li class="list-inline-item">
<a href="#">Privacy Policy</a>
</li>
<li class="list-inline-item">
<a href="#">Terms of Use</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
<!-- ======================================================================= -->
<!-- ======================== JAVASCRIPT SECTION =========================== -->
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Contact form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
<!-- Custom scripts for this template -->
<script src="js/agency.min.js"></script>
<script src="js/portfolio.js"></script>
<script src="js/tree.js"></script>
<!-- Load d3.js -->
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
showTree('num');
</script>
<!-- Activate the bootstrap tooltip, must be after jQuery load -->
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip();
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-79254642-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-79254642-3');
</script>
<!-- ======================================================================= -->
</body>
</html>