Better web UI for viewing COVID wastewater data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
xenofem 5cb8ca0732 rust-overlay outputs 3 months ago
src bind on ipv6 too 4 months ago
static make chart adjustments more responsive 6 months ago
.gitignore add result/ to .gitignore 6 months ago
Cargo.lock add basic logging 6 months ago
Cargo.toml add basic logging 6 months ago
LICENSE MIT license 6 months ago
README.md remember to cargo run in release mode 5 months ago
flake.lock flake update 3 months ago
flake.nix rust-overlay outputs 3 months ago

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.