I have worked with a dataset that had a similar structure in the past, and I found Mathematica's Graph
data structure to be quite lacking for representing it. In particular, the lack of proper multi-graph support was a problem. Did you experience any similar difficulties?
In general, there may be multiple transactions between the same buyer and seller. Thus the graph of transactions is naturally a multigraph (i.e. a graph having more than one edge between the same vertices). Mathematica simply does not support edge properties for multigraphs (moreover, there is no indication in the documentation that this is the casethings just fail in confusing ways). Thus we cannot use a Graph
to store important properties such as the time and amount of transactions.
It is still possible to work with such datasets in Mathematica, but not through Graph
. Thus operations that are more natural with Graph
, such as various structural randomizations suitable as null models, become very cumbersome. We would practically end up re-implementing a multi-graph data structure anyway, except it won't have good enough performance for even moderate datasets.