Skip to content

Origin destination support #161

Description

@songololo

Experimental origin-destination matrix support

@Robinlovelace I'm experimenting with an origin-destination workflow using some of your PCT cycling data as a test case.

A prototype workflow is at analysis/od/prototype_od_weighted.py. It downloads PCT London OD pairs and zone boundaries, maps MSOA centroids to the GLA street network, and computes OD-weighted betweenness — where shortest paths are weighted by bicycle trip counts rather than treated uniformly.

The gist is something like this:

od = build_od_matrix(
    od_df,
    zones_gdf,
    net,
    origin_col="msoa1",
    destination_col="msoa2",
    weight_col="bicycle",
    zone_id_col="geo_code",
)

nodes_od = networks.node_betweenness_od(
    net,
    nodes_gdf.copy(),
    od_matrix=od,
    distances=DISTANCES,
)

Could you take a look and let me know if this is the sort of thing you are thinking of, or if you have ideas for how this can be pointed in the right direction?

This will require v4.23.0b11 for access to the new methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions