see

see: An R Package for Visualizing Statistical Models - Published in JOSS (2021)

https://github.com/easystats/see

Science Score: 93.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
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

data-visualization easystats ggplot2 hacktoberfest plotting r rstats see statistics visualisation visualization

Keywords from Contributors

standardization correlation predict r2 mixed-models loo aic interpretability multilevel-correlations matrix

Scientific Fields

Engineering Computer Science - 80% confidence
Last synced: 6 months ago · JSON representation

Repository

:art: Visualisation toolbox for beautiful and publication-ready figures

Basic Info
Statistics
  • Stars: 931
  • Watchers: 21
  • Forks: 44
  • Open Issues: 37
  • Releases: 17
Topics
data-visualization easystats ggplot2 hacktoberfest plotting r rstats see statistics visualisation visualization
Created almost 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Support

README.Rmd

---
output: github_document
bibliography: paper/paper.bib
csl: apa.csl
---

# see: Model Visualisation Toolbox for 'easystats' and 'ggplot2' 

```{r, echo=FALSE, warning=FALSE, message=FALSE}
library(see)

knitr::opts_chunk$set(
  dpi = 150,
  collapse = TRUE,
  out.width = "100%",
  fig.path = "man/figures/",
  warning = FALSE,
  message = FALSE
)
```

