### Process Mining with Production Data (R) Source: https://github.com/vicmertens/process-mining/blob/master/readme.md Analyzes production data that includes both start and completion timestamps for each activity. This script allows for the calculation and analysis of the duration of each step in the production process. ```R library(bupaR) library(readr) # Load the production event log data from an Excel file # Assuming the Excel file has columns like: CaseID, Activity, StartTimestamp, EndTimestamp production_data <- read_excel("production_data.xlsx") # Convert the data frame to an event log object with start and end times # Ensure Timestamp columns are in a suitable format (e.g., POSIXct) production_log <- eventlog(event_table = production_data, case_id = "CaseID", activity_id = "Activity", lifecycle_id = "ActivityState", # Assuming a column indicating start/complete timestamp = "Timestamp") # Or use start_timestamp and end_timestamp arguments if available # Calculate durations for each activity production_log_with_durations <- production_log %>% calculate_durations() # Analyze durations (e.g., average duration per activity) activity_durations <- production_log_with_durations %>% group_by(activity_id) %>% summarise(avg_duration = mean(duration, na.rm = TRUE)) print(activity_durations) # Further process mining analysis can be performed... ``` -------------------------------- ### Process Mining with Requisition Data (R) Source: https://github.com/vicmertens/process-mining/blob/master/readme.md Analyzes requisition data from an Excel file, focusing on events with completion timestamps. This script demonstrates how to process and analyze event logs where only the completion time of each activity is recorded. ```R library(bupaR) library(readr) # Load the event log data from an Excel file # Assuming the Excel file has columns like: CaseID, Activity, Timestamp event_log_data <- read_excel("requisitions.xlsx") # Convert the data frame to an event log object # Ensure the Timestamp column is in a suitable format (e.g., POSIXct) event_log <- eventlog(event_table = event_log_data, case_id = "CaseID", activity_id = "Activity", timestamp = "Timestamp") # Perform process mining analysis (e.g., discover the process model) process_model <- process_mining(event_log) # Visualize the process model plot(process_model) # Further analysis can be performed using bupaR functions... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.