Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Comparing groups: human and machine work#
HyperGodot introduced group tags to overlay hypergraphs. In the
cyber-physical production example every task is tagged H (human) or
M (machine); line styles distinguish the groups, line widths show the
processing times and vertex sizes the number of tasks of an entity.

hyperedges total minutes mean minutes mean size vertices most involved
H 5 85.0 17.0 3.6 11 C3
M 2 45.0 22.5 4.0 7 C2
most central entity: C3 4
import matplotlib.pyplot as plt
import hatvis as hv
from hatvis.plotting import draw_hypergraph
H = hv.datasets.load_manufacturing_cps()
# [snippet:groups]
print(hv.temporal.group_statistics(H, "group", weight_name="minutes"))
fig, ax = plt.subplots(figsize=(8, 6.5))
draw_hypergraph(H, layout="force", group="group", width_by="weight", size_by="degree", edge_labels=True,
random_state=3, ax=ax)
# [/snippet:groups]
print("most central entity:", H.degrees().idxmax(), H.degrees().max())
Total running time of the script: (0 minutes 0.228 seconds)