BR-Visualization / brcharts

Create BR charts
https://br-visualization.github.io/brcharts/
MIT License
0 stars 0 forks source link

10 create correlogram #41

Closed aemabe closed 1 month ago

github-actions[bot] commented 2 months ago

badge

Code Coverage Summary

Filename                           Stmts    Miss  Cover    Missing
-------------------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------------
R/check_feature.R                    345     300  13.04%   12-331, 360-364, 368-371, 386-390, 405-409, 427-431, 444-449
R/ci_calculation.R                    92       0  100.00%
R/correlogram.R                      135       0  100.00%
R/cumulative_excess_functions.R      347      40  88.47%   94-95, 105-106, 192-199, 236-247, 304-308, 443-451, 469-471
R/forest_dot_plot_utils.R           1493    1359  8.98%    16-1502, 1565-1567, 1584-1589, 1615-1618, 1639, 1704-1727, 1783-1800, 1814, 1817, 1885-2220
R/forest_dot_plot.R                  104     104  0.00%    4-254
R/grouped_barchart.R                  12      12  0.00%    23-35
R/order_label_der.R                   55      55  0.00%    35-97
R/pyramid_chart.R                     76       1  98.68%   52
R/scatterplot_function.R             121      13  89.26%   40-42, 70-81
R/stacked_barchart.R                  39       0  100.00%
R/tradeoff_plot.R                    890     424  52.36%   92-140, 234, 241-242, 246-247, 289-290, 299-309, 381-387, 396-400, 503-514, 701-730, 769-808, 834-972, 980-1034, 1070-1077, 1111-1221
R/utils.R                            289      37  87.20%   443-496, 523-529, 557-669
R/value_tree.R                         1       1  0.00%    45
TOTAL                               3999    2346  41.34%

Diff against main

Filename           Stmts    Miss  Cover
---------------  -------  ------  --------
R/correlogram.R     +135       0  +100.00%
TOTAL               +135       0  +2.05%

Results for commit: a28b190da0687e20449dffd37657028b513eb41c

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 2 months ago

Unit Tests Summary

  1 files    8 suites   12s :stopwatch:  53 tests  53 :white_check_mark: 0 :zzz: 0 :x: 384 runs  384 :white_check_mark: 0 :zzz: 0 :x:

Results for commit a28b190d.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
correlogram 👶 $+2.44$ $+33$ $0$ $0$ $0$
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | correlogram | 👶 | | $+0.07$ | create_correlogram_correctly_calculates_correlations_for_binary_variables | | correlogram | 👶 | | $+0.13$ | create_correlogram_correctly_calculates_correlations_for_continuous_binary_combinations_of_variables | | correlogram | 👶 | | $+0.12$ | create_correlogram_correctly_calculates_correlations_for_continuous_ordinal_combinations_of_variables | | correlogram | 👶 | | $+0.04$ | create_correlogram_correctly_calculates_correlations_for_continuous_variables | | correlogram | 👶 | | $+0.27$ | create_correlogram_correctly_calculates_correlations_for_ordinal_binary_combinations_of_variables | | correlogram | 👶 | | $+0.04$ | create_correlogram_correctly_calculates_correlations_for_ordinal_variables | | correlogram | 👶 | | $+0.64$ | create_correlogram_will_ouput_a_ggplot_object | | correlogram | 👶 | | $+0.55$ | create_correlogram_will_return_a_custom_warning_message_concerning_missing_data | | correlogram | 👶 | | $+0.55$ | create_correlogram_will_return_a_ggplot_object_with_missing_data | | correlogram | 👶 | | $+0.01$ | create_correlogram_will_return_an_error_and_custom_message_if_there_is_a_character_formatted_variable_in_the_dataframe | | correlogram | 👶 | | $+0.01$ | create_correlogram_will_return_an_error_and_custom_message_if_there_is_only_one_column_in_the_dataframe |

Results for commit e137f346da3c7180bfd9780fd0c0bb9a97969781

♻️ This comment has been updated with latest results.

chen-chen-stat commented 2 months ago

@aemabe Thank you for creating the PR. Some comments for your consideration: 1) In the function, variables are formatted as binary, continuous, or ordinal based on their values. Then different formulas are used for correlation calculation depending on the type of the variables. I suggest adding some documentation on this so that the users are aware how their data are being processed by the function and what formulas are used for correlation calculation to ensure what the function does aligns with their expectations. This will also alert users to format their input data appropriately before loading them into this function. For example, they should ensure that ordinal variables in their dataset are of character type in order to be recognized as ordinal variables by the function. 2) Related to comment 1), I am wondering whether it makes more sense that we require a variable to be of factor type rather than character type in order to recognize it as an ordinal variable, because an ordinal variable could be numerical, e.g., an ordinal variable may take values of 1, 2, 3, 4. 3) Suggest adding some tests to ensure that the function works as expected (e.g., correct formulas are used) for different types of variables.

github-actions[bot] commented 1 month ago

Github pages

Review the pkgdown webpage for the PR here

Lovemore-Gakava commented 1 month ago

fantastic work Abigail and Chen!