The Main Vine

Giant pumpkin growers compete to grow the heaviest pumpkin, and they pick their seeds by studying a plant’s family history, the way dog or horse breeders do. The official results record each pumpkin’s parents, but only as typed-in names, so following a family back meant looking up one name at a time. The Main Vine connects every result since 2005 into family trees you can search and click through.

Type
Personal project, 2026
My role
Everything: data, API, design and front end
Data
65,581 contest results in 8 categories, 2005 to 2026
Stack
Vanilla JavaScript, CSS, a Vercel Function, Neon Postgres
The Main Vine home page: a headline about every GPC fruit and cross, the heaviest pumpkin ever at 3,156 lb, and a table of the biggest of all time.
The home page shows the heaviest pumpkin ever weighed and the all-time top list.

Some background

Every fall, growers bring their biggest pumpkins to official contests called weigh-offs. The record is now 3,156 pounds. The Great Pumpkin Commonwealth (GPC), which sets the rules for these contests, publishes every result.

Growers save seeds from their best pumpkins and trade them, and a pumpkin is known by its weight, the grower’s last name and the year. So “2365 Wolf 2021” is the 2,365-pound pumpkin a grower named Wolf grew in 2021. Each result lists two parents: the seed the pumpkin grew from, which is its mother, and the plant that pollinated it, which is its father.

The problem

The results are published as tables, with the parents written in as plain text. To trace a winning pumpkin’s family, a grower had to look up each parent by name, then that parent’s parents, one year at a time. The names cause problems too:

  • They’re typed by hand. “2020 Paton” could mean one pumpkin, two different pumpkins, or a misspelling of “2020 Patton.”
  • The father is only half there. The results name the seed the father plant grew from, not what that plant went on to grow.
  • It isn’t only pumpkins. There are eight categories, including giant squash, tomatoes, marrows and long gourds.

Turning typed names into links

A script loads the published results into a Postgres database. Then each parent’s name is matched to a real, weighed pumpkin by its weight, the grower’s last name and the year, allowing for small typos and missing years.

  • A name that fits exactly one pumpkin becomes a link.
  • A name that fits several is shown as “needs review,” with every candidate, and drawn with a dashed line in the tree.
  • A name that isn’t found, because the pumpkin is older than 2005 or was never weighed at an official contest, stays as plain text.

For the father, the site looks at the same grower’s other pumpkins that season. If exactly one of them grew from the father’s seed, it’s almost certainly the plant the pollen came from, so the tree shows what that plant grew. The site says plainly that these are strong guesses, not certainties.

The family tree

The family tree is the main part of the site, and I drew it without a charting library. Each pumpkin is a real HTML card with links and buttons, positioned absolutely; the connecting lines are thin elements placed from the same coordinates.

Pedigree of 3156 Wallace 2026, three generations back, with seed and pollinator cards, what each pollinator plant grew, and a side panel for the selected fruit.
The family tree of the heaviest pumpkin on record. Each card shows the weight, a tape measurement of the pumpkin’s size, and how much heavier or lighter it was than that size usually predicts.

The layout is one recursive pass. Parents are placed first, top to bottom, and each pumpkin is then centered on its first and last parent, so the tree never overlaps however unevenly it branches:

const place = (n, top) => {
  n.h = heightOf(n);
  n.x = colX(n.gen);
  if (n.gen > maxGen) maxGen = n.gen;
  const gap = isCompact(n) ? CGAP : GAP;
  let bottom;
  if (!n.kids.length) { n.y = top; bottom = top + n.h + gap; }
  else {
    let t = top;
    n.kids.forEach((k) => { t = place(k, t); });
    const first = n.kids[0], last = n.kids[n.kids.length - 1];
    const mid = ((first.y + anchorOf(first)) + (last.y + anchorOf(last))) / 2;
    n.y = Math.max(top, mid - anchorOf(n));
    bottom = Math.max(t, n.y + n.h + gap);
  }
  flat.push(n);
  return bottom;
};
  • Show 2 to 8 generations, or open and close any branch on its own.
  • Fold repeated ancestors: a famous seed that appears many times in a tree is drawn once and marked ×N.
  • From the fourth generation back, cards shrink to one line, so a deep tree stays readable.
  • Two ways to show what each father plant grew. The choice is saved in localStorage.
  • Drag the empty part of the tree to move around it, like a map. Pointer Events with pointer capture keep the drag smooth, and buttons and links inside the tree still work.

Working out inbreeding

Breeders keep an eye on inbreeding, because crossing close relatives too often can weaken a line. Every pumpkin’s page shows its inbreeding coefficient, how many generations are on record and how many different ancestors it has. The coefficient is the kinship of the pumpkin’s two parents, and kinship is defined recursively: the kinship of two pumpkins is the average kinship of the younger one’s parents with the older one. Saving the result for each pair keeps a 13-generation tree fast.

const kin = (a, b) => {
  if (a == null || b == null) return 0;
  if (!N[a] || !N[b]) return a === b ? 0.5 : 0;
  const key = a < b ? a + '|' + b : b + '|' + a;
  if (memo[key] !== undefined) return memo[key];
  let r;
  if (a === b) { const pp = par(a); r = 0.5 * (1 + (pp ? kin(pp[0], pp[1]) : 0)); }
  else {
    let x = a, y = b;
    if (N[b].y > N[a].y) { x = b; y = a; }
    const pp = par(x);
    r = pp ? 0.5 * (kin(pp[0], y) + kin(pp[1], y)) : 0;
  }
  memo[key] = r;
  return r;
};

The API

  • One Vercel Function, /api/v1, answers six questions: meta, top, fruit, search, grower and results. It queries Neon Postgres through its serverless driver.
  • Responses use the short field names the front end reads directly, which keeps payloads small for a 65,000-row dataset.
  • The front end caches each request by its query string and drops failed ones, so going back is instant and a retry actually retries.
  • Hash routes give every pumpkin, grower, year and search its own address, so a grower can share a link to a pedigree and the Back button works.

On a phone

Wide tables and the tree scroll inside their own panels, so the page itself never scrolls sideways at phone width.

The Main Vine home page on a phone, with the headline, search and the heaviest pumpkin card.
Home
A fruit page on a phone with weight, OTT, chart comparison, inbreeding and ancestors on record.
A pumpkin’s page

Data: GPC weigh-off results published on BigPumpkins.com.