Inspiration

We wanted to tackle the problems of catching outliers/ anomalous data points. In this case, catching unlogged or misreported collections in real time. Accurate tracking matters, and we wanted a system that detects discrepancies and potential fraud as they happen.

What it does

CauldronWatch is a real-time monitoring dashboard that tracks potion levels across all cauldrons, detects collection events, and validates transport tickets. It:

  • Detects drain events using rate-of-change analysis and accounts for continuous filling during drainage
  • Matches tickets to actual drains and flags discrepancies (under-reporting, missing tickets, over-reporting)
  • Ranks cauldrons by overflow risk using travel times and capacity limits
  • Scores courier trustworthiness based on ticket accuracy
  • Visualizes the network with an interactive map showing cauldron locations, connections, and risk levels

How we built it

  • Backend: Python with pandas/numpy for time-series analysis and scipy for linear regression on filling segments
  • Detection algorithm: Analyzes level changes to detect drains, accounting for filling during drainage, and calculates volumes
  • Ticket matching: Matches drains to tickets by date/cauldron with configurable tolerance
  • Frontend: Streamlit dashboard with Plotly for interactive visualizations
  • Data pipeline: Fetches data from the API, processes it, detects anomalies, and surfaces insights

Challenges we ran into

  • Fill rate calculation: Median point-to-point rates were noisy. We switched to linear regression on long-term filling segments and used percentiles to capture steady-state rates
  • Drain detection accuracy: Accurate volume requires accounting for continuous filling. We track level drops plus the potion generated during the drain period
  • Matching logic: Tickets arrive at end of day with only dates, so we account for travel time to match drains correctly
  • Real-time processing: Optimized segment identification and regression to handle large time-series efficiently

Accomplishments that we're proud of

  • Detected 141 drain events with volume calculations
  • Identified 975L of unaccounted potion across multiple cauldrons
  • Built a trust scorecard that flags couriers with consistent under-reporting
  • Created an overflow prediction system that accounts for travel time and unload time
  • Developed a clean, modular codebase that's easy to extend and maintain

What we learned

  • Time-series analysis: Using linear regression on segments provides more accurate rates than point-to-point differences
  • Real-world constraints matter: Accounting for travel time, unload time, and continuous filling improves accuracy
  • Visualization helps: Interactive maps and charts make it easier to spot patterns and anomalies
  • Conservative estimates help: Using percentiles instead of medians provides more reliable steady-state measurements

What's next for CauldronWatch

  • Route optimization: Use the network graph to compute optimal courier routes to prevent overflow
  • Forecasting: Predict future levels and flag at-risk cauldrons earlier
  • Real-time alerts: Notify managers when discrepancies exceed thresholds
  • Historical analysis: Compare trends over time to identify seasonal patterns
  • Mobile app: Let couriers log collections on the go with automatic validation

Built With

Share this project:

Updates