https://github.com/acecentre/mileagecalculator
A simple mileage calculator - converts postcodes to miles.
https://github.com/acecentre/mileagecalculator
mapit-api mileage mileage-calculator postcodes
Last synced: 7 months ago
JSON representation
A simple mileage calculator - converts postcodes to miles.
- Host: GitHub
- URL: https://github.com/acecentre/mileagecalculator
- Owner: AceCentre
- Created: 2016-09-11T15:04:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T11:30:42.000Z (over 3 years ago)
- Last Synced: 2024-05-21T00:53:21.648Z (almost 2 years ago)
- Topics: mapit-api, mileage, mileage-calculator, postcodes
- Language: Python
- Homepage: https://mileagecalc.acecentre.net
- Size: 152 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mileage Calculator
## What does this do?
It provides a box for the user to paste lines like:
OL8 3QL to BR48lW to SW11DR to OL83QL
OL83QL to L171DW to OL83QL
and hitting the 'Go' button it will return the mileage between these points.
[](https://gyazo.com/2f7afca8cb021b623c627edba06e92c3)
## How?
By the power of Greyskull!
(No, really: Google Maps API, and the [MapIt API](https://mapit.mysociety.org/docs/#api-by_postcode))
## Why?
To help me fill in my expense claim forms. I was bored having to copy and paste loads of postcodes into google maps so I instead wasted twice as much time making an app to do it for me.
## Note
We round up to the nearest whole mile. Hope thats ok with you
## Deploy
* You will need a [Google Maps API Key](https://developers.google.com/maps/documentation/javascript/get-api-key) environmental variable (named 'GAPI_KEY')
* You will also need a [MapIt API Key](https://mapit.mysociety.org/pricing/) environment variable (named as 'MAPIT_KEY')
* You should set a port environmental variable ('PORT" = 33507)
[](https://heroku.com/deploy)