Code Monkey home page Code Monkey logo

pygohome's Introduction

image

image

image

image

image

pygohome: Python, Let's Go Home. Quickly.

pygohome is a 100% personal route optimizer in a known environment based on experience.

You walk/ride/drive frequently between known locations (home, work, school, shops, family, friends, …) using different routes, but would like to know the optimal route, that should take you the least time possible? pygohome uses your recorded GPS tracks to build a route network of your world with estimation on how long you need to get from A to B using the mean of transport of your choice.

How it works

You track all your trips

A simple GPS track with 1 or 2 seconds interval works well. Just walk/ride/drive as you are used to, stop at lights, don't speed. You may start tracking before you leave and stop it after you arrive.

You identify your points of interest (and crossroads)

pygohome does not use any map data, so you'll have to help it. First, you identify all points of interest (home, work, school, shop, family, friends, pub, club, beach, …) and name them.

In the current version, you'll also have to identify all forks and crossroads where your individual GPS tracks cross, split, or join.

You let pygohome build your world

It will build a route network with your nodes (named POIs and identified intersections) and edges (automatically generated lists of timedeltas you needed to get between the nodes).

You can find the fastest route from A to B

You can choose anywhere between “I'm feeling lucky” (i.e. Sunday 7am, sunny) and “I'd like to make sure I get there in time” (i.e. Friday 5pm, blizzard).

pygohome's People

Contributors

eumiro avatar jugmac00 avatar obestwalter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pygohome's Issues

Plot the whole `world` with some statistics

  1. Show segments and how many tracks are they covered with.
  2. Show segments that have not been observed in both directions (a config file would be needed to ignore those that are one-way anyway).

… more ideas in further comments?

Running nox creates a `poetry.lock` file

... which is not ignored in .gitignore which means after a nox run there are uncommitted changes.

I am not familiar with poetry, so am not sure what to do about this.

Plot isochrone map

Use the world.single_source_periods method to plot an isochrone quantile-depending map.
The user chooses a POI and quantile and it shows the routes to all other waypoints and the period needed to get there.

In matplotlib there is pyplot.tricontour. Let's see what ipyleaflet can do.

Create a virtual model for tutorial/tests

Instead of testing with real data and local knowledge, build a virtual city model with a few roads, intersections, 4–5 points of interest (home, work, shop, …) and a dozen or so of virtual GPX tracks, illustrating the principle and a few edge cases.

import gpx without gpsbabel

based on this tweet: https://twitter.com/eumiro/status/1257008378800484352?s=20

> Also I want to find a fast Pythonic way to read the GPX files to avoid (fast but still an extra step) gpsbabel.

I've had success with gpxpy (and I think now the slow datetime recognition is improved).

Basic usage:

with open(filename, 'rb') as gpx_file:
	gpx = gpxpy.parse(gpx_file, parser='lxml')
	#gpx = gpxpy.parse(gpx_file, parser='minidom')

# loop through gpx file and extract each point
for track in gpx.tracks:
	for segment in track.segments:
		for p in segment.points:
                # do something here

To convert lat/long to UTM grid, you can use this package: https://github.com/Turbo87/utm

import utm
utm.from_latlon(51.2, 7.5)

my opinion: rather than convert to a table/csv, I'd just convert the gpx to an array of dicts (one for each gps point), using the above tools. Then use pandas.from_dict().

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.