Giter Club home page Giter Club logo

co-covid-ww's Introduction

Queryable Colorado COVID wastewater data

The state has an arcgis dashboard that's pretty sweet if you have a computer. It is also a bit heavy and clunky for mobile users (ok, it's actually terrible for mobile users).

This application creates a queryable API for this data at http://wastewater.jrmontag.xyz that updates shortly after the official data is updated.

How can I use this API?

A mobile-friendly Streamlit frontend for this API can be found here.

A basic commandline app to query this API is in tools/report_app.py and works with the Python 3.9+ stdlib and requests. Additionally, there is basic API documentation available here. If you create something using this API, please share it by opening an Issue on this repo or tweeting at me!

FAQ

Isn't this application a bit over-engineered given that the data from the portal is a few MB in size?

Yes, it totally is. You could fetch the entire timeseries each time and hold it in memory for whatever data display applications you had in mind. This application wasn't designed to be maximally efficient! It was intended as a learning opportunity to create something real and online using some recent frameworks and libraries like FastAPI and Streamlit.

Credits

This application is made possible thanks to the lovely Colorado state Open Data Portal.

co-covid-ww's People

Contributors

jrmontag avatar

Watchers

 avatar  avatar

co-covid-ww's Issues

Support partial database updates

The source data api sometimes returns valid responses with only a (random?) subset of available reporting utilities. Since the server currently replaces the entire previous table with the most recent data, these responses lead to a mismatch between available utilities and measured reports which manifest as runtime exceptions in the front-end. Bad UX.

There's a temporary fix to simply not update the reporting db table if the source data is a subset of available utilities. This leads to a degraded experience since the available data will then be much further out of date (though without crashing).

A better outcome would be to switch from using full table replacements to incremental updates of the data returned from the source API.

Expose time/state of last update via API

When the source data api returns a partial update, the data is currently cached but not used to update the DB. This situation is logged server-side, but since the end-user experience is only an extra delayed chart/table update, it would be nice if this state was exposed via API such that some sort of indicator could then be added to the front-end.

Surface trending utilities via API

Build on #7 to surface via API the utilities with the largest recent changes. Experiment with absolute and relative changes to see what is most useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.