Skip to content

Commit

Permalink
Add basic docs to readme, close #39
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace authored and dabreegster committed Jan 3, 2024
1 parent 7626ab2 commit a192f05
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ od2net helps you turn *o*rigin/*d*estination data about where people travel into

## How to use it

...
After you have installed the necessary dependencies (including Python, Rust, and tippecanoe), you can run the code in the [`examples/`](examples/) directory, e.g.:

```bash
cd examples/edinburgh
python3 setup.py
cargo run --release config.json
```

Then navigate to https://od2net.org/ (which may redirect) and upload the resulting .pmtiles file in the outputs directory.
Note: you may need to move code in `examples/utils.py` into `examples/edinburgh/setup.py` to get it to run (see [issue #2](https://github.com/Urban-Analytics-Technology-Platform/od2net/issues/2) for details).

- set up with your own data, run on your computer (directly or with docker), and compute country-wide network with millions of trips in under an hour
- the quick setup route: clip a small area from OSM, use dummy OD data, tune cost function, and make route networks ending at a single point. interactive in your browser, no install required, get something in minutes
Expand Down
5 changes: 5 additions & 0 deletions examples/edinburgh/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import json
import sys

# Import code in ../utils.py:
# - download(url, outputFilename)
# - run(args)
# - extractCentroids(pbfInput, geojsonOutput, where="building IS NOT NULL")
# - writeFixedOutputFile(path, contents)
sys.path.append("..")

from utils import *
Expand Down

0 comments on commit a192f05

Please sign in to comment.