gertjanssenswillen / processmapR

!! repository moved to https://github.com/bupaverse/processmapR !! This repo is read-only from now one.
Other
7 stars 9 forks source link

Extended RAW DATA parameter #31

Closed AntonioSecchi closed 5 years ago

AntonioSecchi commented 6 years ago

Hy,

I'm guessing if is possible to add 2 more intresting features for the processmap and trace_explorer functions.

1. process_map Could be usefull to extract the raw.data behind the plot, in a raw form, usable for furthers manipulations and so on. Some processmap (raw.data=T), that provide back a data.frame with all the data strucutre behind the plot (edges and nodes values), maybe inside a data.frame.

2. trace_explorer Also there, a raw.data parameter has been allready provided. But instead of return just the first occurrence for every trace, I'm looking for a full raw data.frame return. I'm meaning that now, if two patients A and B, following the user guide, make the same trace for example 1-2-3, only the trace regarding the patient A, is returned back. Is it possible to extend the raw.data to all the patients?

Hope you the best, Antonio

gertjanssenswillen commented 6 years ago

Hi Antonio

  1. process_map Could be usefull to extract the raw.data behind the plot, in a raw form, usable for furthers manipulations and so on. Some processmap (raw.data=T), that provide back a data.frame with all the data strucutre behind the plot (edges and nodes values), maybe inside a data.frame.

The (very) raw information of the process map can be access as an attribute of the map. The attribute is called "base_precedence".

patients %>% process_map -> t
attr(t, "base_precedence")

It's not the exact value that are on the process map, but they can be derived from it. It should not be regarded as a stable export. I hope to have more tidy raw data export options in the future.

  1. trace_explorer Also there, a raw.data parameter has been allready provided. But instead of return just the first occurrence for every trace, I'm looking for a full raw data.frame return. I'm meaning that now, if two patients A and B, following the user guide, make the same trace for example 1-2-3, only the trace regarding the patient A, is returned back. Is it possible to extend the raw.data to all the patients?

The raw data here refers to a specific case, but this should actually be abstract from. If you want to have this information for all case, it would advise to join this raw data to the original log, perhaps using the output of case_list (which links cases and traces).

Hope this helps?