weather

NOAA Rainfall Tracker — Palo Alto

Fetches daily precipitation data from the NOAA NCEI public API (no API key needed) for the current rain season (Oct 1 – present) and generates a report.

Quick start

# No dependencies beyond Python 3.10+ standard library
python weather/noaa_rainfall.py

Output formats

python weather/noaa_rainfall.py           # Pretty-printed console report
python weather/noaa_rainfall.py --json    # Raw JSON
python weather/noaa_rainfall.py --csv     # CSV (pipeable)

Email updates

Credentials are stored in your macOS Keychain — nothing is saved in plaintext.

# 1. One-time setup (interactive, saves to Keychain)
python weather/noaa_rainfall.py --setup-email

# 2. Send a report
python weather/noaa_rainfall.py --email you@gmail.com

For Gmail, use an App Password (not your main password).

Credentials are stored under the Keychain service noaa-rainfall-tracker. You can view/delete them in Keychain Access.app or via security delete-generic-password -s noaa-rainfall-tracker -a smtp_pass.

Non-macOS fallback: set SMTP_USER and SMTP_PASS environment variables.

Automate with cron

Send yourself a weekly update every Monday at 8 AM:

0 8 * * 1  cd /path/to/atlas && python weather/noaa_rainfall.py --email you@gmail.com

Custom date ranges

python weather/noaa_rainfall.py --start 2024-10-01 --end 2025-03-15

Data source