Coder Social home page Coder Social logo

elmino-19 / streamlit-navigator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxmarkov/streamlit-navigator

0.0 0.0 0.0 104.35 MB

A simple navigation app based on streamlit to find directions between two points.

Shell 4.78% Python 91.23% Dockerfile 3.47% Procfile 0.52%

streamlit-navigator's Introduction

Navigation app

Streamlit-navigator is a simple navigation app based on streamlit to find directions between two points. When you launch the app, a map is displayed centered on the Grand Place in Brussels. Choose the base map you like in the corresponding selection box. Enter the origin and destination addresses in the appropriate fields and choose the route optimizer. The app will then try to find and display the most optimal route on the map. Click on "Clear all address boxes" to restore all fields to their default values.

List of current functionalities:

  • Show different types of basemap
  • Show the shortest path between two selected points
  • Docker
  • Get address from a mouse click

Find the route between Battery Park and Times Square in New York City.

show different maps

Docker

Build a docker container

./docker/docker_build.sh

Launch the docker container

./docker/docker_run.sh

Copy network URL into you browser

Local

Install all requirements

pip install -r requirements.txt

Launch the app

streamlit run app.py

Copy network URL into you browser

Note on graph construction

To find the optimal route, it is necessary to build a graph consisting of roads and intersections. The default way to do it is to build a bounding box from the coordinates of the source and destination addresses (we add some margin) provided by the user. This is done by using the graph_from_bbox function from OSMnx. However, according to my tests, the method is not the fastest and takes a really long time for even relatively small distances. A faster way to construct a graph is to use the graph_from_place and graph_from_address functions. For the former one, I recommend to provide the city/town name (a hardcoded variable). For the latter one, you need to specify the distance from origin in meters (also a hardcoded variable). You can change it by uncommenting the lines of code below "FIND THE PATH" in app.py.

Core libraries

streamlit-navigator's People

Contributors

maksim-kpv avatar maxmarkov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.