RepositoryJavaScriptFRFrance
juba

juba/scatterD3

R scatter plot htmlwidget based on D3.js

162stars
21forks
3issues
3views

ScatterD3

CRAN Downloads CRAN_Status_Badge R build status

scatterD3 is an HTML R widget for interactive scatter plots visualization. It is based on the htmlwidgets R package and on the d3.js javascript library.

Features

Here is a small preview of what you will get :

example

The visual guide gives a list of features and examples.

Installation

Install from CRAN :

install.packages("scatterD3")

Or from Github for the latest development version :

remotes::install_github("juba/scatterD3")

Usage

Quick example of the scatterD3 function based on the mtcars dataset :

mtcars$names <- rownames(mtcars)
scatterD3(data = mtcars, x = wt, y = mpg, lab = names,
          col_var = cyl, symbol_var = am,
          xlab = "Weight", ylab = "Mpg", col_lab = "Cylinders",
          symbol_lab = "Manual transmission")

See the visual guide for a step-by-step guide and details about the different function arguments.

scatterD3 provides a built-in SVG export of the current widget view. As an HTML widget, you can also include it in an Rmarkdown HTML document while keeping its interactive features.

Shiny integration

Like every R HTML widget, shiny integration is straightforward. But as a D3 widget, scatterD3 is updatable : changes in settings or data can be displayed via smooth transitions instead of a complete chart redraw, which can provide interesting visual clues.

Furthermore, scatterD3 provides some additional handlers and callback hooks for a more complete JavaScript interactivity and integration.

You can check the sample scatterD3 shiny app and the visual guide for a better understanding of the different arguments.

Development notes

This package uses packer to manage JavaScript source code and dependencies. If you want to modify it, you'll need a working installation of Node.js.

After cloning this repository, run the following in a terminal at the project root :

npm install --production=false

Then, if you modify the JavaScript code in srcjs, you'll have to run the following command to bundle and update the widget JavaScript code :

packer::bundle_dev()

If you want to ship a minimized production version, use :

packer::bundle_prod()

Credits

This package has been made possible by :

Similar Projects

Discover other similar projects and AI models.

RepositoryR
plotly/plotly.R

An interactive graphing library for R

2.7k
Jul 25, 2026
RepositoryR
jbkunst/highcharter

R wrapper for highcharts

743
Nov 30, 2026
RepositoryR
juba/explor

Interfaces for Multivariate Analysis in R

197
Jul 3, 2026
RepositoryHTML
AdeelK93/collapsibleTree

Create Interactive Collapsible Tree Diagrams in R using D3.js

163
Nov 14, 2023
RepositoryJavaScript
preziotte/party-mode

An experimental d3.js music visualizer from 2014. Continued as vizz.fm

809
Aug 15, 2026
RepositoryJavaScript
glin/reactable

Interactive data tables for R

681
Nov 3, 2026
RepositoryR
rstudio/shiny

Easy interactive web applications with R

5.7k
Nov 25, 2026
RepositoryHTML
xswei/d3js_doc

D3js中文文档 D3中文 :bar_chart: :chart_with_upwards_trend: :tada:

2.0k
Oct 10, 2020
RepositoryR
mlr-org/mlr

Machine Learning in R

1.7k
Oct 11, 2026