Skip to content
A dockless mobility data API built with Python/Sanic
Branch: master
Clone or download
johnclary Merge pull request #53 from cityofaustin/cellids
Use cell_id instead of GEOID10
Latest commit 6d33b36 May 7, 2019

README.md

dockless-api

The Dockless API provides an interface for retrieving anonymized and aggregated dockless mobility trip data in the City of Austin. This API supplies data to our interactive Dockless Mobility Explorer.

Table of Contents

Installation

About the "Database"

The source database for the API is our Dockless Vehicle Trips dataset.

Option 1: Run w/ Docker (Suggested)

  1. Install docker and start the engine: systemctl start docker

  2. Clone repo and cd into it. git clone https://github.com/cityofaustin/dockless-api.git

  3. Start the docker server (in the background on port 80)

./scripts/serve-local.sh

  1. Make a request:
curl http://localhost:80/v1/trips?xy=-97.75094341278084,30.276185988411257&flow=destination

Option 2: Run w/ Python 3

  1. Clone repo and cd into it.

  2. Install python requirements:

pip install -r requirements.txt
  1. Install libspatialindex

  2. Start the server:

python app/app.py
  1. Make a request:
curl http://localhost:8000/v1/trips?xy=-97.75094341278084,30.276185988411257&flow=destination

Running Docker

docker build -f Dockerfile.base -t cityofaustin/dockless-api .
docker tag cityofaustin/dockless-api:latest cityofaustin/dockless-api:latest
docker push cityofaustin/dockless-api

API Reference

See here

Deployment

Code in the master branch is automatically deployed to Amazon ECS (Elastic Container Service) which updates the Docker image and deploys the new code to all running containers via Fargate. Credit to @sergiogcx for setting up this deployment for our team!

You can’t perform that action at this time.