About BasketBrain
A research project archive, published as a static open-source demo.
Origin
BasketBrain started in February 2026 as a proof-of-concept Canadian grocery price comparison platform. The goal was straightforward: build a cart once, and find the cheapest store combination to fulfil it. Over the next weeks the most interesting part turned out not to be the comparison UI but the data-acquisition pipeline — the techniques needed to reliably pull Canadian retailer pricing at scale without breaking rate limits, getting IP-blocked, or losing historical continuity.
Those techniques became the foundation of a sister project, HomeGadgets.ca, a live Canadian consumer-electronics price comparison tool built on top of the pipeline patterns this project taught us. HomeGadgets is now the active development focus; BasketBrain is maintained here as a frozen research archive.
Architecture
This site is a single static HTML bundle served from GitHub Pages. All data — 30 Essential-basket items, 7 retailers, 76 geocoded storefronts, and 165 representative price observations — lives in an 89 KB snapshot.json file committed alongside the code. There is no database, no serverless function, and no live API at runtime. Each visitor receives the same byte-identical HTML.
The snapshot was produced once, on 2026-04-01, by a Python extraction script in the upstream private pipeline repo that queried the live BasketBrain database, applied the price_bounds / match_pattern filters from our curated Essential-basket definitions, reduced each (item, retailer) group to a median-adjacent representative, and remapped virtual aggregator sources onto the nearest physical storefront within 10 km of downtown Toronto (M5V 2T6).
Data sources
Prices in this snapshot were aggregated from publicly available Canadian grocery retailer catalogs and flyer feeds: the PC Express shelf-price catalog (Loblaws group), the Metro / Food Basics HTML catalog, the Voilà / Longo’s online catalog, and the Flipp flyer aggregator’s weekly Ontario feeds for participating banners (No Frills, Real Canadian Superstore, Metro, Food Basics, Your Independent Grocer).
Frozen snapshot of Canadian grocery prices observed at or before 2026-04-01. The map layer (`display_stores[]`) shows every real geocoded storefront within 10.0 km of the M5V 2T6 postal centroid in downtown Toronto. The price comparison (`stores[]` + `prices[]`) normally resolves to a real storefront per retailer (the nearest geocoded location to the postal centroid). Price provenance is carried on each row via the `source` field: `flipp` = weekly flyer price (banner-wide across Ontario); `metro_online` / `voila_longos` = online catalog price (Ontario-wide); `pcexpress` = shelf price from the PC Express Toronto catalog; so a `flipp` price attached to `Bo's NOFRILLS Toronto Richmond` reflects the Toronto-area flyer, not an in-store scan of that specific storefront. Prices are representative, not minima — we pick the median-adjacent observation per (item, retailer) to avoid loss-leader distortion. Not a live shopping tool.
What this is not
- A live price comparison tool — prices are frozen to 2026-04-01.
- A shopping recommendation service — do not make purchase decisions from this data.
- An affiliate or commercial site — BasketBrain earns no revenue.
- A substitute for Statistics Canada CPI data.
Licence & source
Source code for this site is released under the MIT licence. The snapshot JSON file is a derivative dataset of public retailer pricing; retailer trademarks remain the property of their respective owners. No retailer logos, imagery, or proprietary product data are bundled in this repo.
Repository: github.com/madriz/basketbrain (placeholder URL — updated when the repo goes public).