Best plot to show percentage of quantity sold of different products for each artist R

Viewed 24

I have this dataframe :

 artist       product                           quantity_sold  freq
   <chr>        <chr>                                     <dbl> <dbl>
 1 Bad Waitress bad waitress x-large                          1 11.1 
 2 Bad Waitress cheaper reaper do                             1 11.1 
 3 Bad Waitress cheaper reaper m                              1 11.1 
 4 Bad Waitress cheaper reaper tank top                       1 11.1 
 5 Bad Waitress short sleeve black                            5 55.6 
 6 Black Pumas  capitol cuts                                  2 50   
 7 Black Pumas  poster                                        2 50   
 8 CMAT         cmat socks                                   51 12.2 
 9 CMAT         if my wife new i'd be dead poster            95 22.8 
10 CMAT         imwn bolo tie                                37  8.87

I would like to have a plot where I select an artist and it will show each product they sold with its percentage (I would prefer an interactive plot or a table). I have tried a grouped barchart with plotly but it looks very bad. I tried to add a button so that I did not have a plot with all artists but I cannot make it work. Do you have any suggestion?

Thank you

0 Answers
Related