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

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

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

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

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

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

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! 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

Contact

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 yan.holtz.data@gmail.com.