This is the anatomy of #tidyplots 🩻
They come in 50 x 50 mm, but can be resized to your linking using `adjust_size()` 🧰
#rstats #dataviz #phd
library(tidyplots) animals |> tidyplot(x = weight, y = speed) |> add_reference_lines(x = 4000, y = c(100, 200), linetype = "dotdash") |> add_data_points()
This is how you can add reference lines in #tidyplots 🚀
#rstats #dataviz #phd
library(tidyplots) energy |> tidyplot(y = energy, color = energy_source) |> add_donut()
This is how you can generate donut charts in #tidyplots 🍩
#rstats #dataviz #phd
library(tidyplots) spendings |> tidyplot(x = category, y = amount, color = category) |> add_sum_bar() |> adjust_x_axis(rotate_labels = TRUE) |> sort_x_axis_levels() |> adjust_colors(new_colors = colors_discrete_candy)
This is how you can change the color scheme in #tidyplots 🌈
#rstats #dataviz #phd
library(tidyplots) study |> tidyplot(x = group, y = score, color = group) |> add_median_bar(alpha = 0.3) |> add_median_dash() |> add_data_points_beeswarm(white_border = TRUE) |> remove_x_axis_labels() |> adjust_size(width = 20, height = 50)
This is how you can adjust the plot size in #tidyplots 🔥
All measures are in mm.
#rstats #dataviz #phd
A stacked bar chart titled “Gender Pay Gaps in Australia” showing that of 1,105 occupations, only 7% pay women more than men. The single vertical bar is mostly dark blue (men earn more than women) with a small red section at the top (women earn more than men). The y-axis is labeled “Number of occupations” and ranges up to about 1,250. The red portion represents a small minority compared to the large blue majority. A legend on the right distinguishes “Women > Men” (red) and “Men > Women” (dark blue). A footer notes “TidyTuesday 2018 Week 4 | Data from data.gov.au.
This year for the #30DayChartChallenge I am going to pick a #TidyTuesday dataset at random and use it to make a chart with #ggplot and then see if I can reproduce it with #tidyplots.
Day 1: Part-to-whole, Australian Salary data
year <- 2018
week <- 4
jenrichmond.github.io/charts26/202...
library(tidyplots) animals |> tidyplot(x = weight, y = size) |> add_data_points() |> add_data_points(data = max_rows(weight, n = 3), color = "red", shape = 1, size = 3)
This is how you can highlight a subset of the dataset in #tidyplots 🔥
jbengler.github.io/tidyplots/reference/all_...
#rstats #dataviz #phd
The thing that's really growing on me about #tidyplots is that once you know a couple of "prefixes" you can build most of your plots just by looking at autocomplete.
library(tidyplots) study |> tidyplot(x = treatment, y = score, color = treatment) |> add_mean_bar(alpha = 0.4) |> add_sem_errorbar() |> add_data_points_beeswarm() |> remove_legend() |> remove_x_axis_ticks() |> remove_y_axis_title()
This is how you can remove elements from #tidyplots 🔥
jbengler.github.io/tidyplots/reference/inde...
#rstats #dataviz #phd
library(tidyplots) spendings |> tidyplot(x = amount, y = category, color = category) |> add_sum_bar(alpha = 0.2) |> add_sum_dash() |> add_sum_value(accuracy = 1, color = "black") |> sort_y_axis_levels() |> remove_legend()
This is how you can do horizontal bars in #tidyplots 😉
#rstats #dataviz #phd
I have seen a lot of posts about a package called tidyplots. How does it compare to ggplot2? Is it like another type of graphic package similar to ggplot? Or is it like a package that you combine with gg? I’m confused 🤔 #rstats #ggplot2 #tidyplots
This is a talk about #tidyplots with the R-Ladies Abuja 🚀
www.youtube.com/watch?v=OSPt...
We talked about the ideas behind #tidyplots and had a live coding session with lots of questions challenging its capabilities 💪
Thank again to R-Ladies Abuja for inviting me!
#rstats #dataviz #phd
library(tidyplots) gene_expression |> tidyplot(x = group, y = expression, color = group) |> add_violin() |> add_data_points_beeswarm(white_border = TRUE) |> view_plot(data = filter_rows(external_gene_name == "Apol6"), title = "Apol6")
This is how you can preview a subset of the dataset in #tidyplots 🔎
#rstats #dataviz #phd
Check out the Statistics Globe Hub: statisticsglobe.com/hub
The Statistics Globe Hub is an ongoing learning program that helps you stay up to date with statistics, data science, AI, and programming using R and Python.
#tidyplots #datavisualization #rstats #ggplot2 #datascience #statisticsglobehub
This is how to get started with #tidyplots 🚀
https://tidyplots.org/getstarted
#rstats #dataviz #phd
library(tidyplots) # Define style my_style <- function(x) x |> adjust_colors(colors_discrete_candy) |> adjust_font(family = "mono") |> adjust_size(height = 30) # Set global options tidyplots_options(my_style = my_style) study |> tidyplot(x = group, y = score, color = dose) |> add_mean_bar() # Reset global options tidyplots_options()
This is how you can set a default style in #tidyplots 🎨
jbengler.github.io/tidyplots/reference/tidy...
#rstats #dataviz #phd
Here are some #tidyplots use cases for bioinformatics 🔥
Complete with data and code 🚀
https://tidyplots.org/use-cases/#bioinformatics
#rstats #dataviz #phd
library(tidyplots) spendings |> tidyplot(x = category, y = amount, color = category) |> add_sum_bar() |> adjust_x_axis(rotate_labels = TRUE) |> sort_x_axis_levels() |> adjust_colors(new_colors = colors_discrete_candy)
This is how you can change the color scheme in #tidyplots 🌈
#rstats #dataviz #phd
Thanks for the opportunity to speak at the RNVSU March Meetup 🙏
Is was great to see so many people interested in #tidyplots 😍
Talk slides can be found here: github.com/jbengler/tid...
Best wishes!
#rstats #dataviz #phd
Some progress on the model exploration visuals using #tidyplots. Patterns are starting to lock in.
#dataviz #ggplot2 #rstats
Github star number 666 for #tidyplots 😈
github.com/jbengler/tid...
#rstats #dataviz #phd
library(tidyplots) spendings |> tidyplot(x = category, y = amount, color = category) |> add_sum_bar() |> adjust_x_axis(rotate_labels = TRUE) |> sort_x_axis_levels() |> adjust_colors(new_colors = c("Health" = "#ff3b30"), na.value = "lightgrey")
This is how you can guide attention in #tidyplots 🎯
#rstats #dataviz #phd
This is how you can use plotmath expressions in #tidyplots 🤓
jbengler.github.io/tidyplots/articles/Advan...
#rstats #dataviz #phd
All key features at a glance – with the #tidyplots cheatsheet 🤩
https://tidyplots.org/cheatsheet
#rstats #dataviz #phd
library(tidyplots) study |> tidyplot(x = treatment, y = score, color = treatment) |> add_mean_dash() |> add_sem_errorbar() |> add_data_points() |> add_test_pvalue(comparisons = list(c(1,3),c(2,4)))
This is how you can test selected comparisons in #tidyplots 📋
#rstats #dataviz #phd
library(tidyplots) study |> tidyplot(x = treatment, y = score, color = treatment) |> add_violin() |> add_data_points_beeswarm(white_border = TRUE) |> rename_x_axis_levels(new_names = c( "A" = "Dog", "B" = "Cat", "C" = "Hamster", "D" = "Dinosaur"))
This is how you can rename axis levels in #tidyplots 🎉
#rstats #dataviz #phd
library(tidyplots) study |> tidyplot(x = treatment, y = score, color = treatment) |> add_violin() |> add_data_points_beeswarm() |> adjust_colors(new_colors = c("A" = "#5B8DFE", "B" = "#DD227D", "C" = "#FE5F00", "D" = "#FFB109"))
This is how you can assign colors in #tidyplots 🌈
#rstats #dataviz #phd
These are the discrete color schemes in #tidyplots 🌈
The default scheme `colors_discrete_friendly` is inspired by Okabe and Ito (2008) and was designed to be accessible for individuals with color vision deficiencies.
#rstats #dataviz #phd
library(tidyplots) spendings |> tidyplot(x = category, y = amount, color = category) |> add_sum_bar(alpha = 0.2) |> add_sum_dash() |> add_sum_value(accuracy = 1, color = "black") |> adjust_x_axis(rotate_labels = TRUE)
This is how you can add sum values in #tidyplots 🤩
#rstats #dataviz #phd
library(tidyplots) study |> tidyplot(x = treatment, y = score, color = treatment) |> add_violin() |> add_data_points_beeswarm(white_border = TRUE) |> reorder_x_axis_levels("C", "D", "A", "B")
This is how you can reorder axis levels in #tidyplots 🚀
#rstats #dataviz #phd