CharbelSakr15 / Jack-Rose

GNU General Public License v3.0
0 stars 0 forks source link

Visualizations do not work and are not adequate #3

Closed lepremiere closed 6 months ago

lepremiere commented 6 months ago

Hi,

the newly added functions for visualizing categorical data (task v) do not work per se. The necessary library import (ggplot2) was missing. Also, the barplots only work for 2 variables at a time. For 3+ variables it throws: Error in "combine_vars()":! At least one layer must contain all faceting variables: "z" ✖ Plot is missing "z" ✖ Layer 1 is missing "z" Run "rlang::last_trace()" to see where the error occurred.

Moreover, the input to the function is a data frame and two factors, which is not very handy. Easier handling would have been the data frame and two/three strings containing the column names.

Nevertheless, visualizing three to four categorical variables with bar plots does not convey the dependencies between categories. Therefore, I think a better scheme is an alluvial flow chart (link) which is pretty much made for our dataset. If everybody agrees, I would recommend an update that exchanges the current visualization with this.

The scatter plot does also not work naively. Is there any special preparation required for the input? And it requires the library "GGally" which was also not loaded or stated in the script.

Finally, the labeling (and again the input logic, see above) of the box_plot function was poorly done.

Cheers!

flosh95 commented 6 months ago

Hi, thank you for all these hints! I changed the functions and they should work now.

lepremiere commented 6 months ago

Closing issue as it has been resolved in #4.