The engineering behind the fast dashboard experience
Pre-computed aggregations instead of 100k+ raw records
300x faster than computing from raw data (15+ seconds)
Complete Metropolitan Police stop and search history
The Metropolitan Police API provides individual stop and search records. Storing and querying 100,000+ raw records in the browser leads to:
Instead of storing raw records, pre-compute all possible filter combinations:
Each combination stores aggregated statistics (counts, percentages, breakdowns). This reduces the dataset from 100k+ records to ~500, enabling instant filtering and visualization.
The data ingestion process is handled by a separate cron job rather than the client:
A 300x performance improvement that makes the dashboard feel instant: