https://github.com/dalmolingroup/easylayout
interactive force-directed graph layouts within RStudio
Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (19.1%) to scientific vocabulary
Keywords
bioconductor
bioinformatics
cytoscape
cytoscapejs
data-visualization
force-directed-graph
force-layout
gephi
ggplot2
ggraph
graph-theory
graphlayouts
htmlwidgets
igraph
network-analysis
network-visualization
networkx
r
shiny
svelte
Last synced: 5 months ago
·
JSON representation
Repository
interactive force-directed graph layouts within RStudio
Basic Info
- Host: GitHub
- Owner: dalmolingroup
- License: other
- Language: JavaScript
- Default Branch: main
- Homepage: https://dalmolingroup.github.io/easylayout/
- Size: 1.76 MB
Statistics
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
- Releases: 0
Topics
bioconductor
bioinformatics
cytoscape
cytoscapejs
data-visualization
force-directed-graph
force-layout
gephi
ggplot2
ggraph
graph-theory
graphlayouts
htmlwidgets
igraph
network-analysis
network-visualization
networkx
r
shiny
svelte
Created over 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# easylayout: an R package for interactive force-directed layouts within RStudio
[](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml)
easylayout is an R package that leverages interactive force simulations within
the IDE itself (e.g., RStudio, VSCode). It is **not** yet another visualization
library, but instead aims to interconnect existing libraries and streamline
their usage into the R ecosystem.

easylayout takes an igraph object and serializes it into a web application
integrated with the IDE's interface through a Shiny server. The web application
lays out the network by simulating attraction and repulsion forces. Simulation
parameters can be adjusted in real-time. An editing mode allows moving and
rotating nodes. The implementation aims for performance, so that even lower-end
devices are able to work with relatively large networks. Once the user finishes
tinkering the layout, it is sent back to the R session to be plotted through
popular libraries like ggplot2 or even the base package itself.
## Installation
You can install the development version of easylayout from [GitHub](https://github.com/) with:
```r
# install.packages("devtools")
devtools::install_github("dalmolingroup/easylayout")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example, eval = FALSE}
library(easylayout)
library(igraph)
g <- igraph::erdos.renyi.game(n = 5000, p.or.m = 10000, type = "gnm")
number_of_vertices <- igraph::vcount(g)
igraph::V(g)$label <- NA
igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE)
igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE)
plot(g, layout = easylayout, vertex.label = NA, margin = 0)
```
You can also run easylayout as a standalone function, attributing its output
to a variable in your R environment. The output is just a 2-column matrix:
```{r layout_func, eval = FALSE}
layout <- easylayout(g)
```
Once you store the final coordinates to a variable, use any plotting package to
display the network. In the example below, we plot the network using ggraph.
```{r ggraph, eval = FALSE}
V(g)$x <- layout[, 1]
V(g)$y <- layout[, 2]
ggraph::ggraph(g, layout = layout) +
ggraph::geom_edge_link() +
ggraph::geom_node_point(aes(color = color)) +
ggplot2::coord_fixed() +
ggplot2::theme_void()
```
## Future work
The current implementation focuses on the R ecosystem, but using web
technologies makes it easily portable to similar environments, like Jupyter
Notebooks. We expect this tool to reduce the time spent tweaking network
layouts, allowing researches to generate more compelling figures.
Owner
- Name: Dalmolin Systems Biology Group
- Login: dalmolingroup
- Kind: organization
- Location: Natal, RN - Brazil
- Website: dalmolingroup.imd.ufrn.br
- Repositories: 5
- Profile: https://github.com/dalmolingroup
Research group in Systems Biology at UFRN
GitHub Events
Total
- Delete event: 1
- Push event: 3
- Pull request review event: 3
- Pull request review comment event: 4
- Pull request event: 1
- Create event: 1
Last Year
- Delete event: 1
- Push event: 3
- Pull request review event: 3
- Pull request review comment event: 4
- Pull request event: 1
- Create event: 1
Dependencies
DESCRIPTION
cran
- dplyr * imports
- igraph * imports
- jsonlite * imports
- shiny * imports
srcjs/package.json
npm
- @sveltejs/vite-plugin-svelte ^3.1.1 development
- @tailwindcss/typography ^0.5.14 development
- autoprefixer ^10.4.20 development
- flowbite ^2.5.1 development
- flowbite-svelte ^0.46.16 development
- flowbite-svelte-icons ^1.6.1 development
- svelte ^4.2.18 development
- tailwindcss ^3.4.9 development
- vite ^5.4.1 development
- d3-force ^3.0.0
- fabric ^6.4.2
- svelte-spa-router ^4.0.1
- vivagraphjs ^0.12.0
srcjs/pnpm-lock.yaml
npm
- aix-ppc64@0.21.5
- android-arm64@0.21.5
- android-arm@0.21.5
- android-x64@0.21.5
- cliui@8.0.2
- core@1.6.8
- core@2.11.8
- darwin-arm64@0.21.5
- darwin-x64@0.21.5
- dom@1.6.11
- estree@1.0.5
- freebsd-arm64@0.21.5
- freebsd-x64@0.21.5
- fs.scandir@2.1.5
- fs.stat@2.0.5
- fs.walk@1.2.8
- gen-mapping@0.3.5
- linux-arm64@0.21.5
- linux-arm@0.21.5
- linux-ia32@0.21.5
- linux-loong64@0.21.5
- linux-mips64el@0.21.5
- linux-ppc64@0.21.5
- linux-riscv64@0.21.5
- linux-s390x@0.21.5
- linux-x64@0.21.5
- monotone-cubic-spline@1.0.3
- netbsd-x64@0.21.5
- node-pre-gyp@1.0.11
- once@2.0.0
- openbsd-x64@0.21.5
- parseargs@0.11.0
- plugin-node-resolve@15.2.3
- pluginutils@5.1.0
- quick-lru@5.2.0
- remapping@2.3.0
- resolve-uri@3.1.2
- resolve@1.20.2
- rollup-android-arm-eabi@4.21.2
- rollup-android-arm64@4.21.2
- rollup-darwin-arm64@4.21.2
- rollup-darwin-x64@4.21.2
- rollup-linux-arm-gnueabihf@4.21.2
- rollup-linux-arm-musleabihf@4.21.2
- rollup-linux-arm64-gnu@4.21.2
- rollup-linux-arm64-musl@4.21.2
- rollup-linux-powerpc64le-gnu@4.21.2
- rollup-linux-riscv64-gnu@4.21.2
- rollup-linux-s390x-gnu@4.21.2
- rollup-linux-x64-gnu@4.21.2
- rollup-linux-x64-musl@4.21.2
- rollup-win32-arm64-msvc@4.21.2
- rollup-win32-ia32-msvc@4.21.2
- rollup-win32-x64-msvc@4.21.2
- set-array@1.2.1
- sourcemap-codec@1.5.0
- sunos-x64@0.21.5
- trace-mapping@0.3.25
- typography@0.5.15
- utils@0.2.8
- vite-plugin-svelte-inspector@2.1.0
- vite-plugin-svelte@3.1.2
- win32-arm64@0.21.5
- win32-ia32@0.21.5
- win32-x64@0.21.5
environment.yml
pypi