Better web UI for viewing COVID wastewater data
 
 
 
 
Go to file
xenofem d1f8a3b8b6 cut off large spikes by default 2023-10-14 23:54:36 -04:00
src remove unmaintained json crate, do our own string escaping 2023-08-06 15:16:37 -04:00
static cut off large spikes by default 2023-10-14 23:54:36 -04:00
.gitignore add result/ to .gitignore 2022-04-16 00:03:50 -04:00
Cargo.lock remove unmaintained json crate, do our own string escaping 2023-08-06 15:16:37 -04:00
Cargo.toml remove unmaintained json crate, do our own string escaping 2023-08-06 15:16:37 -04:00
LICENSE MIT license 2022-04-15 18:12:22 -04:00
README.md remember to cargo run in release mode 2022-04-28 00:41:10 -04:00
flake.lock flake update 2023-04-05 15:58:44 -04:00
flake.nix ditch crate2nix, use fenix instead of oxalica/rust-overlay 2022-12-09 16:10:22 -05:00

README.md

💩📈

A better web UI for COVID wastewater data

💩📈 is a simple web server that periodically downloads a data PDF from the Massachusetts Water Resources Authority, parses it to extract the data, and serves the data as CSV and JSON along with a simple Chart.js-based web frontend.

Environment variables

  • CACHED_PDF_PATH: file path to save the PDF to. Default: ./data.pdf.
  • STATIC_DIR: directory containing static files to serve. Default: ./static/.

Running

Nix Flakes

nix run git+https://git.xeno.science/xenofem/poop-graph?ref=main

(The Nix package is wrapped with STATIC_DIR set automatically to the correct Nix store path, so it'll serve the static files properly no matter what directory you run it from.)

Non-Nix

git clone https://git.xeno.science/xenofem/poop-graph
cd poop-graph
cargo run --release

Other setup

  • 💩📈 serves HTTP on 127.0.0.1:8080, and is meant to be used behind a reverse proxy (e.g. Nginx), ideally with SSL certificates (e.g. Let's Encrypt). If you prefer, you could also use that web server to serve the static files, and only pass requests for /data.csv and /data.json to 💩📈.
  • You'll probably want to set up a service (systemd or whatever your OS uses) to start 💩📈 automatically with environment variables set appropriately.