The dataset "patients" is an eventlog of patients visiting a clinic and getting treatment. The script below gives a data frame with traces or sequence of activities in the eventlog, trace_id and absolute frequency of the cases following the particular trace. I wish to create a dynamic horizontal bar chart using ggplot2
or plotly
such that the traces are represented like the snapshot attached with the absolute frequency in % at the top of the bar with axes labels.
Thanks and please help!
library("bupaR")
traces(patients, output_traces = T, output_cases = F)
Hope this helps (I am not able to get frequency however)
EDIT 1: