finds grocery stores and stuff next to route (gpx)

Overview

Route-Report

Route report is a command-line utility that can be used to locate points-of-interest near your planned route (gpx). The results are based on the database by OpenStreetMap.

If the metadata for the requested countries is not present then Route-Report first downloads OpenStreetMap metadata. Then, we use osmosis in the background to filter through the metadata and extract relevant locations. This has to be done only once for each country you want to use and the resulting, filtered file is quite small (<1MB for Germany). If you want to retrieve an up-to-date version of the files you can use the -r flag.

Note that the metadata files in this repo are only as up-to-date as their change date. You may want to download more recent files (-r flag). Supermarkets don't move often though :P

Usage

usage: route_report.py [-h] -f [route.gpx] [-d [<distance>]] [-c [countries]] [-r] [-o print|csv|google-sheets|pdf|1D-map]
                       [-p food-shop|petrol-station|water]

Finds stuff next to your route.

optional arguments:
  -h, --help            show this help message and exit
  -f [route.gpx], --input-file [route.gpx]
                        used to supply your gpx file
  -d [<distance>], --search-distance [<distance>]
                        defines approx. search radius around route in kilometers (default=1km)
  -c [countries], --country-codes [countries]
                        comma separated list of country codes (ISO 3166-1 Alpha-2 --> see Wikipedia), e.g., DE,US,FR
                        (default=AUTO --> autodetection)
  -r, --redownload-files
                        set if you want to update the already downloaded and preprocessed country files
  -o print|csv|google-sheets|pdf|1D-map, --output-modes print|csv|google-sheets|pdf|1D-map
                        comma separated list of output modes, e.g., print,csv (default=print)
  -p food-shop|petrol-station|water, --points-of-interest food-shop|petrol-station|water
                        comma separated list of points-of-interest the program is supposed to look for along the route
                        (default=food-shop)

Points of Interest

Poi-groups are a collection of OpenStreetMap (OSM) tags are grouped together in our program. For example the poi-group food-shop represents convenience stores, grocery stores, bakeries, etc. The right column in the file ./other_data/osm_tags.csv shows you poi-groups you can search for along your route using the -p flag (see Example). The left column in that file represents all OSM tags that we search for given a specific poi-group(s).

You can change ./other_data/osm_tags.csv however you like, just be aware that the metadata files in this repository only contain locations with the tags we are using. If you wish to use your own tags you can refresh your metadata files using the -r flag after you have changed ./other_data/osm_tags.csv.

Autodetection of countries

We autodetect countries based on the gpx file you provide using the thematicmapping dataset. If you wish to use only a subset of country datasets you can specify them using the -c flag.

Autodetection of countries takes about 30s (on my laptop) for a 1000km route. This will take even longer for longer routes. Therefore, I suggest you directly specify countries with the -c if computing resources are scarce.

Example

Assuming you have route planned on Komoot and you want to know about food-shop and petrol-station (-p) next to your route that are within 1km (-d) you can download the gpx file and then run the command below (route).

>>> python3 route_report.py -f test_route_andorra.gpx -p food-shop,petrol-station -d 1

     cum_distance_km                      poi_name  poi_distance_to_route    poi_lat  poi_long       poi_group
20                 0                   Consciència               0.085418  42.508222  1.520737       food-shop
11                 0               Eco Supermacats               0.474783  42.505049  1.514742       food-shop
22                 0                    Fleca Font               0.006591  42.507441  1.521643       food-shop
30                 0                           NaN               0.118936  42.506687  1.523430       food-shop
5                  0                           NaN               0.658057  42.501832  1.515404       food-shop
59                 1                  Andorra 2000               0.320416  42.505714  1.529197       food-shop
89                 1               Biocoop Andorra               0.225353  42.508006  1.537685       food-shop
81                 1                       Caprabo               0.133882  42.508700  1.534714       food-shop
66                 1                    E. Leclerc               0.070915  42.508874  1.532163       food-shop
92                 1                    Fleca font               0.088633  42.509274  1.538085       food-shop
73                 1                  Santa Glòria               0.187045  42.508125  1.533945       food-shop
60                 1                       Super U               0.088410  42.507963  1.530428       food-shop
59                 1             bonÀrea (Andorra)               0.260034  42.506250  1.529328       food-shop
59                 1                    de bon Gra               0.157387  42.507171  1.529441       food-shop
60                 1                           NaN               0.070890  42.508139  1.530399       food-shop
113                2                  13-th street               0.013526  42.509196  1.540867       food-shop
115                2                         Artal               0.107198  42.508185  1.539805  petrol-station
145                2                       Artal 2               0.121834  42.510551  1.548264  petrol-station
130                2                        Repsol               0.103972  42.508329  1.545053  petrol-station
126                2                           NaN               0.006941  42.509005  1.543588       food-shop
208                4                            BP               0.018608  42.522095  1.559524  petrol-station
207                4                         Cepsa               0.024718  42.521652  1.559482  petrol-station
248                6                         Cepsa               0.020690  42.531754  1.577210  petrol-station
251                6           Comer la Clementina               0.171664  42.533281  1.579239       food-shop
292                7                            BP               0.011910  42.536710  1.589220  petrol-station
273                7                            BP               0.021828  42.533517  1.585820  petrol-station
292                7               Comerç les Bons               0.234051  42.537693  1.586538       food-shop
267                7                           ECO               0.387443  42.536011  1.582085       food-shop
266                7                        Repsol               0.037308  42.533489  1.584708  petrol-station
267                7                           NaN               0.388133  42.536065  1.582158       food-shop
305                8  Avenida Doctor Mitjavila, 3-               0.643809  42.542483  1.599984       food-shop
310                8                          Esso               0.019175  42.542198  1.591422  petrol-station
433               11                       Caprabo               0.016012  42.566131  1.598642       food-shop
434               11        Les delícies del Jimmy               0.026433  42.566201  1.598758       food-shop
451               11                         Total               0.031216  42.566991  1.600830  petrol-station
536               15                            BP               0.513669  42.579580  1.640062  petrol-station

