Core P
ack
age F
unctions
Input V
alidation
Check DataFrame
format
V
erify required
columns
V
alidate data
types
Main W
orkflow F
unction
modularity_encode()
Output Gener
ation
print_edge_list()
CSV format
Module
assignments in
DataFrame
Code System Encoding
Map codes to
modules
encode_code_system_to_module()
assign_module()
Single code or list
Community Detection
Community
detection
(Louvain
algorithm)
detect_code_system_communities()
R
esolution
parameter
controls
granularity
Network Creation
create_code_system_network()
Group codes by
patients
Calculate patient
intersections
Build NetworkX
Graph Edge
weight = common
patients
Input Data
DataFrame -->
(patientid -
code_system)