mm80843 / paris_maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyWay in Paris

App running at https://mparismap.herokuapp.com/ .

Content

Done

  • Zoning on arrondissements 18, 19, 20, 10, 11
  • Been getting all routes from within OSM
  • Preliminary mapping of best route based on trees
  • Trees and lighting are put in
  • Add shadows

Other data layers?

  • Use distance to fountains, parcs, green spaces
    • What other layers to use?
  • Develop something from building footprint (in data/BoI_simple.pkl)

Images

  • Example of the network

  • Merging all buildings in one

  • Details of streets

Learn and try

The data processing API

  1. Find
  • Should get: X,Y start, X,Y end + set of preferences ("weights")
  • Should receive, waypoints (nodes) (ordered list of XYs), and layers of interest close to the path (XYs of trees, lights, .. )
  1. Up: tells if the API is up
  2. Discover: sends end start users, settings - cache available

Goodies, API side

Caching

  • Define
    • Defining them: So to have a couple of from-to couples, and personas (ie prepared sets of weights)
    • Store results in dataframe
  • Run route finders and cache results
    • Start
    • End
    • Weights
    • Returns: json with waypoints, trees, lights, parcs, shadows

Visualisation

  • Streamlit:

    • inputs
    • map
    • description of the map on the right
  • Personas + "you"

    • Luc: home->work (day), then work->home night (shadows, light)
    • Anna: montmartre->b&b in 19th : trees and lights
    • Laure: South of 12th -> la villette

Logs and ideas

D1: 20210723 Starting

  • Been preparing the code as in a python standalone module.
    • Code as usual is in the "module" folder, here "pypama" (python paris maps)
    • Version is generated from the module itself, as in the pypama/version.py file
    • Adding binaries (the data pickles as part of the module in MANIFEST.in)
    • Added a setup.py file to generate the module
    • gitignore file prepared to exclude all "useless" bits from the repo
    • Added some support scripts (build and install to generate the module)
  • Discovered how to generate a requirements.txt file for projects. Useful, and added in the [createReqs.sh](createReqs.sh) script.
  • From there, preparing a "TestingModule" notebook to try out changes in the module as the same time it's tested. The %load_ext autoreload %autoreload 2 magic comes in handy to avoid reloading everything at the same time.

D2: 20210724 Going till the app

  • Release e74e19ff
    • Prepared the 99.app.py launched by streamlit run 99.app.py. Opens up an app window to play around with weigths.
    • Text inputs ready for the search
    • Formula in calculatePath still needs to be finetuned.
    • No API yet, just to play around with some of the layers. Caching still to be optimized =)
    • v0.0.1 with workable version is released!

D3: 20210803 Publishing an API

  • FastAPI-based API branch pushed here

    • Running with uvicorn main:app --reload
    • Fast API, once launched, can be tested through http://127.0.0.1:8000/docs#/
    • Getting starting and ending points, returning the optimized path as well as shortest path
    • Result looks good:
  • API-dependant streamlit app branch pushed here

    • Badly coded, list of waypoints sent as strings and then parsed on client end, but working.
    • Works well, needs to setup the server URL, but appears to be working smoothly
  • @todo: pull the branches on mm80843, connecting two free servers from heroku

Changelog

v0.0.2

  • Ongoing

v0.0.1

  • First workable version is released!
  • Contains building footprints, shadows, lights, trees, green spaces, water points..
  • Route finding is done!

About


Languages

Language:Jupyter Notebook 100.0%Language:Python 0.0%Language:Shell 0.0%