https://github.com/JohnCoene/sigmajs
  
  
    Σ sigma.js for R 
    https://github.com/JohnCoene/sigmajs
  
htmlwidgets network-visualization r rstats sigmajs
        Last synced: 6 months ago 
        JSON representation
    
Σ sigma.js for R
- Host: GitHub
 - URL: https://github.com/JohnCoene/sigmajs
 - Owner: JohnCoene
 - License: other
 - Created: 2018-05-15T19:41:40.000Z (over 7 years ago)
 - Default Branch: master
 - Last Pushed: 2021-01-29T09:28:35.000Z (almost 5 years ago)
 - Last Synced: 2024-11-10T03:03:02.918Z (12 months ago)
 - Topics: htmlwidgets, network-visualization, r, rstats, sigmajs
 - Language: R
 - Homepage: http://sigmajs.john-coene.com
 - Size: 13.7 MB
 - Stars: 72
 - Watchers: 7
 - Forks: 7
 - Open Issues: 7
 - 
            Metadata Files:
            
- Readme: README.md
 - Contributing: CONTRIBUTING.md
 - Funding: FUNDING.yml
 - License: LICENSE
 
 
Awesome Lists containing this project
- awesome-shiny-extensions - sigmajs - Interface to the sigma.js graph visualization library, including animations, plugins, and Shiny widgets. (Visualization / Network and Graph Data)
 - jimsghstars - JohnCoene/sigmajs - Σ sigma.js for R (R)
 
README
          # sigmajs
[](https://travis-ci.org/JohnCoene/sigmajs) [](https://ci.appveyor.com/project/JohnCoene/sigmajs) [](https://www.tidyverse.org/lifecycle/#stable) [](https://bitbucket.org/JohnCoene/sigmajs) [](https://cran.r-project.org/package=sigmajs) 
[](https://github.com/JohnCoene/sigmajs) [](https://coveralls.io/r/JohnCoene/sigmajs?branch=master) [](https://codecov.io/github/JohnCoene/sigmajs?branch=master) [](https://doi.org/10.21105/joss.00814) [](http://twinetverse.john-coene.com/)
[](http://cranlogs.r-pkg.org/badges/sigmajs) [](https://github.com/JohnCoene/sigmajs/actions)

[sigmajs](http://sigmajs.org/) for R.
* [Install](#install)
* [Examples](#examples)
* [Website](http://sigmajs.john-coene.com/)
* [Shiny Demo](http://shiny.john-coene.com/sigmajs/)
With the rise in popularity of networks, it is important for R users to have access to a package that allows visualising the aforementioned networks in a highly configurable, interactive and dynamic manner. `sigmajs` is a fully-fledged wrapper for the [sigma.js JavaScript library](http://sigmajs.org/).
The sigma.js JavaScript library is described as follows on its [website](http://sigmajs.org/): 
> Sigma is a JavaScript library dedicated to graph drawing. It makes easy to publish networks on Web pages, and allows developers to integrate network exploration in rich Web applications
# Install
The stable version from CRAN.
```r
install.packages("sigmajs")
```
The development version from Github of Bitbucket.
```r
# install.packages("devtools")
devtools::install_github("JohnCoene/sigmajs") # github
devtools::install_bitbucket("JohnCoene/sigmajs") # bitbucket
```
# Examples
Most functions have corresponding `demo()`, see [documentation](http://sigmajs.john-coene.com/) and [shiny demo](http://shiny.john-coene.com/sigmajs/).
```r
library(sigmajs)
# generate data
nodes <- sg_make_nodes()
edges <- sg_make_edges(nodes)
# visualise
sigmajs() %>%
	sg_nodes(nodes, id, label, size, color) %>%
	sg_edges(edges, id, source, target)
# from igraph 
data("lesmis_igraph")
 
layout <- igraph::layout_with_fr(lesmis_igraph)
sigmajs() %>%
	sg_from_igraph(lesmis_igraph, layout)
# from GEXF
gexf <- system.file("examples/arctic.gexf", package = "sigmajs")
sigmajs() %>% 
	sg_from_gexf(gexf) 
# proxies demos
demo(package = "sigmajs")
```

## Contributing
See the [contrinuting guidelines](https://github.com/JohnCoene/sigmajs/blob/master/CONTRIBUTING.md) if you encounter any issue. Please note that this project is released with a [Contributor Code of Conduct](https://github.com/JohnCoene/sigmajs/blob/master/CONDUCT.md). By participating in this project you agree to abide by its terms.