Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Keywords
Repository
Accurate routing for OpenStreetMap/OSMnx
Basic Info
Statistics
- Stars: 49
- Watchers: 5
- Forks: 7
- Open Issues: 4
- Releases: 4
Topics
Metadata Files
README.md
Taxicab
When routing between two points of longitude and latitude, the built in routing functionality in OSMnx will find the nearest network nodes and route between those. This assumption is fine, and works for many applications but when you need routing with a little more accuracy you'll want to consider using Taxicab. Below are a few examples which highlight Taxicab use cases:
When the nearest nodes are not that close:

When routing along a single edge:

When routing along short routes:

When the nearest nodes are the same:

Installation
The easiest way to use Taxicab is probably via a PyPi install:
sh
pip install taxicab
You can also install directly from this repo:
sh
pip install git+https://github.com/nathanrooy/taxicab
Example usage
Taxicab is designed to be used as a drop-in replacement for the standard routing functionality found on OSMnx. So, like usual, download a portion of the OpenStreetMap graph:
python
from osmnx import graph_from_bbox
xmin, xmax = -84.323, -84.305
ymin, ymax = 39.084, 39.092
G = graph_from_bbox([xmin, ymin, xmax, ymax], network_type='drive', simplify=True)
Now, specify your origin and destination:
python
orig = (39.0871, -84.3105)
dest = (39.0880, -84.3200)
Compute the route via the following:
python
import taxicab as tc
route = tc.distance.shortest_path(G, orig, dest)
Which can then be plotted:
python
tc.plot.plot_graph_route(G, route)

The returned route is a named tuple comprised of four elements: - Route length in meters (or whatever your graph units are). ```python
route.length 669.0529395595279 ```
List of node IDs representing the bulk of the route (this is identical to OSMnx). ```python
route.nodes [197546973, 2090608743, 197656382, 197633479] ```
And two partial edges represented by
shapely.geometry.linestring.LineStringobjects. If populated, these represent the first and last segments of the route that extend from the first or last node to some point along that edge. ```pythonroute.origedge, route.destedge (
, ) ```
User reference
python
taxicab.distance.shortest_route(G, orig, dest)
Parameters:
- G : (networkx.MultiDiGraph) - input graph
- orig : (tuple) - a (lat, lng) or (y, x) point
- dest : (tuple) - a (lat, lng) or (y, x) point
Returns: (named tuple)
- route.length : float - distance in meters of computed route.
- route.nodes : path - list of node IDs constituting the shortest path (this is identical to routes found in OSMnx).
- route.origedge : shapely.geometry.linestring.LineString - a partial edge representing the first non-complete edge in the route.
- route.destedge : shapely.geometry.linestring.LineString - a partial edge representing the last non-complete edge in the route.
- Note that if a route is successfully computed the distance will always be returned. However, depending on the length of the route and the underlying network, route.nodes, route.origedge, or route.destedge, may be null.
python
taxicab.plot.plot_graph_route()
Used exactly the same way as osmnx.plot.plot_graph_route except that it uses the route (named tuple) produced by Taxicab instead. See OSMnx function reference [here]
Owner
- Name: Nathan Rooy
- Login: nathanrooy
- Kind: user
- Location: Manhattan
- Company: @Shutterstock
- Website: nry.me
- Repositories: 35
- Profile: https://github.com/nathanrooy
Aerospace engineer. I used to design race cars (CFD), now I clf.fit()
GitHub Events
Total
- Create event: 4
- Issues event: 4
- Release event: 1
- Watch event: 5
- Delete event: 3
- Issue comment event: 3
- Push event: 41
- Pull request event: 6
Last Year
- Create event: 4
- Issues event: 4
- Release event: 1
- Watch event: 5
- Delete event: 3
- Issue comment event: 3
- Push event: 41
- Pull request event: 6
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 52
- Total Committers: 2
- Avg Commits per committer: 26.0
- Development Distribution Score (DDS): 0.212
Top Committers
| Name | Commits | |
|---|---|---|
| Nathan Rooy | n****y@g****m | 41 |
| Nathan Rooy | r****a@m****u | 11 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 11
- Total pull requests: 8
- Average time to close issues: almost 2 years
- Average time to close pull requests: about 3 hours
- Total issue authors: 7
- Total pull request authors: 2
- Average comments per issue: 0.82
- Average comments per pull request: 0.13
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: about 5 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.25
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- nathanrooy (3)
- JobdeVogel (2)
- YannickAaron (2)
- 1993Hegde (1)
- rubchacon (1)
- ziyadbaron (1)
- leeke2 (1)
Pull Request Authors
- nathanrooy (11)
- YannickAaron (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 165 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: taxicab
Accurate routing for Open Street Maps and OSMnx
- Documentation: https://taxicab.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.1
published 12 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- codecov/codecov-action v5 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- Shapely >=1.7
- matplotlib >=3.3.0
- networkx >=2.5
- numpy >=1.19
- osmnx >=2.0.1