Create the Knowledge Graph
Having a dataframe, with four columns {Source, Target, frequency, average time}
create a knowledge graph that has Source and Target as nodes
Frequency and average time as edge attributes:
{
"directed": true,
"multigraph": false,
"nodes":
[ {"id": "Purchase Order Created"}, {"id": "Goods Receipt"}, {"id": "Invoice Received"}, {"id": "Invoice Posted"}, {"id": "Payment Request"}, {"id": "Payment Made"}, {"id": "Quality Inspection"}, {"id": "Delivery Completed"} ],
"links":
[ { "source": "Purchase Order Created", "target": "Goods Receipt", "weight": 1, "avg_time": 23.0 }, { "source": "Goods Receipt", "target": "Invoice Received", "weight": 1, "avg_time": 23.0 }, { "source": "Invoice Received", "target": "Invoice Posted", "weight": 1, "avg_time": 23.0 }, { "source": "Invoice Posted", "target": "Payment Request", "weight": 1, "avg_time": 23.0 }, { "source": "Payment Request", "target": "Payment Made", "weight": 1, "avg_time": 23.0 }, { "source": "Payment Made", "target": "Quality Inspection", "weight": 1, "avg_time": 23.0 }, { "source": "Quality Inspection", "target": "Delivery Completed", "weight": 1, "avg_time": 23.0 } ]
}