0

I've been using Tableau to visualise some data on activity counts at different sites. I'm trying to convert to using R studio instead. However, I'm facing some issues. How do I plot these visualisations on R (where there are 3 categories of X and Y. enter image description here

I've also attached a screenshot of the excel sheet.

enter image description here

Please advise, thank you!

Phil
  • 7,287
  • 3
  • 36
  • 66
fygeng go
  • 15
  • 4
  • I would suggest you look into the esquisse documentation as it provides a tableau-like GUI to create ggplot2 charts https://cran.r-project.org/web/packages/esquisse/vignettes/get-started.html – Phil Apr 22 '22 at 15:12
  • @Phil As suggested, I've looked into the esquisse documentation. However, esquisse only allows for 1 variable in the 'x', 'y', 'color', 'fill' 'facet'. As shown in the picture above, I would need 3 columns, 12 rows and filters based on time, week(day/end) and site. Please advise – fygeng go Apr 23 '22 at 10:44
  • You would need to set your data into long format, where all the values are in one column, and another variable indicates if the value refers to one of alone, pair or group. See https://tidyr.tidyverse.org/articles/pivot.html and https://stackoverflow.com/a/3777592/5221626 – Phil Apr 23 '22 at 16:58

0 Answers0