Ignore the leftmost column. The column cum_distance_km represents the point of the route where the grocery store has been found and the column shop_distance_to_route represents how far away the shop is from the route in kilometers. For example, after riding this route for 11 kilometers you will encounter a Caprabo (food-shop) 16m next to the route.

Future Work

The filtering part (with osmosis) only works on Linux for now. I plan on supplying either already filtered files for each country or some alternative that works on Windows/Mac in the future. Note that the rest of the program should still work on other platforms.

There are many minor touches missing, e.g., a nicer output, creating an executable, custom alerts, or supporting the imperial system.

Owner
Clemens Mosig
Clemens Mosig
IPython/Jupyter notebook module for Vega and Vega-Lite

IPython Vega IPython/Jupyter notebook module for Vega 5, and Vega-Lite 4. Notebooks with embedded visualizations can be viewed on GitHub and nbviewer.

Vega 335 Nov 29, 2022
Create matplotlib visualizations from the command-line

MatplotCLI Create matplotlib visualizations from the command-line MatplotCLI is a simple utility to quickly create plots from the command-line, levera

Daniel Moura 46 Dec 16, 2022
Chem: collection of mostly python code for molecular visualization, QM/MM, FEP, etc

chem: collection of mostly python code for molecular visualization, QM/MM, FEP,

5 Sep 02, 2022
哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看、waifu2x等功能。

picacomic-windows 哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看等功能。 功能介绍 登陆分流,还原安卓端的三个分流入口 分类,搜索,排行,收藏夹使用同一的逻辑,滚轮下滑自动加载下一页,双击打开 漫画详情,章节列表和评论列表 下载功能,目

1.8k Dec 31, 2022
Open-questions - Open questions for Bellingcat technical contributors

Open questions for Bellingcat technical contributors These are difficult, long-term projects that would contribute to open source investigations at Be

Bellingcat 234 Dec 31, 2022
View part of your screen in grayscale or simulated color vision deficiency.

monolens View part of your screen in grayscale or filtered to simulate color vision deficiency. Watch the demo on YouTube. Install with pip install mo

Hans Dembinski 31 Oct 11, 2022
This component provides a wrapper to display SHAP plots in Streamlit.

streamlit-shap This component provides a wrapper to display SHAP plots in Streamlit.

Snehan Kekre 30 Dec 10, 2022
基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。

COVID-19-Epidemic-Map 基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。 觉得项目还不错的话欢迎给一个star! 项目的源码可以正常运行,各个库的版本、数据库的建表语句、运行过程中遇到的坑以及解决方式在笔记.md中都

31 Dec 15, 2022
DataVisualization - The evolution of my arduino and python journey. New level of competence achieved

DataVisualization - The evolution of my arduino and python journey. New level of competence achieved

1 Jan 03, 2022
Handout for the tutorial "Creating publication-quality figures with matplotlib"

Handout for the tutorial "Creating publication-quality figures with matplotlib"

JB Mouret 1.9k Jan 02, 2023
Data Analysis: Data Visualization of Airlines

Data Analysis: Data Visualization of Airlines Anderson Cruz | London-UK | Linkedin | Nowa Capital Project: Traffic Airlines Airline Reporting Carrier

Anderson Cruz 1 Feb 10, 2022
Decision Border Visualizer for Classification Algorithms

dbv Decision Border Visualizer for Classification Algorithms Project description A python package for Machine Learning Engineers who want to visualize

Sven Eschlbeck 1 Nov 01, 2021
Arras.io Highest Scores Over Time Bar Chart Race

Arras.io Highest Scores Over Time Bar Chart Race This repo contains a python script (make_racing_bar_chart.py) that can generate a csv file which can

Road 2 Jan 16, 2022
This plugin plots the time you spent on a tag as a histogram.

This plugin plots the time you spent on a tag as a histogram.

Tom Dörr 7 Sep 09, 2022
A Graph Learning library for Humans

A Graph Learning library for Humans These novel algorithms include but are not limited to: A graph construction and graph searching class can be found

Richard Tjörnhammar 1 Feb 08, 2022
Streaming pivot visualization via WebAssembly

Perspective is an interactive visualization component for large, real-time datasets. Originally developed for J.P. Morgan's trading business, Perspect

The Fintech Open Source Foundation (www.finos.org) 5.1k Dec 27, 2022
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
Splore - a simple graphical interface for scrolling through and exploring data sets of molecules

Scroll through and exPLORE molecule sets The splore framework aims to offer a si

3 Jun 18, 2022
Extract data from ThousandEyes REST API and visualize it on your customized Grafana Dashboard.

ThousandEyes Grafana Dashboard Extract data from the ThousandEyes REST API and visualize it on your customized Grafana Dashboard. Deploy Grafana, Infl

Flo Pachinger 16 Nov 26, 2022
An automatic prover for tautologies in Metamath

completeness An automatic prover for tautologies in Metamath This program implements the constructive proof of the Completeness Theorem for propositio

Scott Fenton 2 Dec 15, 2021