phasik.classes.TemporalNetwork.TemporalNetwork.from_static_network_and_node_timeseries

classmethod TemporalNetwork.from_static_network_and_node_timeseries(static_network, node_timeseries, combine_node_weights=<function TemporalNetwork.<lambda>>, static_edge_default_weight=None, normalise=None, quiet=False)[source]

Creates a temporal network by combining a static network with node timeseries

Edge time series are generated for the subset of edges in the ‘static_network’ that have both nodes in the ‘node_timeseries’, by combining their time series. These edge times series are used to set the time-varying weights of the corresponding edges in the temporal network. If not all edges have temporal information, creates a partially temporal network.

Parameters
  • static_network (nx.Graph) – Static network into which to integrate the temporal information

  • node_timeseries (Dataframe) – Dataframe with indexed (rows) by node names and with columns as times. Entries of the Dataframe represent the value of that node at that time.

  • combine_node_weights (function) – Function that determines how two node timeseries are combined to generate and edge timeseries. By default, the two node timeseries are multiplied.

  • static_edge_default_weight (float) – Weight to use for edges without temporal information

  • normalise ({‘max’, ‘minmax’, “standardise”, None}) – Choice of normalsation of the edge timeseries

  • quiet (bool) – If True (default), print minimum informative messages

Return type

TemporalNetwork