Comparision in R, Python and Tableau for interactive graph

Author: Jie Li, Xiaofan Zhang

1. Introduction

A time-series plot is a data visualization tool that illustrates data points at successive intervals of time. Each point on the chart corresponds to both a time and a quantity that is being measured.

In R, Dygraphs provides rich facilities for charting time-series data, and includes support for many interactive features including series/point highlighting, zooming, and panning.

In Python, Plotly library can be used to plot interactive plots. We will plot geographical data using plotly and will explain how user can interact with such plots.

In Tableau, it is convenient to make interactive time series plots, where time series data can be easily identified. Additionally, Tableau provide time series analysis.

In this paper, we will compare these approaches using time-series data set with two discrete variables.

2. Data

We are using central park weather data comes from National Climatic Data Center. NOAA’s National Centers for Environmental Information (NCEI) is responsible for preserving, monitoring, assessing, and providing public access to the Nation’s treasure of climate and historical weather data and information. Our data contains daily maximum and minimum temperature between 2009-01-01 and 2018-06-03.
Uploading file..._zvf4w0ja7

3. Dygraphs for R

The dygraphs package is an R interface to the dygraphs JavaScript charting library. We converted time-series variable to date type using xts function, and call dygraphs function to produce an interactive time-series plot. It provides rich facilities for charting time-series data in R, including:

4. Plotly for Python

We import the plot() function from the plotly.offline module. To plot interactive plots using Pandas dataframe, we simply need to call the iplot() method. It also provides some powerful function for time-series data in Python, including:

The following picture shows the powerful UI system of Plotly, where we can edit this chart. Click the image to view the detailed powful UI system:


5. Tableau

We firstly load the dataset into Tableau and then add Date, Tmax and Tmin to view. Tableau will generate interactive time series plot automatically. By simple clicks, you can easily change any aesthetic features of plot such as color, size and also change measures of data you want to view and group by different date units. Tableau allows users:

The following picture shows the graph page in Tableau, and you can also click the image to see more details.

6. Conclusion

To summary, R, Python packages and Tableau are doing very great job to provide impressive interactive plots. Dygraphs is the simplest way to implement the plots, and the package is providing useful functions to help convert data and visualization. On the other hand, Plotly is amazing as well as Dygraphs because it not only produces highly interactive plots, also creates a powerful UI system for non-programmer to share the results. Tableau is a powerful tool to generate interactive plot and can perform basic calculation without code.