worldbank / GOSTnets

Convenience wrapper for networkx analysis using geospatial information, focusing on OSM
https://worldbank.github.io/GOSTnets/
MIT License
20 stars 15 forks source link

Add Country-Specific Road Speeds from OSM #29

Open andresfchamorro opened 3 years ago

andresfchamorro commented 3 years ago

Looking into the methodology behind the friction surface (Malaria Atlas Project, Weiss et al), I found out that they created a table of country, road type, and speed limit based on OSM attributes.

Here is the paragraph describing their road data processing:

Firstly, OSM roads data were extracted in October 2019 and converted into a rasterized surface of road types whereby the fastest road type in each pixel took precedence. In a second processing step, the OSM data were analyzed to determine the median speed limit value for each road type in each country (Supplementary Table 1). These values were subsequently used to attribute road speeds to specific pixels using a lookup table. In cases where a road type was present in a country, but associated speed limit information was unavailable, a global average speed limit for that road type was used instead. https://www.nature.com/articles/s41591-020-1059-1#MOESM2

I propose that we look into the quality/completeness of this table, and use it to replace default_speeds, or at least have it as an option. The table is available through the paper in the Supplementary Tables 1–3 link.

Thoughts?

@d3netxer @bpstewar

d3netxer commented 3 years ago

I like this idea

jobelanger commented 3 years ago

It would be great to have country-specific speeds like this while preserving existing speed values for any given edge where maxspeed > or = 0 , for example, and user could choose to apply speeds to all or have an exception where speed exists already. I believe @d3netxer did something like this in the load_traffic2.py module to accept both a maxspeed and a Mapbox speed value.

Also, longer term, would love the ability to extract average speeds by road class (and surface?) for a given graph. This might not be trustworthy for small analysis, but country-level this would be great and would dynamically improve along with OSM data. Was looking into OSRM and saw their equivalent to speed dicts (routing profile for cars, written in Lua). I wonder if this kind of thing could be adapted for gostnets?