Although I’m largely settled on ggplot2 for static plots, I’m generally on the lookout for approaches to make interactive visualizations. echarts4r is just one of my new favourite deals for this. It’s intuitive, powerful, and versatile.

The echarts4r offer is an R wrapper for the echarts JavaScript library, an official Apache Program Foundation job (it graduated from incubator standing in December). That helps me experience self-confident I can depend on the JavaScript code fundamental the R offer.

So let’s acquire a glance at echarts4r.

Package author John Coene points out the essentials in a getting begun site:

  • Every functionality in the offer starts with e_.
  • You start out coding a visualization by making an echarts object with the e_charts() functionality. That requires your information body and x-axis column as arguments.
  • Future, you insert a functionality for the type of chart (e_line(), e_bar(), etcetera.) with the y-axis sequence column identify as an argument.
  • The rest is largely customization!

Let’s acquire a glance.

Line charts with echarts4r

For illustration information, I downloaded and wrangled some housing cost data by US city from Zillow. If you want to abide by alongside, information recommendations are at the close of this article.