{
  "id": "bipartite",
  "name": "Two-column links",
  "family": "flow",
  "tier": "pro",
  "summary": "Use a two-column link chart (a bipartite graph) to show which items on the left connect to which items on the right, and how strongly. Takes the example's crops-and-producers table or any two-sided links as { left: [{ name, total? }], links: [{ left, right, value }] }.",
  "title": "Three countries grow more than half the world's coffee, and three more than half its cocoa",
  "subtitle": "Top three producers of four crops, share of world production by weight, 2024",
  "howToRead": "Each crop on the left is its whole world harvest; ribbons run to the three biggest growers on the right, as wide as their share, and the faint rest is everyone else.",
  "useWhen": [
    "there are two kinds of thing and links only run between the kinds",
    "some items on one side link to several on the other",
    "there are up to about 15 items a side",
    "any items linked to another kind with a weight (products to suppliers, skills to teams, topics to sources): pass { left, links }; a left item's total is the whole its links are a share of, else their sum"
  ],
  "avoidWhen": [
    "links also run within a side (use a network)",
    "there are more than two stages (use a Sankey)",
    "every item links to every other (use a heatmap)"
  ],
  "fields": [
    {
      "name": "crops[].crop",
      "type": "category",
      "description": "the left column"
    },
    {
      "name": "crops[].year",
      "type": "year",
      "description": "the year of the figures"
    },
    {
      "name": "crops[].worldTonnes",
      "type": "number",
      "description": "world production, tonnes",
      "unit": "tonnes",
      "format": "count"
    },
    {
      "name": "links[].crop",
      "type": "category",
      "description": "the crop a link starts from"
    },
    {
      "name": "links[].country",
      "type": "place",
      "description": "the producer it runs to"
    },
    {
      "name": "links[].tonnes",
      "type": "number",
      "description": "tonnes that country produced",
      "unit": "tonnes",
      "format": "count"
    }
  ],
  "shapes": [
    {
      "when": [
        "left"
      ],
      "fields": [
        {
          "name": "left[].name",
          "type": "category",
          "description": "the left column, top to bottom (each its own ink; up to about 15)"
        },
        {
          "name": "left[].total",
          "type": "number",
          "sign": "non-negative",
          "description": "optional: the whole each left item's links are shares of; the unlinked rest shows faint (else the sum of its links)",
          "optional": true
        },
        {
          "name": "left[].year",
          "type": "year",
          "description": "optional: the year of its figures",
          "optional": true
        },
        {
          "name": "links[].left",
          "type": "category",
          "description": "the left item a link starts from"
        },
        {
          "name": "links[].right",
          "type": "category",
          "description": "the right item it runs to"
        },
        {
          "name": "links[].value",
          "type": "number",
          "sign": "non-negative",
          "description": "the link's size, in the left item's units"
        }
      ]
    }
  ],
  "hints": {
    "rest": "everyone else",
    "whole": "the world total",
    "names": {
      "Cote d'Ivoire": "Côte d'Ivoire"
    }
  },
  "interactions": [
    "hover or tap a ribbon to read a country's share",
    "hover a crop or a country to light its links"
  ],
  "motion": "The ribbons draw across from the crops to the growers one after another.",
  "sound": "A pop on hover pitched by crop. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "more than half",
      "in": "title"
    }
  ],
  "tags": [
    "bipartite",
    "links",
    "two columns",
    "food",
    "agriculture",
    "coffee",
    "trade"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "Coffee, cocoa bean, banana and avocado production",
    "publisher": "Our World in Data, from the Food and Agriculture Organization of the United Nations (FAOSTAT)",
    "url": "https://ourworldindata.org/grapher/coffee-bean-production",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  },
  "note": "Shares are of each crop's own world total, so the four crops fill the same height whatever their tonnes. Coffee is green coffee beans."
}