• Stars
    star
    829
  • Rank 55,018 (Top 2 %)
  • Language
    R
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visualizations of distributions and uncertainty

ggdist: Visualizations of distributions and uncertainty

R build status Coverage status CRAN status Download count DOI

Preview of ggdist plots

ggdist is an R package that provides a flexible set of ggplot2 geoms and stats designed especially for visualizing distributions and uncertainty. It is designed for both frequentist and Bayesian uncertainty visualization, taking the view that uncertainty visualization can be unified through the perspective of distribution visualization: for frequentist models, one visualizes confidence distributions or bootstrap distributions (see vignette("freq-uncertainty-vis")); for Bayesian models, one visualizes probability distributions (see the tidybayes package, which builds on top of ggdist).

The geom_slabinterval() / stat_slabinterval() family (see vignette("slabinterval")) makes it easy to visualize point summaries and intervals, eye plots, half-eye plots, ridge plots, CCDF bar plots, gradient plots, histograms, and more:

The slabinterval family of geoms and stats

The geom_dotsinterval() / stat_dotsinterval() family (see vignette("dotsinterval")) makes it easy to visualize dot+interval plots, Wilkinson dotplots, beeswarm plots, and quantile dotplots (and combined with half-eyes, composite plots like rain cloud plots):

The geom_lineribbon() / stat_lineribbon() family (see vignette("lineribbon")) makes it easy to visualize fit lines with an arbitrary number of uncertainty bands:

All stat in ggdist also support visualizing analytical distributions and vectorized distribution data types like distributional objects or posterior::rvar() objects. This is particularly useful when visualizing uncertainty in frequentist models (see vignette("freq-uncertainty-vis")) or when visualizing priors in a Bayesian analysis.

The ggdist geoms and stats also form a core part of the tidybayes package (in fact, they originally were part of tidybayes). For examples of the use of ggdist geoms and stats for visualizing uncertainty in Bayesian models, see the vignettes in tidybayes, such as vignette("tidybayes", package = "tidybayes") or vignette("tidy-brms", package = "tidybayes").

Cheat sheets

Installation

You can install the currently-released version from CRAN with this R command:

install.packages("ggdist")

Alternatively, you can install the latest development version from GitHub with these R commands:

install.packages("devtools")
devtools::install_github("mjskay/ggdist")

Feedback, issues, and contributions

I welcome feedback, suggestions, issues, and contributions! I am not particularly reliable over email, though you can contact me at [email protected]. On Twitter I am more reliable. If you have found a bug, please file it here with minimal code to reproduce the issue. Pull requests should be filed against the dev branch.

Citing ggdist

Matthew Kay (2023). ggdist: Visualizations of Distributions and Uncertainty. R package version 3.3.0, https://mjskay.github.io/ggdist/. DOI: 10.5281/zenodo.3879620.

More Repositories

1

tidybayes

Bayesian analysis + tidy data + geoms (R package)
R
712
star
2

ggblend

Support for blend modes in ggplot2
R
166
star
3

uncertainty-examples

Uncertainty visualization examples
HTML
107
star
4

ARTool

R Package for Aligned Rank Transform for Nonparametric Factorial ANOVAs
R
55
star
5

when-ish-is-my-bus

Data and code for "When (ish) is My Bus? User-centered Visualizations of Uncertainty in Everyday, Mobile Predictive Systems" (CHI 2016)
R
45
star
6

election-galton-board

Plinko boards for the 2020 US Presidential election predictions
HTML
28
star
7

tidybayes.rethinking

R package to allow tidybayes to work with the rethinking package
R
25
star
8

uncertainty-vis-course

25
star
9

uncertainty-vis-book

Uncertainty Visualization book
TeX
20
star
10

gender-in-image-search

Data and analysis of unequal representation and gender stereotypes in image search results for occupations
HTML
19
star
11

by_row

A proposal for an alternative to rowwise() and mutate() + map()
9
star
12

ggbuilder

An (experimental) alternative way to build ggplot layers
R
6
star
13

acceptability-of-accuracy

Code for generating surveys and fitting models of acceptability of accuracy
CSS
6
star
14

ggdist-paper

Source and supplement for the ggdist paper
HTML
6
star
15

wordle_solver

A simple solver for Wordles
5
star
16

bayes-for-chi

Data and code for "Researcher-Centered Design of Statistics: Why Bayesian Statistics Better Fit the Culture and Incentives of HCI" (CHI 2016)
R
5
star
17

explodeAssign

Explode assignment operators for R
R
4
star
18

plinko

Animated plinko boards in R
R
4
star
19

metroidvania-ranks

3
star
20

dots

Copy ellipsis arguments from one set of functions to a wrapper function in R
R
2
star
21

linear-in-probit

Linear in probit subjective probability transformations
1
star
22

metabayes

R package for specifying Bayesian models (JAGS, Stan) as R code
R
1
star
23

vax

1
star
24

gatherplots-data

Recreation of charts from the gatherplots paper
HTML
1
star
25

bayes_plots

1
star
26

uneval

uneval: Non-standard evaluation and partial function application with promises
R
1
star