Skip to content

Conversation

@averissimo
Copy link
Contributor

Pull Request

Fixes #948

Changes description

  • Creates a local environment where data is manipulated and ggplot2 layers are created
  • This avoids having to create a custom geom
  • Code is reproducible, albeit not readable
    • We could use %>% instead for have more readability

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Unit Tests Summary

  1 files   24 suites   15m 59s ⏱️
167 tests 162 ✅ 5 💤 0 ❌
483 runs  478 ✅ 5 💤 0 ❌

Results for commit 5db4df3.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2025

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
shinytest2-tm_outliers 💔 $150.50$ $+1.61$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_character_and_character
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_character_and_factor
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_character_and_logical
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_factor_and_character
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_factor_and_factor
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_factor_and_logical
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_logical_and_character
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_logical_and_factor
bivariate_ggplot_call 👶 $+0.00$ bivariate_ggplot_call_with_arguments_logical_and_logical
bivariate_ggplot_call 💀 $0.03$ $-0.03$ bivariate_ggplot_call_with_factor_char_logical
examples 👶 $+0.01$ example_dot_scale_x_mosaic.Rd
examples 👶 $+0.02$ example_geom_mosaic.Rd

Results for commit 694b007

♻️ This comment has been updated with latest results.

Copy link
Contributor

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great PR that we bring back the plot without extra dependencies or too much code! Thanks!!

However, please generated the required data for the plot outside the plot call itself. It will help with maintainability and readability. Related to readability please use %>% when you move the data preparation outside the plot generation.

On the future we should consider using {patchwork} and combining the plots with it is much more ggplot2 friendly than using gridExtra: we only need to use plot1/plot2 to get the final ggplot2 that will print without problems. This is not a requirement as I don't want to add a new extra dependency but just for us to be aware.

@llrs-roche llrs-roche self-assigned this Nov 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  -------------------------------------------
R/geom_mosaic.R                  73      73  0.00%    37-225
R/tm_a_pca.R                    864     864  0.00%    141-1132
R/tm_a_regression.R             751     751  0.00%    180-1027
R/tm_data_table.R               200     200  0.00%    100-348
R/tm_file_viewer.R              172     172  0.00%    50-257
R/tm_front_page.R               143     132  7.69%    77-246
R/tm_g_association.R            320     320  0.00%    161-547
R/tm_g_bivariate.R              672     408  39.29%   332-788, 829, 940, 957, 975, 986-1008
R/tm_g_distribution.R          1106    1106  0.00%    156-1404
R/tm_g_response.R               345     345  0.00%    179-594
R/tm_g_scatterplot.R            709     709  0.00%    261-1065
R/tm_g_scatterplotmatrix.R      272     253  6.99%    200-501, 562, 576
R/tm_missing_data.R            1172    1172  0.00%    126-1475
R/tm_outliers.R                1029    1029  0.00%    162-1341
R/tm_rmarkdown.R                154      68  55.84%   144-196, 225-240, 284-285, 345-368
R/tm_t_crosstable.R             263     263  0.00%    177-482
R/tm_variable_browser.R         887     881  0.68%    89-1113, 1164-1347
R/utils.R                       185     120  35.14%   87-250, 279-305, 317-326, 331, 345-364, 453
R/zzz.R                           2       2  0.00%    2-3
TOTAL                          9319    8868  4.84%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  --------
R/geom_mosaic.R         +73     +73  +100.00%
R/tm_g_bivariate.R       +8      +2  +0.43%
TOTAL                   +81     +75  +0.02%

Results for commit: 5db4df3

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

averissimo added a commit that referenced this pull request Nov 26, 2025
# Pull Request

WIP: using "ready" status for testing purposes

Fixes #nnn

- Detected these errors when testing
#944

### Changes description:

  - [x] `tm_viewer` throws warning of URL
- [x] ~`tm_g_association` example shows error in application~ fixed in
#949
  - [x] `tm_variable_browser` example cannot find `%>%`

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting the code as I haven't checked it interactively as the CI is still failing for the PR.
Is the new geom compatible with older ggplot2 versions?

I think we are almost done with this.

Copy link
Contributor

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e2e test are failing due to issues on tm_file_viewer and tm_missing_data if #922 is merged first this would be fixed. If not, you can inspire from how the tests were modified to be a bit more flexible but still test what we want

I see you use .data inside dplyr calls. I'd like to be consistent and not use them unless needed.

The visualizations look as good as they were before (I hope TMG won't get dependencies only for geom_mosaic() :D )

@donyunardi donyunardi mentioned this pull request Dec 2, 2025
32 tasks
@averissimo averissimo merged commit 26730a6 into main Dec 3, 2025
29 checks passed
@averissimo averissimo deleted the 948-minimal_mosaic branch December 3, 2025 12:22
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Association and bivariate plots no longer support 2 categorical variables

3 participants