simcronomicon.visualization package

Submodules

simcronomicon.visualization.plot_status_summary module

simcronomicon.visualization.plot_status_summary.plot_status_summary_from_hdf5(output_hdf5_path, status_type=None)

Plot the normalized status summary (density) over time from a simulation HDF5 output file.

This function reads the simulation status summary from the specified HDF5 file, normalizes each status by the total population, and plots the density of each status (or a subset of statuses) over simulation timesteps.

Parameters:
  • output_hdf5_path (str) – Path to the HDF5 file containing simulation results.

  • status_type (str or list of str or None, optional) – If None (default), plot all status types. If str, plot only the specified status type. If list of str, plot only the specified status types.

Raises:
  • ValueError – If the HDF5 file contains no status data or if the total population is zero. If an invalid status_type is provided.

  • TypeError – If status_type is not None, str, or list of str.

Returns:

Displays a matplotlib plot of the status densities over time.

Return type:

None

simcronomicon.visualization.plot_scatter module

simcronomicon.visualization.plot_scatter.visualize_folks_on_map_from_sim(output_hdf5_path, town_graph_path, time_interval=None)

Visualize the movement and status of agents over time on a map using simulation output.

Parameters:
  • output_hdf5_path (str) – Path to the HDF5 file containing simulation results.

  • town_graph_path (str) – Path to the .graphmlz file containing the town graph.

  • time_interval (tuple or list of int, optional) – (start, end) timestep range to visualize. If None, visualize all timesteps.

Returns:

Displays an animated Plotly map showing agent locations and statuses over time.

Return type:

None

simcronomicon.visualization.plot_scatter.visualize_place_types_from_graphml(town_graph_path, town_config_path, colormap=None)

Visualize nodes from a .graphmlz town graph with their classified place_type using Plotly and OpenStreetMap.

Parameters:
  • town_graph_path (str) – Path to the .graphmlz file containing the town graph.

  • town_config_path (str) – Path to the .json file containing town metadata (must include ‘epsg_code’).

Returns:

Displays an interactive Plotly map of nodes colored by place type.

Return type:

None

Module contents