brennv / firehouse

Enriching data from firehouse response logs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Versions Build Status codecov

firehouse

Enriching data from firehouse response logs with:

Example map: https://fire.vonapp.co

Example enriched json: https://fire.vonapp.co/data

Demo maps: https://fire.vonapp.co/demo/REPORT

Demo enriched json: https://fire.vonapp.co/demo/REPORT/data

Usage

Clone the repo, install requirements and start the server:

pip install -r requirements.txt
python app.py

To demo more reports, add json files to the demo/ folder and visit the <host>/demo endpoint.

To get the enriched demo json, curl or navigate to <host>/demo/<id>/data.

To get enriched json you can also POST json to the /data endpoint. In Python it would look like:

import requests
import json

with open(filepath) as f:
      data = json.load(f)
response = requests.post('https://fire.vonapp.co/data', json=json.dumps(data))
print(response.json())

Development

Install package and dev requirements:

pip install -r requirements.txt
pip install pytest pytest-cov pylama

Tests and linting run with:

pytest -v --cov=firehouse/ tests/ && pylama -i E501 firehouse/

Roadmap

  • Session management
  • Mapping multiple reports
  • Contextual sidebar with report list
  • api/ endpoints with swagger
  • Caching
  • async calls for weather and parcel data

About

Enriching data from firehouse response logs

License:MIT License


Languages

Language:Python 96.2%Language:HTML 3.8%