alluvial

Alluvial diagrams

https://github.com/mbojan/alluvial

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 7 committers (28.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords from Contributors

alluvial-diagrams alluvial-plots categorical-data-visualization repeated-measures-data
Last synced: 11 months ago · JSON representation

Repository

Alluvial diagrams

Basic Info
  • Host: GitHub
  • Owner: mbojan
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 417 KB
Statistics
  • Stars: 143
  • Watchers: 9
  • Forks: 26
  • Open Issues: 7
  • Releases: 0
Created over 12 years ago · Last pushed over 4 years ago
Metadata Files
Readme License

README.Rmd

---
output: 
  github_document:
    html_preview: false
bibliography: vignettes/alluvial.bib
editor_options: 
  chunk_output_type: console
---

```{r setup, include=FALSE, cache=FALSE}
library(alluvial)
library(dplyr)

knitr::opts_chunk$set(
  fig.width=8,
  fig.height=6,
  fig.path = "tools/"
)

knitr::render_markdown(strict=FALSE)
```



# R package for drawing alluvial diagrams


[![R-CMD-check](https://github.com/mbojan/alluvial/workflows/R-CMD-check/badge.svg)](https://github.com/mbojan/alluvial/actions)
[![rstudio mirror downloads](http://cranlogs.r-pkg.org/badges/alluvial?color=2ED968)](http://cranlogs.r-pkg.org/)
[![cran version](http://www.r-pkg.org/badges/version/alluvial)](https://cran.r-project.org/package=alluvial)


What are alluvial diagrams? See for example:

* [Wikipedia](http://en.wikipedia.org/wiki/Alluvial_diagram)
* My [blog post](http://bc.bojanorama.pl/2014/03/alluvial-diagrams) showing-off this package
* Some discussion on [CrossValidated](http://stats.stackexchange.com/questions/12029/is-it-possible-to-create-parallel-sets-plot-using-r)

This package use base R **graphics** [@r-graphics] package. For Grammar of Graphics implementation see [**ggalluvial**](https://github.com/corybrunson/ggalluvial) [@r-ggalluvial;@ggalluvial-article].


## Examples

Alluvial diagram of `datasets::Titanic` data made with `alluvial()`. Notice how each category block becomes a stacked barchart showing relative frequency of survivors.

```{r alluvial}
tit <- tibble::as_tibble(Titanic)

tit %>% head() %>% knitr::kable()

alluvial(
    select(tit, Survived, Sex, Age, Class),
    freq=tit$n,
    col = ifelse(tit$Survived == "Yes", "orange", "grey"),
    border = ifelse(tit$Survived == "Yes", "orange", "grey"),
    layer = tit$Survived != "Yes",
    alpha = 0.8,
    blocks=FALSE
  )
```





Alluvial diagram for multiple time series / cross-sectional data based on `alluvial::Refugees` data made with `alluvial_ts()`.

```{r alluvial_ts}
Refugees %>% head() %>% knitr::kable()


set.seed(39) # for nice colours
cols <- hsv(h = sample(1:10/10), s = sample(3:12)/15, v = sample(3:12)/15)

alluvial_ts(Refugees, wave = .3, ygap = 5, col = cols, plotdir = 'centred', alpha=.9,
            grid = TRUE, grid.lwd = 5, xmargin = 0.2, lab.cex = .7, xlab = '',
            ylab = '', border = NA, axis.cex = .8, leg.cex = .7,
            leg.col='white', 
            title = "UNHCR-recognised refugees\nTop 10 countries (2003-13)\n")
```



## Installation

Install stable version from CRAN using

```{r, eval=FALSE}
install.packages("alluvial")
```

or development version from GitHub using `remotes::install_github()`:

```{r, eval=FALSE}
remotes::install_github("mbojan/alluvial", build_vignettes=TRUE)
```




## References

Owner

  • Name: Michał Bojanowski
  • Login: mbojan
  • Kind: user
  • Location: Warsaw
  • Company: Kozminski University

sociologist :: data scientist :: social networks analyst :: computational modeler :: seasoned R developer

GitHub Events

Total
  • Watch event: 6
  • Fork event: 1
Last Year
  • Watch event: 6
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 145
  • Total Committers: 7
  • Avg Commits per committer: 20.714
  • Development Distribution Score (DDS): 0.145
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michal Bojanowski m****2@g****m 124
Robin Edwards g****1@g****m 9
Fabian Grammes f****s@g****m 4
corybrunson j****o@v****u 3
Cory Brunson b****n@u****u 3
Gökçen Eraslan g****n@g****m 1
corybrunson c****n@c****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 42
  • Total pull requests: 7
  • Average time to close issues: 8 months
  • Average time to close pull requests: 13 days
  • Total issue authors: 18
  • Total pull request authors: 4
  • Average comments per issue: 1.98
  • Average comments per pull request: 3.0
  • Merged pull requests: 6
  • 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
  • mbojan (21)
  • corybrunson (4)
  • epo071 (2)
  • m-macaskill (1)
  • emhart (1)
  • axellecb (1)
  • DavidSriker (1)
  • mmaresch (1)
  • CarolineXGao (1)
  • semenoffalex (1)
  • churi15 (1)
  • dvictori (1)
  • anassal (1)
  • zief0002 (1)
  • tyokota (1)
Pull Request Authors
  • corybrunson (4)
  • FabianGrammes (1)
  • geotheory (1)
  • gokceneraslan (1)
Top Labels
Issue Labels
enhancement (6) documentation (2) bug (2) question (1) invalid (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 4,212 last-month
  • Total docker downloads: 43,851
  • Total dependent packages: 7
    (may contain duplicates)
  • Total dependent repositories: 7
    (may contain duplicates)
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: alluvial

Alluvial Diagrams

  • Versions: 2
  • Dependent Packages: 6
  • Dependent Repositories: 7
  • Downloads: 4,212 Last month
  • Docker Downloads: 43,851
Rankings
Forks count: 3.0%
Stargazers count: 3.0%
Dependent packages count: 7.3%
Downloads: 7.8%
Average: 9.5%
Dependent repos count: 11.1%
Docker downloads count: 24.9%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: r-alluvial
  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Stargazers count: 27.7%
Dependent packages count: 28.8%
Forks count: 29.9%
Average: 30.1%
Dependent repos count: 34.0%
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • dplyr * imports
  • tidyr * imports
  • devtools * suggests
  • knitr * suggests
  • reshape2 * suggests
  • rmarkdown * suggests
  • testthat * suggests