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

Aggregate two different event log data #62

Open
quartermaine opened this issue Mar 16, 2023 · 3 comments
Open

Aggregate two different event log data #62

quartermaine opened this issue Mar 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@quartermaine
Copy link

quartermaine commented Mar 16, 2023

I would like to combine two different event log data that have the same columns and share some common activates into one event log. With that event log I want to create a process map where I should be able to have different colors for the event data coming from each of the two different event logs.
Is there such a functionality available into the package?

@gertjanssenswillen
Copy link
Member

There is no dedicated functionality for this right now, but some code that can help you:

Suppose that you have already prepared the two logs as log_1 and log_2, which have the same names (at least for the mapping columns). First of all, you might want to make sure that you known the origin of both logs. If not, you can add a variable to both logs.

log_1 %>% 
 mutate(source = "log_1") -> log_1

Similarly for log_2. Ofcourse the variable can have any name instead of source.

Then, it's important to temporarily store the mapping of the log

map <- mapping(log_1)

You can now combine both logs with bind_rows as follows. Since the output of bind_rows is a data.frame, not an event log, we use re_map, and the mapping created above to reinitialise the object as an event log.

bind_rows(log_1, log_2) %>%
 re_map(map) -> combined_log

Now, you can use the combined_log for your process map. If you group the log on the source variable we created first, you should get 2 process maps, one for each log.

combined_log %>%
 group_by(source) %>%
 process_map()

Regarding your request to have "a process map where I should be able to have different colors for the event data coming from each of the two different event logs". Technically, I suppose this would only make sense if both event logs have separate sets of activities. If you have activities that are present in both logs, its not clear how you would colour it (perhaps with 3 colours, one for activities specific to each log, and one for activities present in both logs). However, such a feature is currently not implemented. Please let me know whether the above workflow works for you, and whether the 2 process map answer your question.

@quartermaine
Copy link
Author

@gertjanssenswillen Thank you for your answer, I can use this workflow to create two maps as you suggested.
Will you consider the functionality of the one process map with different colors in the future?

@gertjanssenswillen
Copy link
Member

We can definitely consider it for the future. There is also a request to have customer colors mapped on a continuous variable. Categories (like different sources) are perhaps a bit more challenging in terms of aggregation (e.g. a node in a process map can have just one color. If we have a customer attribute like sales, you can take the mean, but if there is a factor variabele with different levels related to a block, it is not as straightforward. Me might then look at majority.

I'll leave the issue here, because it is something we will look into. I cannot put a time frame on this yet. We are simultaneously exploring to replace the visualization tool used by process mapr with something more dynamic/interactive, which also plays a role in these further development.

@gertjanssenswillen gertjanssenswillen added the enhancement New feature or request label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants