D3po 1.0.0 is here!
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
If this post is useful to you I kindly ask a minimal donation on Buy Me a Coffee. It shall be used to continue my Open Source efforts.
You can send me questions for the blog using this form and subscribe to receive an email when there is a new post.
D3po is a set of templates for D3 (version 7+) that lets you make interactive charts in R and Shiny without messing with JavaScript. It’s open source (Apache 2.0), so you can use it for free, even in government or NGO projects. It doesn’t have advanced features like commercial libraries such as Highcharts, but it covers the basics: area, box, column, donut, map, line, network, pie, scatter, and treemap charts. You can resize content automatically and export charts as SVG or PNG.
Here’s a video showing what D3po can do:
D3po was stuck on version 0.5.5 for a long time. The reason was that it was not easy to update it. I wrote D3po 0.1 back in 2015 using D3 3.5 while working for the Government of Chile. Over the years, I added more features and fixed bugs up to version 0.5.5 by the end of 2019. By that point I wanted to rewrite the D3 templates to use D3 5.8.0, but shortly after COVID-19 hit, I had to focus on other things, and struggling with breaking changes in D3 was not a priority.
Finally, I decided to take the plunge and rewrite the templates. It took a while, but I’m happy to announce that D3po 1.0.0 is now available on the R-Universe. The updated CRAN release will need to wait until next week.
Install it from R-Universe:
install.packages("d3po", repos = "https://pachadotdev.r-universe.dev")
Or from GitHub:
remotes::install_github("pachadotdev/d3po")
Here is an example of how to create a box and whiskers plot:
d3po(pokemon) %>% po_box(daes(x = type_1, y = speed, color = color_1)) %>% po_title("Distribution of Pokemon speed by main type")
For more, see the vignettes and the Shiny demo app: https://github.com/pachadotdev/d3po/tree/main/d3podemo
I hope it’s useful!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.