Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get time between two subsequent activities for all cases #31

Open
Meras182 opened this issue Jan 26, 2022 · 1 comment
Open

Get time between two subsequent activities for all cases #31

Meras182 opened this issue Jan 26, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Meras182
Copy link

Hi,

first of all, thanks for the great bupaR package. I really enjoy process mining with it.

I would like to calculate the time (I guess you call it idle time) between two subsequent activities for all cases that run though it. Some might need to run through it several times. I only found possibilities to calculate the idle time on an aggregated level but I would need the time per case. Because, afterwards, I would like to work with the sample and visualize the distribution of times.

Looking forward to your reply. Thanks!

Best Regards
Meras

@gertjanssenswillen
Copy link
Member

Apologies for the late reply.

This is currently not directly supported, but there is a workaround to get to this data.

First, create a processmap with performance type, and store it as an object.

patients %>% process_map(performance()) -> p

Then, look for the attribute "base_precedence"

attr(p, "base_precedence") -> data

Then, from this data, the required information can be extracted as follows:

data %>% dplyr::as_tibble() %>% select(case, act, next_act, end_time, next_start_time)

@gertjanssenswillen gertjanssenswillen added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants