sigmajs v0.1.2

0

Monthly downloads

0th

Percentile

Interface to 'Sigma.js' Graph Visualization Library

Interface to 'sigma.js' graph visualization library including animations, plugins and shiny proxies.

Readme

sigmajs

Travis-CI Build Status AppVeyor Build Status lifecycle bitbucket CRAN status CircleCI Coverage status Coverage status DOI twinetverse CRAN log

sigmajs for R.

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.

The sigma.js JavaScript library is described as follows on its website:

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.

install.packages("sigmajs")

The development version from Github of Bitbucket.

# install.packages("devtools")
devtools::install_github("JohnCoene/sigmajs") # github
devtools::install_bitbucket("JohnCoene/sigmajs") # bitbucket

Examples

Most functions have corresponding demo(), see documentation and shiny demo.

Note that the graphs do not work in the RStudio viewer, and thus open in your default browser.

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 if you encounter any issue. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Functions in sigmajs

Name Description
sg_animate Animate
sg_force Add forceAtlas2
sg_make_nodes Generate data
sg_noverlap No overlap
reexports Objects exported from other packages
sg_add_node_p Add node or edge
sg_add_nodes Add nodes and edges
sg_nodes Add nodes and edges
sg_layout Layouts
sg_custom_shapes Custom shapes
sg_from_gexf Graph from GEXF file
sg_relative_size Relative node sizes
sg_settings Settings
sg_cluster Cluster
sg_drag_nodes Drag nodes
sg_drop_nodes Drop
sg_drop_nodes_p Drop nodes or edges
sg_add_images Add images to nodes
sg_button Buttons
sigmajs-shiny Shiny bindings for sigmajs
sigmajs Initialise
sg_drop_nodes_delay_p Drop nodes or edges with a delay
sg_drop_node_p Remove node or edge
lesmis_edges Edges from co-appearances of characters in "Les Miserables"
sg_from_igraph Create from igraph
sg_kill Kill
lesmis_igraph Co-appearances of characters in "Les Miserables" as igraph object
sg_progress Text
sg_refresh_p Refresh instance
sg_add_nodes_delay_p Add nodes or edges with a delay
sg_add_nodes_p Add nodes or edges
sg_export_svg Export
sg_filter_gt_p FIlter
lesmis_nodes Nodes from co-appearances of characters in "Les Miserables"
sg_neighbours Highlight neighbours
sg_clear_p Clear or kill the graph
No Results!

Vignettes of sigmajs

Name
animate.Rmd
buttons.Rmd
cluster.Rmd
dynamic.Rmd
formats.Rmd
get_started.Rmd
layout.Rmd
plugins.Rmd
settings.Rmd
shiny.Rmd
talkcross.Rmd
No Results!

Last month downloads

Details

Date 2018-11-18
License MIT + file LICENSE
Encoding UTF-8
LazyData true
RoxygenNote 6.1.1
URL http://sigmajs.john-coene.com/
BugReports https://github.com/JohnCoene/sigmajs/issues
VignetteBuilder knitr
NeedsCompilation no
Packaged 2018-11-18 17:22:07 UTC; jp
Repository CRAN
Date/Publication 2018-11-18 17:40:02 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/sigmajs)](http://www.rdocumentation.org/packages/sigmajs)