Programming

Why Should I use a Programming Language to Create Data Visualizations?

scatterplot made with ggplot2

A demonstration of a scatterplot created with the ggplot2 package in R.

There are a number of user-friendly tools that provide a graphical interface to make data visualization faster and easier. However, all of these tools have limited capabilities. For example, many will not perform in-depth analysis or statistical tests on your data, and you may find it more efficient to use a programming language that is capable of both analysis and visualization at the same time. There are also currently no easy-to-use tools that allow for animation of data visualizations. Animation achieved in data visualization is often created either frame-by-frame or by using a programming language.

Perhaps most importantly, programming allows for more transparency and reproducibility of the data visualization process. The documentation of the steps used to create a visualization within a programming language allows for better scholarly review and provides evidence of accuracy.

Popular Programming Languages for Creating Data Visualizations

a line plot created in R

R

R is a programming language designed for statistics and data analysis. It includes some basic visualization capabilities, but many users employ third-party created functions, or "packages", to enhance visualization options. A popular visualization package for R is ggplot2.

a network graph made with d3

JavaScript

JavaScript is a language most well known for its use in websites and web applications. Although there are many JavaScript libraries that enable data visualization, D3 is one of the most powerful and widely used. To create web visualizations with JavaScript, you will also have to be familiar with HTML and CSS, and, in the case of D3, you will need to know SVG.

a violin plot made with python

Python

Python is a popular language for both experts and first-time programmers. Although there are no visualization functions built into Python, there are many visualization libraries available. A commonly used Python visualization library is matplotlib.