Skip to content

Design Architecture

David Shi edited this page Apr 3, 2017 · 3 revisions

// TODO_

apiworker.py -- the fetcher and database manager

This file serves as a worker thread that fetches and retrieves data from the respective sources and uploads them to the SQLite database stored locally. For Discharge and Gage Height, this serves as a cache to save time and speed up display. For Rainfall, this can be used additionally as a history.

We construct our USGS queries with string concatenation and construct/format the data with the ORM tool, pony.

grapher.py -- the visualizer

Using matplotlib, there's a simple plot() function that takes in two lists, one for X and one for Y points, plots them together and assumes order.

Clone this wiki locally