Science Score: 23.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
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
Beautiful graph drawing
Basic Info
- Host: GitHub
- Owner: USCCANA
- License: other
- Language: R
- Default Branch: master
- Homepage: https://usccana.github.io/netplot/
- Size: 115 MB
Statistics
- Stars: 52
- Watchers: 3
- Forks: 2
- Open Issues: 7
- Releases: 0
Topics
Metadata Files
README.md
netplot
An alternative graph visualization tool that emphasizes aesthetics, providing default parameters that deliver out-of-the-box lovely visualizations.
Some features:
- Auto-scaling of vertices using sizes relative to the plotting device.
- Embedded edge color mixer.
- True curved edges drawing.
- User-defined edge curvature.
- Nicer vertex frame color.
- Better use of space-filling the plotting device.
The package uses the grid plotting system (just like ggplot2).
Installation
You can install the released version of netplot from CRAN with:
r
install.packages("netplot")
And the development version from GitHub with:
``` r
install.packages("devtools")
devtools::install_github("USCCANA/netplot") ```
Example
This is a basic example which shows you how to solve a common problem:
``` r library(igraph)
>
> Attaching package: 'igraph'
> The following objects are masked from 'package:stats':
>
> decompose, spectrum
> The following object is masked from 'package:base':
>
> union
library(netplot)
> Loading required package: grid
>
> Attaching package: 'netplot'
> The following object is masked from 'package:igraph':
>
> ego
set.seed(1) data("UKfaculty", package = "igraphdata") l <- layoutwithfr(UKfaculty)
> This graph was created by an old(er) igraph version.
> Call upgrade_graph() on it to use with the current igraph version
> For now we convert it on the fly...
plot(UKfaculty, layout = l) # ala igraph ```

``` r
V(UKfaculty)$ss <- runif(vcount(UKfaculty)) nplot(UKfaculty, layout = l) # ala netplot ```

r
sna::gplot(intergraph::asNetwork(UKfaculty), coord=l)

UKfaculty
``` r
Random names
set.seed(1) nam <- sample(babynames::babynames$name, vcount(UKfaculty))
ans <- nplot( UKfaculty, layout = l, vertex.color = ~ Group, vertex.nsides = ~ Group, vertex.label = nam, vertex.size.range = c(.01, .03, 4), bg.col = "transparent", vertex.label.show = .25, vertex.label.range = c(10, 25), edge.width.range = c(1, 4, 5), vertex.label.fontfamily = "sans" )
Plot it!
ans ```

Starting version 0.2-0, we can use gradients!
r
ans |>
set_vertex_gpar(
element = "core",
fill = lapply(get_vertex_gpar(ans, "frame", "col")$col, \(i) {
radialGradient(c("white", i), cx1=.8, cy1=.8, r1=0)
}))

USairports
``` r
Loading the data
data(USairports, package="igraphdata")
Generating a layout naively
layout <- V(USairports)$Position
> This graph was created by an old(er) igraph version.
> Call upgrade_graph() on it to use with the current igraph version
> For now we convert it on the fly...
layout <- do.call(rbind, lapply(layout, function(x) strsplit(x, " ")[[1]])) layout[] <- stringr::str_remove(layout, "^[a-zA-Z]+") layout <- matrix(as.numeric(layout[]), ncol=2)
Some missingness
layout[which(!complete.cases(layout)), ] <- apply(layout, 2, mean, na.rm=TRUE)
Have to rotate it (it doesn't matter the origin)
layout <- netplot:::rotate(layout, c(0,0), pi/2)
Simplifying the network
net <- simplify(USairports, edge.attr.comb = list( weight = "sum", name = "concat", Passengers = "sum", "ignore" ))
Pretty graph
nplot( net, layout = layout, edge.width = ~ Passengers, edge.color = ~ ego(col = "white", alpha = 0) + alter(col = "yellow", alpha = .75), skip.vertex = TRUE, skip.arrows = TRUE, edge.width.range = c(.75, 4, 4), bg.col = "black", edge.line.breaks = 10 ) ```

Owner
- Name: USC Center for Applied Network Analysis
- Login: USCCANA
- Kind: organization
- Location: Los Angeles, CA
- Website: https://cana.usc.edu
- Repositories: 2
- Profile: https://github.com/USCCANA
GitHub Events
Total
- Watch event: 2
- Push event: 2
Last Year
- Watch event: 2
- Push event: 2
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| George G. Vega Yon | g****n@g****m | 116 |
| Porter Bischoff | u****4@n****u | 9 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 12
- Total pull requests: 4
- Average time to close issues: about 1 year
- Average time to close pull requests: 1 minute
- Total issue authors: 4
- Total pull request authors: 1
- Average comments per issue: 0.5
- Average comments per pull request: 0.25
- Merged pull requests: 3
- 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
- gvegayon (9)
- pbischoff3 (1)
- mjrmason (1)
- pkr2103 (1)
Pull Request Authors
- gvegayon (5)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 417 last-month
- Total docker downloads: 76
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: netplot
Beautiful Graph Drawing
- Homepage: https://github.com/USCCANA/netplot
- Documentation: http://cran.r-project.org/web/packages/netplot/netplot.pdf
- License: MIT + file LICENSE
-
Latest release: 0.3-0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.4.0 depends
- grid * depends
- grDevices * imports
- graphics * imports
- igraph * imports
- network * imports
- sna * imports
- stats * imports
- ggplot2 * suggests
- ggraph * suggests
- gridBase * suggests
- gridExtra * suggests
- gridGraphics * suggests
- igraphdata * suggests
- intergraph * suggests
- knitr * suggests
- magrittr * suggests
- markdown * suggests
- rmarkdown * suggests