groupby_api.Rmd
datamations allows the visualization of dplyr::group_by
calls containing up to three variables.
The datamations_sanddance
call can finish with a group_by
call, displaying proportional data faceted by the grouping variables.
"small_salary %>%
group_by(Work, Degree)" %>%
datamation_sanddance()
library(palmerpenguins)
"penguins %>%
group_by(sex, island, species)" %>%
datamation_sanddance()
The datamations_sanddance
call can also show the filtering and summarization of data based on group facets.
"small_salary %>%
group_by(Degree) %>%
filter(Salary > 90)" %>%
datamation_sanddance()
"small_salary %>%
group_by(Degree) %>%
summarize(mean = mean(Salary))" %>%
datamation_sanddance()
#> Warning: Returning more (or less) than 1 row per `summarise()` group was deprecated in
#> dplyr 1.1.0.
#> ℹ Please use `reframe()` instead.
#> ℹ When switching from `summarise()` to `reframe()`, remember that `reframe()`
#> always returns an ungrouped data frame and adjust accordingly.
#> ℹ The deprecated feature was likely used in the datamations package.
#> Please report the issue to the authors.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.