https://github.com/johnymontana/openstreetmap-routing-web-app-workshop
Materials for workshop "Build A Routing Web Application With OpenStreetMap, Neo4j, and Leaflet.js"
https://github.com/johnymontana/openstreetmap-routing-web-app-workshop
leafletjs neo4j openstreetmap osmnx
Last synced: 3 days ago
JSON representation
Materials for workshop "Build A Routing Web Application With OpenStreetMap, Neo4j, and Leaflet.js"
- Host: GitHub
- URL: https://github.com/johnymontana/openstreetmap-routing-web-app-workshop
- Owner: johnymontana
- License: mit
- Created: 2023-03-23T22:25:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-21T14:04:36.000Z (over 1 year ago)
- Last Synced: 2025-05-07T10:03:13.780Z (3 days ago)
- Topics: leafletjs, neo4j, openstreetmap, osmnx
- Language: Jupyter Notebook
- Homepage: https://dev.neo4j.com/routing-workshop
- Size: 8.93 MB
- Stars: 14
- Watchers: 3
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build A Routing Web Application With OpenStreetMap, Neo4j, & Leaflet.js

* Slides: [dev.neo4j.com/routing-workshop](https://dev.neo4j.com/routing-workshop)
* Tutorial: [Published On Medium here](https://medium.com/neo4j/build-a-routing-web-app-with-neo4j-openstreetmap-and-leaflet-js-bdc66443132c)
* Video: [Workshop recording](https://www.youtube.com/watch?v=Z4XZgsbaD9c)[](https://www.youtube.com/watch?v=Z4XZgsbaD9c)
Using GitHub Codespaces is the recommended way to create a Python development environment for this workshop.

## Step 1: OpenStreetMap Data Import With OSMNx

First, create a [Neo4j AuraDB instance](https://dev.neo4j.com/aura).
Then use [this notebook](https://github.com/johnymontana/openstreetmap-routing-web-app-workshop/blob/main/notebooks/01-import.ipynb) to import OpenStreetMap and address data into your Neo4j instance.
## Step 2: Leaflet.js Web Map

[This file](https://github.com/johnymontana/openstreetmap-routing-web-app-workshop/blob/main/web/address_routing.html) contains HTML and JavaScript for a simple address search and routing web app. Edit the file to connect to your Neo4j AuraDB instance.
We're using Dijkstra's algorithm for routing - can you improve the routing query using the A* algorithm?

## Setup
This project uses Poetry to manage dependencies and python virtual environments. After cloning this repository, be sure [Poetry is installed](https://python-poetry.org/) then run:
```
poetry install
```To add dependecies:
```
poetry add foobar
```Update `.env` with any relevant environment variables, then to start Jupyter:
```
poetry shell
jupyter notebook
```