spatial_center_of_mass¶
spatial_center_of_mass
¶
spatial_center_of_mass(panel: DataFrame, *, freq: str = '1h', weight_col: str = 'num_bikes_available', time_col: str = 'fetched_at') -> DataFrame
Fleet centre of gravity over time: the weighted-mean station coordinate per period.
Summarises the whole network's spatial dynamics as one moving point. In hilly or monocentric cities the centre of mass drifts downhill or toward the centre over the day, which is the signature of the pendular migration that forces heavy evening rebalancing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
panel
|
DataFrame
|
A panel joined with station coordinates: needs |
required |
freq
|
str
|
Aggregation bin (a pandas offset alias). |
"1h"
|
weight_col
|
str
|
Weight for the mean (e.g. available bikes). |
"num_bikes_available"
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
|
See Also
spatial_entropy : Spread around this centre.
coverage_stats : Areal coverage of the network.