Yan Holtz's blog on statistics, R and Dataviz. More or less linked with our world, always related to data.


From Data to Viz - A classification of graphics based on input data format

July 2018 - 6 minutes read

I’m delighted to announce a new dataviz project called Data to Viz. 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. - Read more

Pimp my RMD - A collection of tips for R Markdown

April 2018 - 3 minutes read

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. - Read more

Map: a smooth transition to cartogram with R

January 2018 - 9 minutes read

This post describes how to make a smooth transition between a choropleth map and a cartogram. It starts by doing a basic map of Africa and then distorts country size using the cartogram library. Ggplot2 is then used to make a nice choropleth version. Finally the tweenr and the gganimate libraries build a smooth animation between both maps. - Read more

How to draw connecting routes on map with R and great circles

June 2017 - 8 minutes read

This post explains how to draw connection lines between several localizations on a map, using R. The method suggested here relies on the use of the gcIntermediate function from the geosphere package. Instead of making straight lines, it offers to draw the shortest routes, using great circles. 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. - Read more

Getting the best from ggplotly

June 2017 - 5 minutes read

Plotly is an R library allowing to make amazing interactive charts in a minute. This blog post shows how to get the best from ggplotly, the function of plotly allowing you to turn any ggplot2 chart 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). - Read more

4 tricks for working with R, leaflet and shiny

March 2017 - 7 minutes read

I recently worked on a dataviz project involving Shiny and the Leaflet library. 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. - Read more

The genetic map comparator: a user-friendly application to display and compare genetic maps

January 2017 - 2 minutes read

The Genetic Map Comparator is an R Shiny application made to compare and characterize genetic maps. You can use it through the online version and read the related publication in Bioinformatics. - Read more

The Wordcloud2 R library

December 2016 - 3 minutes read

A wordcloud (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 wordcloud2 R library allowing to build it in minutes. - Read more

Welcome to the R graph gallery

August 2016 - 3 minutes read

Welcome to the R graph gallery! 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 website that currently provides more than 200 R graphics and explains how to generate them. - Read more


Feel free to contact me for any question. For open source project, please open an issue or pull request on Github. If you want to follow my work, reach me on Twitter. Otherwise, send me an email at

Github Twitter Mail