tnetwork.DynGraphSN.aggregate_time_period¶
-
DynGraphSN.
aggregate_time_period
(period, step_to_datetime=<built-in method utcfromtimestamp of type object>)[source]¶ Aggregate graph by time period (day, year, …)
Return a new dynamic graph without modifying the original one, aggregated such as all Yielded graphs are weighted (weight: number of apparition of edges during the period)
Parameters: - period – either a string (minute,hour,day,week,month,year) or a function returning the timestamp truncated to the start of the desired period
- step_to_datetime – function to convert time step to a datetime object, default is utfromtimestamp
Returns: a DynGraph_SN object