Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.3 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.3 KB

Realistic car speeds for the Helsinki metropolitan region

This is a Python package to ‘bake in’ car speeds into the edges of an OpenStreetMap dump, according to data looked up from a floating car data set, using the methods described in Perola (2023). The data contained in this package covers the Helsinki metropolitan area.

This package is used, for instance, for calculating travel time matrices of the metropolitan area.

Installation

pip install git+https://github.com/DigitalGeographyLab/car-speed-annotator.git

Use

Instantiate a CarSpeedAnnotator() using one of rush-hour, midday or nighttime to account for the different driving speeds at different congestion levels. Then, call its annotate() method with an input and an output file (both either pathlib.Paths or str).

>>> from car_speed_annotator import CarSpeedAnnotator
>>> car_speed_annotator = CarSpeedAnnotator("rush-hour")
>>> car_speed_annotator.annotate("input.osm.pbf", "output.osm.pbf")

Dependencies

This package calls osmium, which is available as a package for most Linux distributions (e.g., osmium-tool on Ubuntu and Arch).