Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Repository
Three.js widgets for R and shiny
Basic Info
- Host: GitHub
- Owner: bwlewis
- License: other
- Language: JavaScript
- Default Branch: master
- Homepage: http://bwlewis.github.io/rthreejs
- Size: 26.9 MB
Statistics
- Stars: 306
- Watchers: 29
- Forks: 59
- Open Issues: 37
- Releases: 0
Topics
Metadata Files
README.md
Three.js and R
Three.js widgets for R and shiny. The package includes
- graphjs: an interactive network visualization widget
- scatterplot3js: a 3-d scatterplot widget similar to, but more limited than, the scatterplot3d function
- globejs: a somewhat silly widget that plots data and images on a 3-d globe
The widgets are easy to use and render directly in RStudio, in R markdown, in Shiny applications, and from command-line R via a web browser. They produce high-quality interactive visualizations with just a few lines of R code.
Visualizations optionally use accelerated WebGL graphics, falling back to non-accelerated graphics for systems without WebGL when possible.
See https://threejs.org for details on three.js.
See https://bwlewis.github.io/rthreejs for R examples.
This project is based on the htmlwidgets package. See http://htmlwidgets.org for details and links to many other visualization widgets for R.
Changes in version 0.3.4 (August, 2021)
Added a JavaScript 'program' function argument to run extra user-supplied JavaScript initialization code, see the graphjs help for examples.
New in version 0.3.0 (June, 2017)
The new 0.3.0 package version introduces major changes. The scatterplot3js()
function generally works as before but with more capabilities. The graphjs()
function is very different with a new API more closely tied to the igraph
package.
The threejs package now depends on igraph. If you're doing serious network analysis, you're probably already using igraph (or you should be). Threejs now uses external graph layouts (either from igraph or elsewhere). This gives much greater graph layout flexibility, something I was looking for, but also removes the cute (but slow and crude) force-directed JavaScript animation previously used. To partially make up for that, several new graph animation and interaction schemes are newly available.
See https://bwlewis.github.io/rthreejs/animation/animation.html and https://bwlewis.github.io/rthreejs/advanced/advanced.html for short tutorials on the new graph animation capabilities.
Performance of graphjs() is generally much improved using extensive buffering
and custom WebGL shaders where needed. See
https://bwlewis.github.io/rthreejs/ego/index.html for an example.
Summary of changes
The scatterplot3js() function was substantially improved and updated.
- The new
pchoption supports many point styles with size control. - Interactive rotation and zooming are greatly improved and panning is now supported: press and hold the right mouse button (or touch equivalent) and move the mouse to pan.
- Mouse over labels are supported in WebGL renderings.
- The
points3d()interface has changed to support pipelining. - Lines are supported too, see
lines3d(). - Support for crosstalk selection handles (see
demo("crosstalk", package="threejs")). - Set the experimental
use.orbitcontrols=TRUEoption for more CPU-efficient (but less fluid) rendering (good for laptops), also applies tographjs().
The graphjs() function is completely new.
- Greater variety of WebGL vertex rendering ("pch") options, including spheres and much higher-performance options for large graphs.
- Graph layout is now external; for instance use one of the many superb igraph package graph layout options.
- Graph animation is supported, see the examples.
- Interactive (click-able) graph animation is supported, see
demo(package="threejs")for examples. - Limited brushing is available to highlight portions of the graph, see the
brush=TRUEoption. - Support for crosstalk selection handles.
Known issues
- RStudio on Windows systems may not be able to render the WebGL graphics emitted by threejs. RStudio users running on Windows systems may need to use the plot "pop out" button to see visualizations in an external browser. We expect this to be a temporary problem until the underlying graphics rendering system used by RStudio is updated later in 2017.
- The fallback Canvas rendering code has diverged too much from the baseline WebGL code and no longer works. We have temporarily disabled Canvas rendering with an error message. See https://github.com/bwlewis/rthreejs/issues/67 for details.
- Crosstalk filter handles are used in a non-standard and experimental way to control graph animation. Don't rely on this experimental feature.
Install
Use the devtools package to install threejs directly from GitHub on any
R platform (Mac, Windows, Linux, ...). You'll need the 'devtools' package.
r
if(!require("devtools")) install.packages("devtools")
devtools::install_github("bwlewis/rthreejs")
Examples
See ?scatterplot3d for more examples and detailed help.
r
library(threejs)
z <- seq(-10, 10, 0.1)
x <- cos(z)
y <- sin(z)
scatterplot3js(x, y, z, color=rainbow(length(z)))
The following example plots an undirected graph with 4039 vertices and 88234
edges from the Stanford SNAP network
repository http://snap.stanford.edu/data/facebook_combined.txt.gz.
r
data(ego)
graphjs(ego, bg="black")
The next example illustrates the globe widget by plotting the relative
population of some cities using data from the R maps package on a globe. It's
based on the JavaScript WebGL Globe Toolkit (https://github.com/dataarts) by
the Google Creative Lab Data Arts Team.
r
runApp(system.file("examples/globe", package="threejs"))
For detailed help on the widgets and additional examples, see
r
?scatterplot3js
?globejs
?graphjs
Owner
- Name: B. W. Lewis
- Login: bwlewis
- Kind: user
- Location: Appalachia
- Company: Foraging
- Website: http://illposed.net
- Repositories: 74
- Profile: https://github.com/bwlewis
Forager, kayaker, mathematician
GitHub Events
Total
- Watch event: 2
- Push event: 3
- Fork event: 1
Last Year
- Watch event: 2
- Push event: 3
- Fork event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| bwlewis | b****s@i****t | 433 |
| blewis | b****s@a****s | 7 |
| Yihui Xie | x****e@y****e | 2 |
| Roma Klapaukh | r****h@h****m | 2 |
| Andreas Briese | ab@b****e | 2 |
| Luis Rodriguez-Lujan | l****j@g****m | 2 |
| Jared P. Lander | j****d@l****m | 2 |
| Andrey Tovchigrechko | t****a@m****m | 2 |
| vkapartzianis | v****s@g****m | 1 |
| Ian Lyttle | i****e@s****m | 1 |
| JT85 | j****o@g****m | 1 |
| Lauri Piispanen | l****n@r****m | 1 |
| Laura Wilson | L****n | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 85
- Total pull requests: 13
- Average time to close issues: 3 months
- Average time to close pull requests: about 2 months
- Total issue authors: 51
- Total pull request authors: 13
- Average comments per issue: 2.75
- Average comments per pull request: 1.38
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bwlewis (29)
- ivokwee (3)
- jzicker (3)
- sargdavid (2)
- ugroempi (2)
- ArthurZ (1)
- pssguy (1)
- seantma (1)
- TimFung93 (1)
- ghost (1)
- poroale (1)
- AndreasBriese (1)
- antononcube (1)
- vjcitn (1)
- jalapic (1)
Pull Request Authors
- klapaukh (1)
- vkapartzianis (1)
- lauripiispanen (1)
- voltek62 (1)
- yihui (1)
- lrodriguezlujan (1)
- bwlewis (1)
- alyst (1)
- andreyto (1)
- JT85 (1)
- ijlyttle (1)
- jaredlander (1)
- kwunlyou (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- cran 15,002 last-month
- Total docker downloads: 67,220
-
Total dependent packages: 8
(may contain duplicates) -
Total dependent repositories: 23
(may contain duplicates) - Total versions: 8
- Total maintainers: 1
cran.r-project.org: threejs
Interactive 3D Scatter Plots, Networks and Globes
- Homepage: https://bwlewis.github.io/rthreejs/
- Documentation: http://cran.r-project.org/web/packages/threejs/threejs.pdf
- License: MIT + file LICENSE
-
Latest release: 0.3.4
published 10 months ago
Rankings
Maintainers (1)
conda-forge.org: r-threejs
- Homepage: https://bwlewis.github.io/rthreejs
- License: MIT
-
Latest release: 0.3.3
published about 6 years ago
Rankings
Dependencies
- R >= 3.0.0 depends
- igraph >= 1.0.0 depends
- knitr * enhances
- shiny * enhances
- base64enc * imports
- crosstalk * imports
- htmlwidgets >= 0.3.2 imports
- methods * imports
- stats * imports
- maps * suggests