Skip to content

Commit bf1ebc8

Browse files
docs: initial readme documentation
1 parent 8dd85b3 commit bf1ebc8

File tree

3 files changed

+129
-2
lines changed

3 files changed

+129
-2
lines changed

R/easylayout-package.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' easylayout: Publication-ready Networks Directly in your IDE
1+
#' easylayout: Publication-Ready Networks Directly in your IDE
22
#'
33
#' The `easylayout` package seamlessly bridges manipulation and visualization
44
#' by leveraging the user’s IDE itself (e.g., RStudio, VSCode). It is not yet

README.Rmd

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, include = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "man/figures/README-",
12+
out.width = "100%"
13+
)
14+
```
15+
16+
# easylayout: Publication-Ready Networks Directly in your IDE
17+
18+
<!-- badges: start -->
19+
[![R-CMD-check](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml)
20+
<!-- badges: end -->
21+
22+
Easylayout is an R package that seamlessly bridges manipulation and
23+
visualization by leveraging the user's IDE itself (e.g., RStudio, VSCode). It
24+
is **not** yet another visualization library, but instead aims to interconnect
25+
existing libraries and streamline their usage into the R ecosystem. Easylayout
26+
takes an igraph object and serializes it into a web application integrated with
27+
the IDE's interface through a Shiny server. The web application lays out the
28+
network by simulating attraction and repulsion forces. Simulation parameters
29+
can be adjusted in real-time. An editing mode allows moving and rotating nodes.
30+
The implementation aims for performance, so that even lower-end devices are
31+
able to work with relatively large networks. Once the user finishes tinkering
32+
the layout, it is sent back to the R session to be plotted through popular
33+
libraries like ggplot2 or even the base package itself.
34+
35+
## Installation
36+
37+
You can install the development version of easylayout from [GitHub](https://github.com/) with:
38+
39+
```r
40+
# install.packages("devtools")
41+
devtools::install_github("daniloimparato/easylayout", ref = "main")
42+
```
43+
44+
## Example
45+
46+
This is a basic example which shows you how to solve a common problem:
47+
48+
```{r example, eval = FALSE}
49+
library(easylayout)
50+
library(igraph)
51+
52+
g <- igraph::erdos.renyi.game(n = 5000, p.or.m = 10000, type = "gnm")
53+
54+
number_of_vertices <- igraph::vcount(g)
55+
56+
igraph::V(g)$label <- NA
57+
igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE)
58+
igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE)
59+
60+
plot(g, layout = easylayout)
61+
```
62+
63+
## Future work
64+
65+
The current implementation focuses on the R ecosystem, but using web
66+
technologies makes it easily portable to similar environments, like Jupyter
67+
Notebooks. We expect this tool to reduce the time spent tweaking network
68+
layouts, allowing researches to generate more compelling figures.

README.md

+60-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,60 @@
1-
# easylayout
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# easylayout: Publication-Ready Networks Directly in your IDE
5+
6+
<!-- badges: start -->
7+
8+
[![R-CMD-check](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dalmolingroup/easylayout/actions/workflows/R-CMD-check.yaml)
9+
<!-- badges: end -->
10+
11+
Easylayout is an R package that seamlessly bridges manipulation and
12+
visualization by leveraging the user’s IDE itself (e.g., RStudio,
13+
VSCode). It is **not** yet another visualization library, but instead
14+
aims to interconnect existing libraries and streamline their usage into
15+
the R ecosystem. Easylayout takes an igraph object and serializes it
16+
into a web application integrated with the IDE’s interface through a
17+
Shiny server. The web application lays out the network by simulating
18+
attraction and repulsion forces. Simulation parameters can be adjusted
19+
in real-time. An editing mode allows moving and rotating nodes. The
20+
implementation aims for performance, so that even lower-end devices are
21+
able to work with relatively large networks. Once the user finishes
22+
tinkering the layout, it is sent back to the R session to be plotted
23+
through popular libraries like ggplot2 or even the base package itself.
24+
25+
## Installation
26+
27+
You can install the development version of easylayout from
28+
[GitHub](https://github.com/) with:
29+
30+
``` r
31+
# install.packages("devtools")
32+
devtools::install_github("daniloimparato/easylayout", ref = "main")
33+
```
34+
35+
## Example
36+
37+
This is a basic example which shows you how to solve a common problem:
38+
39+
``` r
40+
library(easylayout)
41+
library(igraph)
42+
43+
g <- igraph::erdos.renyi.game(n = 5000, p.or.m = 10000, type = "gnm")
44+
45+
number_of_vertices <- igraph::vcount(g)
46+
47+
igraph::V(g)$label <- NA
48+
igraph::V(g)$size <- sample(1:5, number_of_vertices, replace = TRUE)
49+
igraph::V(g)$color <- sample(rainbow(5), number_of_vertices, replace = TRUE)
50+
51+
plot(g, layout = easylayout)
52+
```
53+
54+
## Future work
55+
56+
The current implementation focuses on the R ecosystem, but using web
57+
technologies makes it easily portable to similar environments, like
58+
Jupyter Notebooks. We expect this tool to reduce the time spent tweaking
59+
network layouts, allowing researches to generate more compelling
60+
figures.

0 commit comments

Comments
 (0)