iduedu.edge_stats¶
- iduedu.edge_stats(urban_graph, by='type', *, area=None, precision=0.01)[source]¶
Edge counts, lengths and speeds for every value of an edge column.
- Parameters:
urban_graph (
UrbanGraph) – Graph in a projected (metric) CRS.by (
str) – Edge column to group by, for example"type","category"or"highway". Edges without a value form the group"<missing>".area (
BaseGeometry|GeoSeries|GeoDataFrame|None) – Measure only edges and segments whose midpoint lies inside (seegraph_stats()).precision (
float) – Grid for comparing segment end points, seeunique_segments().
- Return type:
- Returns:
DataFrame indexed by the values of
by, sorted by length, with columnsedge_count,length_km(every physical segment once, counted for the group of the first edge that has it),length_share,edge_length_mean(metres) andspeed_kmh(total length over total travel time, when edges havelength_meterandtime_min).- Raises:
KeyError – If
edges_gdfhas no columnby.ValueError – If the CRS is geographic.