Though I’m primarily settled on ggplot2 for static plots, I’m always on the lookout for techniques to make interactive visualizations. echarts4r is just one of my new favored deals for this. It’s intuitive, highly effective, and flexible.

The echarts4r package is an R wrapper for the echarts JavaScript library, an formal Apache Software package Foundation undertaking (it graduated from incubator standing in December). That can help me experience confident I can rely on the JavaScript code fundamental the R package.

So let’s get a seem at echarts4r.

Deal creator John Coene points out the essentials in a having started out website page:

  • Every operate in the package starts off with e_.
  • You commence coding a visualization by creating an echarts item with the e_charts() operate. That will take your data frame and x-axis column as arguments.
  • Up coming, you insert a operate for the sort of chart (e_line(), e_bar(), and so on.) with the y-axis sequence column identify as an argument.
  • The rest is primarily customization!

Let us get a seem.

Line charts with echarts4r

For example data, I downloaded and wrangled some housing price tag info by US city from Zillow. If you want to adhere to along, data instructions are at the end of this report.