• Stars
    star
    158
  • Rank 217,944 (Top 5 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

R scatter plot htmlwidget based on D3.js

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.
  • The sample shiny app allows to live test the package features and its shiny integration.

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.

The sample scatterD3 shiny app allows you to see the different features described here. You can check its source code on GitHub 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 :

More Repositories

1

rmdformats

HTML output formats for RMarkdown documents
CSS
691
star
2

explor

Interfaces for Multivariate Analysis in R
R
182
star
3

robservable

Observable notebooks as R htmlwidgets
HTML
155
star
4

color-theme-tangotango

An emacs color theme based on the tango palette colors
Emacs Lisp
149
star
5

pyobsplot

Observable Plot in Jupyter notebooks and Quarto documents
HTML
139
star
6

shinyglide

Glide.js component for Shiny apps
R
90
star
7

questionr

R package to make surveys processing easier
R
80
star
8

obsplot

Observable Plot bindings for R
R
55
star
9

rainette

R implementation of the Reinert text clustering method
R
49
star
10

tidyverse

Introduction à R et au tidyverse
SCSS
42
star
11

uniquanti

Small JavaScript app to visualize basic statistics
JavaScript
42
star
12

rwos

R interface to Web of Science Web Services API
R
21
star
13

bookup-html

Bookup custom Quarto HTML format
SCSS
17
star
14

scatterD3_shiny_app

Minimal example shiny app for the scatterD3 package : https://github.com/juba/scatterD3
R
12
star
15

textile-mode

An emacs major mode for Textile markup language editing.
Emacs Lisp
6
star
16

khi2_slides

Présentation sur le test du Khi2
HTML
6
star
17

intro-r

(Obsolète) Introduction à R
PostScript
6
star
18

shiny_prenoms

Shiny app for french first names at birth dataset
R
6
star
19

timeline-generator

PDF timeline generator (Ruby, LaTeX, TikZ)
Ruby
5
star
20

texplor

Interactive Interfaces for Textual Analysis in R
R
5
star
21

presid2012-bureaux-lyon

Résultats du premier tour des présidentielles de 2012 dans les bureaux de vote de Lyon
R
2
star
22

archive_doc_khi2

Archive d'un document d'introduction au test du Khi2
TeX
2
star
23

rgrs

R package that provides functions for beginners and social sciences students or researchers (cross-tabulation, weighting, results export, and maps plotting).
R
2
star
24

presid2012-classif-communes

Classification des communes de France selon leurs votes au premier tour de l'élection présidentielle 2012
R
2
star
25

js-exos

Questions-réponses en html/javascript
JavaScript
1
star
26

StableDiffusionNotebook

Stable diffusion custom notebook
Jupyter Notebook
1
star
27

advent-2023

Advent of code 2023
Python
1
star
28

umapscan

UMAP dimensionality reduction and DBSCAN clustering R helper package
R
1
star
29

rmarkdown_rlyon_2014

Slides de présentation de Rmarkdown à RLyon - 20/11/2014
CSS
1
star
30

org-seenthis

Interface between emacs' org-mode and seenthis.net
Emacs Lisp
1
star