cotat package
cotat module
- cotat.cotat.visualization(title: str, file_name: str, nodes: DataFrame, edges: DataFrame, start: date, end: date, membership_cols: List[str] = [])
Write an HTML visualization of the given contact tracing graph.
The visualization has the following tabs: (1) All: all edges (both contact and membership edges) shown (2) Contact Traces: only contact edges are shown (3) Membership: only membership edges are shown Furthermore, there is a membership tab for every membership column passed.
- Parameters
title (str) – Title of the visualization.
file_name (str) – Name of the file to be written.
G (nx.Graph) – NetworkX graph with contact tracing data.
nodes (pd.DataFrame) – Each row is node with column for every attribute.
edges (pd.DataFrame) – Dataframe with “source” and “target” columns.
start (datetime.date) – Start date (show cases outside the 2 weeks leading up to this data as inactive (blue) on the visualization).
end (datetime.date) – End date (show cases after this data as inactive (blue) on the visualization).
membership_cols (List[str]) – List of columns recognized as memberships.