[![DOI](https://joss.theoj.org/papers/10.21105/joss.03393/status.svg)](https://doi.org/10.21105/joss.03393)
[![downloads](https://cranlogs.r-pkg.org/badges/see)](https://cran.r-project.org/package=see)
[![total](https://cranlogs.r-pkg.org/badges/grand-total/see)](https://cranlogs.r-pkg.org/)

***"Damned are those who believe without seeing"***

*easystats* is a collection of packages that operate in synergy to provide a consistent and intuitive syntax when working with statistical models in the R programming language [@base2021]. Most *easystats* packages return comprehensive numeric summaries of model parameters and performance. The *see* package complements these numeric summaries with a host of functions and tools to produce a range of publication-ready visualizations for model parameters, predictions, and performance diagnostics. As a core pillar of *easystats*, the *see* package helps users to utilize visualization for more informative, communicable, and well-rounded scientific reporting.



# Installation

[![CRAN](https://www.r-pkg.org/badges/version/see)](https://cran.r-project.org/package=see) [![see status badge](https://easystats.r-universe.dev/badges/see)](https://easystats.r-universe.dev) [![R-CMD-check](https://github.com/easystats/see/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/easystats/see/actions) [![codecov](https://codecov.io/gh/easystats/see/branch/main/graph/badge.svg)](https://app.codecov.io/gh/easystats/see)

The *see* package is available on CRAN, while its latest development version is available on R-universe (from _rOpenSci_).

Type | Source | Command
---|---|---
Release | CRAN | `install.packages("see")`
Development | r-universe | `install.packages("see", repos = "https://easystats.r-universe.dev")`
Development | GitHub | `remotes::install_github("easystats/see")`

Once you have downloaded the package, you can then load it using:

```{r}
library("see")
```

> **Tip**
>
> Instead of `library(see)`, use `library(easystats)`.
> This will make all features of the  easystats-ecosystem available.
>
> To stay updated, use `easystats::install_latest()`.

# Plotting functions for 'easystats' packages

[![Documentation](https://img.shields.io/badge/documentation-see-orange.svg?colorB=E91E63)](https://easystats.github.io/see/)
[![Blog](https://img.shields.io/badge/blog-easystats-orange.svg?colorB=FF9800)](https://easystats.github.io/blog/posts/)
[![Features](https://img.shields.io/badge/features-see-orange.svg?colorB=2196F3)](https://easystats.github.io/see/reference/index.html)


Below we present one or two plotting methods for each *easystats* package, but many other methods are available. Interested readers are encouraged to explore the range of examples on the package [website](https://easystats.github.io/see/articles/).

## [parameters](https://github.com/easystats/parameters)

The *parameters* package converts summaries of regression model objects into data frames [@Lüdecke2020parameters]. The *see* package can take this transformed object and, for example, create a dot-and-whisker plot for the extracted regression estimates simply by passing the `parameters` class object to `plot()`.

```{r parameters1}
library(parameters)
library(see)

model <- lm(wt ~ am * cyl, data = mtcars)

plot(parameters(model))
```

As *see* outputs objects of class `ggplot`, *ggplot2* functions can be added as layers to the plot the same as with all other *ggplot2* visualizations. For example, we might add a title using `labs()` from *ggplot2*.

```{r parameters2}
library(parameters)
library(see)

model <- lm(wt ~ am * cyl, data = mtcars)

plot(parameters(model)) +
  ggplot2::labs(title = "A Dot-and-Whisker Plot")
```

Plotting functions for the **parameters** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/parameters.html).

## [bayestestR](https://github.com/easystats/bayestestR)

Similarly, for Bayesian regression model objects, which are handled by the *bayestestR* package [@Makowski2019], the *see* package provides special plotting methods relevant for Bayesian models (e.g., Highest Density Interval, or *HDI*). Users can fit the model and pass the model results, extracted via *bayestestR*, to `plot()`.

```{r bayestestR}
library(bayestestR)
library(rstanarm)
library(see)

set.seed(123)
model <- stan_glm(wt ~ mpg, data = mtcars, refresh = 0)
result <- hdi(model, ci = c(0.5, 0.75, 0.89, 0.95))

plot(result)
```

Plotting functions for the **bayestestR** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/bayestestR.html).

## [performance](https://github.com/easystats/performance)

The *performance* package is primarily concerned with checking regression model assumptions [@Lüdecke2020performance]. The *see* package offers tools to visualize these assumption checks, such as the normality of residuals. Users simply pass the fit model object to the relevant *performance* function (`check_normality()` in the example below). Then, this result can be passed to `plot()` to produce a *ggplot2* visualization of the check on normality of the residuals.

```{r performance}
library(performance)
library(see)

model <- lm(wt ~ mpg, data = mtcars)
check <- check_normality(model)

plot(check, type = "qq")
```

Plotting functions for the **performance** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/performance.html).

## [effectsize](https://github.com/easystats/effectsize)

The *effectsize* package computes a variety of effect size metrics for fitted models to assesses the practical importance of observed effects [@Ben-Shachar2020]. In conjunction with *see*, users are able to visualize the magnitude and uncertainty of effect sizes by passing the model object to the relevant *effectsize* function (`omega_squared()` in the following example), and then to `plot()`.

```{r effectsize}
library(effectsize)
library(see)

model <- aov(wt ~ am * cyl, data = mtcars)

plot(omega_squared(model))
```

Plotting functions for the **effectsize** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/effectsize.html).

## [modelbased](https://github.com/easystats/modelbased)

The *modelbased* package computes model-based estimates and predictions from fitted models [@Makowski2020modelbased]. *see* provides methods to quickly visualize these model predictions. For the following example to work, you need to have installed the *emmeans* package first.

```{r modelbased1}
library(modelbased)
library(see)

data(mtcars)
mtcars$gear <- as.factor(mtcars$gear)
model <- lm(mpg ~ wt * gear, data = mtcars)

predicted <- estimate_expectation(model, data = "grid")
plot(predicted, show_data = TRUE)
```

One can also visualize *marginal means* (i.e., the mean at each factor level averaged over other predictors) using `estimate_means()`, that is then passed to `plot()`.

```{r modelbased2, error=TRUE}
means <- estimate_means(model)

plot(means)
```

Plotting functions for the **modelbased** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/modelbased.html).

## [correlation](https://github.com/easystats/correlation)

The *correlation* package provides a unified syntax and human-readable code to carry out many types of correlation analysis [@Makowski2020]. A user can run `summary(correlation(data))` to create a construct a correlation matrix for the variables in a dataframe. With *see*, this matrix can be passed to `plot()` to visualize these correlations in a correlation matrix.

```{r correlation, error=FALSE}
library(correlation)
library(see)

results <- summary(correlation(iris))

plot(results, show_data = "points")
```

Plotting functions for the **correlation** package are demonstrated [in this vignette](https://easystats.github.io/see/articles/correlation.html).

# Themes

### Modern

```{r}
library(ggplot2)

ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
  geom_point2() +
  theme_modern()
```

### Lucid

```{r}
library(ggplot2)

p <- ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
  geom_point2()

p + theme_lucid()
```

### Blackboard

```{r}
p + theme_blackboard()
```

### Abyss

```{r}
p + theme_abyss()
```

# Palettes

This is just one example of the available palettes. See [this vignette](https://easystats.github.io/see/articles/seecolorscales.html) for a detailed overview of palettes and color scales.

### Material design

```{r}
p1 <- ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_boxplot() +
  theme_modern(axis.text.angle = 45) +
  scale_fill_material_d()

p2 <- ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_violin() +
  theme_modern(axis.text.angle = 45) +
  scale_fill_material_d(palette = "ice")

p3 <- ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Sepal.Length)) +
  geom_point2() +
  theme_modern() +
  scale_color_material(discrete = FALSE)
```

## Multiple plots

The `plots()` function allows us to plot the figures side by side.

```{r}
plots(p1, p2, p3, n_columns = 2)
```

The `plots()` function can also be used to add **tags** (*i.e.*, labels for subfigures).

```{r}
plots(p1, p2, p3,
  n_columns = 2,
  tags = paste("Fig. ", 1:3)
)
```

# Geoms

## Better looking points

`geom_points2()` and `geom_jitter2()` allow points without borders and contour.

```{r, fig.width=9.5, fig.height=5.8}
normal <- ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
  geom_point(size = 8, alpha = 0.3) +
  theme_modern()

new <- ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
  geom_point2(size = 8, alpha = 0.3) +
  theme_modern()

plots(normal, new, n_columns = 2)
```



## Half-violin Half-dot plot

Create a half-violin half-dot plot, useful for visualising the distribution and the sample size at the same time.

```{r}
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_violindot(fill_dots = "black") +
  theme_modern() +
  scale_fill_material_d()
```

## Radar chart (Spider plot)

```{r}
library(datawizard)

# prepare the data in tidy format
data <- iris |>
  datawizard::data_group("Species") |>
  datawizard::data_summary(
    Sepal.Length = mean(Sepal.Length),
    Sepal.Width = mean(Sepal.Width),
    Petal.Length = mean(Petal.Length),
    Petal.Width = mean(Petal.Width)
  ) |>
  datawizard::reshape_longer(c(
    "Sepal.Length",
    "Sepal.Width",
    "Petal.Length",
    "Petal.Width"
  ))

data |>
  ggplot(aes(
    x = name,
    y = value,
    color = Species,
    group = Species,
    fill = Species
  )) +
  geom_polygon(linewidth = 1, alpha = 0.1) +
  coord_radar() +
  theme_radar()
```

# Contributing and Support

In case you want to file an issue or contribute in another way to the package, please follow [this guide](https://github.com/easystats/see/blob/master/.github/CONTRIBUTING.md). For questions about the functionality, you may either contact us via email or also file an issue.

# Code of Conduct

Please note that this project is released with a
[Contributor Code of Conduct](https://easystats.github.io/see/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms.

# References

Owner

  • Name: easystats
  • Login: easystats
  • Kind: organization
  • Location: worldwide

Make R stats easy!

JOSS Publication

see: An R Package for Visualizing Statistical Models
Published
August 06, 2021
Volume 6, Issue 64, Page 3393
Authors
Daniel Lüdecke ORCID
University Medical Center Hamburg-Eppendorf, Germany
Indrajeet Patil ORCID
Center for Humans and Machines, Max Planck Institute for Human Development, Berlin, Germany
Mattan S. Ben-Shachar ORCID
Ben-Gurion University of the Negev, Israel
Brenton M. Wiernik ORCID
Department of Psychology, University of South Florida, USA
Philip Waggoner ORCID
University of Chicago, USA
Dominique Makowski ORCID
Nanyang Technological University, Singapore
Editor
Frederick Boehm ORCID
Tags
easystats ggplot2 ggplot2-extension

Papers & Mentions

Total mentions: 3

Single‐cell imaging of genome organization and dynamics
Last synced: 4 months ago
Mapping the coevolution, leadership and financing of research on viral vectors, RNAi, CRISPR/Cas9 and other genomic editing technologies
Last synced: 4 months ago
Generating a Bessel-Gaussian beam for the application in optical engineering
Last synced: 4 months ago

GitHub Events

Total
  • Create event: 31
  • Release event: 2
  • Issues event: 23
  • Watch event: 34
  • Delete event: 23
  • Issue comment event: 80
  • Push event: 214
  • Pull request event: 51
  • Pull request review event: 34
  • Pull request review comment event: 28
  • Fork event: 3
Last Year
  • Create event: 31
  • Release event: 2
  • Issues event: 23
  • Watch event: 34
  • Delete event: 23
  • Issue comment event: 80
  • Push event: 214
  • Pull request event: 51
  • Pull request review event: 34
  • Pull request review comment event: 28
  • Fork event: 3

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 1,541
  • Total Committers: 12
  • Avg Commits per committer: 128.417
  • Development Distribution Score (DDS): 0.385
Past Year
  • Commits: 105
  • Committers: 6
  • Avg Commits per committer: 17.5
  • Development Distribution Score (DDS): 0.486
Top Committers
Name Email Commits
Daniel m****l@d****e 948
Indrajeet Patil p****e@g****m 320
Dominique Makowski d****9@g****m 94
Brenton M. Wiernik b****k 85
mattansb 3****b 50
Etienne Bacher 5****r 13
Philip Waggoner 3****r 11
github-actions[bot] 4****] 9
Jeffrey Stevens j****s@g****m 6
Jonathan Trattner a****s@j****m 3
tolgakurtuluss t****5@g****m 1
Rémi Thériault 1****c 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 89
  • Total pull requests: 197
  • Average time to close issues: 9 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 31
  • Total pull request authors: 11
  • Average comments per issue: 2.6
  • Average comments per pull request: 1.54
  • Merged pull requests: 156
  • Bot issues: 0
  • Bot pull requests: 32
Past Year
  • Issues: 12
  • Pull requests: 68
  • Average time to close issues: 3 days
  • Average time to close pull requests: 3 days
  • Issue authors: 10
  • Pull request authors: 7
  • Average comments per issue: 0.42
  • Average comments per pull request: 1.38
  • Merged pull requests: 51
  • Bot issues: 0
  • Bot pull requests: 16
Top Authors
Issue Authors
  • IndrajeetPatil (23)
  • strengejacke (18)
  • bwiernik (5)
  • jmgirard (4)
  • DominiqueMakowski (4)
  • etiennebacher (4)
  • rempsyc (3)
  • RoelVerbelen (3)
  • mattansb (2)
  • madebyafox (2)
  • montesmariana (1)
  • dana-and-monsters (1)
  • lnalborczyk (1)
  • mz555 (1)
  • jimvine (1)
Pull Request Authors
  • strengejacke (85)
  • IndrajeetPatil (49)
  • github-actions[bot] (32)
  • bwiernik (16)
  • etiennebacher (7)
  • rempsyc (3)
  • tolgakurtuluss (1)
  • DominiqueMakowski (1)
  • dependabot[bot] (1)
  • vincentarelbundock (1)
  • mattansb (1)
Top Labels
Issue Labels
enhancement :fire: (16) Enhancement :boom: (8) bug :bug: (6) Discussion :parrot: (3) Bug :bug: (3) documentation :books: (2) question :question: (2) Help us :eyes: (2) Beginner-friendly :handshake: (2) low priority :sleeping: (1) good first issue :+1: (1) High priority :running_man: (1) Won't fix :no_entry_sign: (1) 3 investigators :grey_question::question: (1)
Pull Request Labels
Auto-update (20) auto-update (12) documentation :books: (1) hacktoberfest-accepted (1) dependencies (1) github_actions (1)

Packages

  • Total packages: 3
  • Total downloads:
    • cran 13,517 last-month
  • Total docker downloads: 2,548
  • Total dependent packages: 16
    (may contain duplicates)
  • Total dependent repositories: 53
    (may contain duplicates)
  • Total versions: 43
  • Total maintainers: 1
cran.r-project.org: see

Model Visualisation Toolbox for 'easystats' and 'ggplot2'

  • Versions: 32
  • Dependent Packages: 16
  • Dependent Repositories: 52
  • Downloads: 13,517 Last month
  • Docker Downloads: 2,548
Rankings
Stargazers count: 0.4%
Forks count: 1.7%
Dependent repos count: 3.4%
Average: 3.5%
Dependent packages count: 3.8%
Downloads: 4.1%
Docker downloads count: 7.4%
Last synced: 6 months ago
proxy.golang.org: github.com/easystats/see
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
conda-forge.org: r-see
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Stargazers count: 14.8%
Dependent repos count: 24.1%
Forks count: 28.6%
Average: 29.8%
Dependent packages count: 51.5%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.6 depends
  • grDevices * depends
  • graphics * depends
  • stats * depends
  • bayestestR >= 0.13.0 imports
  • correlation >= 0.8.3 imports
  • datawizard >= 0.6.4 imports
  • effectsize >= 0.8.2 imports
  • ggplot2 >= 3.4.0 imports
  • insight >= 0.18.8 imports
  • modelbased >= 0.8.5 imports
  • parameters >= 0.20.0 imports
  • performance >= 0.10.1 imports
  • MASS * suggests
  • NbClust * suggests
  • brms * suggests
  • curl * suggests
  • emmeans * suggests
  • factoextra * suggests
  • ggdist * suggests
  • ggraph * suggests
  • ggrepel * suggests
  • ggridges * suggests
  • ggside * suggests
  • grid * suggests
  • httr * suggests
  • lavaan * suggests
  • lme4 * suggests
  • logspline * suggests
  • mclust * suggests
  • metafor * suggests
  • mgcv * suggests
  • nFactors * suggests
  • patchwork * suggests
  • poorman * suggests
  • psych * suggests
  • qqplotr * suggests
  • randomForest * suggests
  • rlang * suggests
  • rmarkdown * suggests
  • rstanarm * suggests
  • scales >= 1.2.1 suggests
  • splines * suggests
  • testthat >= 3.1.6 suggests
  • tidygraph * suggests
  • vdiffr >= 1.0.5 suggests