Code Monkey home page Code Monkey logo

raincloudplots's Introduction

Raincloud Plots

Paper license r-package r-package python-package

Code and tutorials to visualise your data in a way that is both beautiful and statistically valid.

Table of contents

Making Rainclouds in R

Option 1

ggrain - R package

Check out theggrain Github and the vignette for more details + tutorials!

Install

install.packages('ggrain')

Plot

library(ggrain)

ggplot(iris, aes(Species, Sepal.Length, fill = Species)) + 
	geom_rain()

Option 2

raincloudplots - R package

Install

remotes::install_github('jorvlan/raincloudplots')

Plot

library(raincloudplots)

df_1x1 <- data_1x1(
  array_1 = iris$Sepal.Length[1:50],
  array_2 = iris$Sepal.Length[51:100],
  jit_distance = .09,
  jit_seed = 321)
  
raincloud_1_h <- raincloud_1x1(
  data = df_1x1, 
  colors = (c('dodgerblue','darkorange')), 
  fills = (c('dodgerblue','darkorange')), 
  size = 1, 
  alpha = .6, 
  ort = 'h') +

scale_x_continuous(breaks=c(1,2), labels=c("Group1", "Group2"), limits=c(0, 3)) +
  xlab("Groups") + 
  ylab("Score") +
  theme_classic()

raincloud_1_h

Making Rainclouds in Python

PtitPrince - Python package

Check out the Github and the tutorial for more details!

Install

pip install ptitprince

Plot

import ptitprince as pt

pt.RainCloud(x = dx, y = dy, data = df, palette = pal, bw = sigma,
                 width_viol = .6, ax = ax, orient = ort)

Attribution

We really hope you find these tutorials helpful and want to use the code in your next paper or presentation!

This repository is made available under the MIT license which means you're welcome to use and remix the contents so long as you credit the creators: Micah Allen, Davide Poggiali, Kirstie Whitaker, Tom Rhys Marshall, Jordy van Langen, Nicholas Judd and Rogier Kievit.

If you use rainclouds please cite us!

Paper

- Allen, M., Poggiali, D., Whitaker, K., Marshall, T. R., van Langen, J., & Kievit, R. A.
    Raincloud plots: a multi-platform tool for robust data visualization [version 2; peer review: 2 approved] 
    Wellcome Open Research 2021, 4:63. https://doi.org/10.12688/wellcomeopenres.15191.2

Feedback

We'd love to hear your thoughts and any feedback you have. The best place to leave comments on the paper and the project in general is at the Wellcome Open Research paper. Just scroll to the bottom of that page (or click on the link at the side) and leave us feedback or ask a question.

You can also open an issue or submit a pull request to this repository if you find a bug! If it is a package specific question please make an issue on the ggrain or PtitPrince repositories.

Just check out our contributing guidelines for help getting started.

Happy plotting!

raincloudplots's People

Contributors

kirstiejane avatar jorvlan avatar tomrhysmarshall avatar timvanmourik avatar micahgallen avatar orchid00 avatar njudd avatar pindar777 avatar pog87 avatar mariusklug avatar steltenpower avatar ha0ye avatar earcanal avatar da5nsy avatar matsvanes avatar mdozmorov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.