{
  "id": "comparative-advantage",
  "name": "Comparative advantage (PPCs)",
  "unit": "global",
  "unitName": "Unit 4 · The global economy",
  "topic": "International trade",
  "hl": true,
  "description": "Two countries with straight-line PPCs and different opportunity costs. The country with the lower opportunity cost of a good has the comparative advantage in it; trade at terms between the two opportunity costs lets both consume beyond their PPCs.",
  "keywords": [
    "comparative advantage",
    "absolute advantage",
    "opportunity cost",
    "specialisation",
    "terms of trade",
    "PPC",
    "Ricardo"
  ],
  "schemaUrl": "https://graphs.lectere.com/api/v1/templates/comparative-advantage",
  "previewUrl": "https://graphs.lectere.com/thumbs/comparative-advantage.svg",
  "editorUrl": "https://graphs.lectere.com/graph/comparative-advantage/",
  "params": [
    {
      "key": "countryA",
      "label": "Country A name",
      "default": "Country A",
      "type": "string"
    },
    {
      "key": "countryB",
      "label": "Country B name",
      "default": "Country B",
      "type": "string"
    },
    {
      "key": "goodX",
      "label": "Good on x-axis",
      "default": "Good X",
      "type": "string"
    },
    {
      "key": "goodY",
      "label": "Good on y-axis",
      "default": "Good Y",
      "type": "string"
    },
    {
      "key": "layout",
      "label": "Layout",
      "default": "one",
      "type": "enum",
      "options": [
        {
          "value": "one",
          "label": "Both PPCs on one diagram"
        },
        {
          "value": "two",
          "label": "Side by side"
        }
      ]
    },
    {
      "key": "values",
      "label": "Show intercept values",
      "default": true,
      "type": "boolean"
    },
    {
      "key": "trade",
      "label": "Show trading possibilities",
      "default": false,
      "type": "boolean"
    },
    {
      "key": "aX",
      "label": "A: maximum of x-axis good",
      "default": 8,
      "group": "Production",
      "type": "number",
      "min": 2,
      "max": 9.5,
      "step": 0.5
    },
    {
      "key": "aY",
      "label": "A: maximum of y-axis good",
      "default": 4,
      "group": "Production",
      "type": "number",
      "min": 2,
      "max": 9.5,
      "step": 0.5
    },
    {
      "key": "bX",
      "label": "B: maximum of x-axis good",
      "default": 3,
      "group": "Production",
      "type": "number",
      "min": 2,
      "max": 9.5,
      "step": 0.5
    },
    {
      "key": "bY",
      "label": "B: maximum of y-axis good",
      "default": 6,
      "group": "Production",
      "type": "number",
      "min": 2,
      "max": 9.5,
      "step": 0.5
    },
    {
      "key": "tot",
      "label": "Terms of trade (units of y-axis good per x-axis good)",
      "default": 1,
      "group": "Production",
      "type": "number",
      "min": 0.2,
      "max": 4,
      "step": 0.05
    }
  ],
  "defaults": {
    "countryA": "Country A",
    "countryB": "Country B",
    "goodX": "Good X",
    "goodY": "Good Y",
    "layout": "one",
    "values": true,
    "trade": false,
    "aX": 8,
    "aY": 4,
    "bX": 3,
    "bY": 6,
    "tot": 1
  },
  "panels": [
    {
      "id": "main",
      "title": null,
      "xLabel": "Good X",
      "yLabel": "Good Y",
      "xRange": [
        0,
        10
      ],
      "yRange": [
        0,
        10
      ],
      "axisKeys": {
        "x": "main:x",
        "y": "main:y"
      }
    }
  ],
  "labels": [
    {
      "key": "main:y",
      "default": "Good Y",
      "hint": "Vertical axis",
      "panel": "main"
    },
    {
      "key": "main:x",
      "default": "Good X",
      "hint": "Horizontal axis",
      "panel": "main"
    },
    {
      "key": "main.a",
      "default": "Country A",
      "hint": "Curve",
      "panel": "main"
    },
    {
      "key": "main.ax",
      "default": "80",
      "hint": "Axis mark",
      "panel": "main"
    },
    {
      "key": "main.ay",
      "default": "40",
      "hint": "Axis mark",
      "panel": "main"
    },
    {
      "key": "main.b",
      "default": "Country B",
      "hint": "Curve",
      "panel": "main"
    },
    {
      "key": "main.bx",
      "default": "30",
      "hint": "Axis mark",
      "panel": "main"
    },
    {
      "key": "main.by",
      "default": "60",
      "hint": "Axis mark",
      "panel": "main"
    }
  ],
  "elements": [
    {
      "key": "main.a",
      "kind": "curve",
      "label": "Country A"
    },
    {
      "key": "main.ax",
      "kind": "tick",
      "label": "80"
    },
    {
      "key": "main.ay",
      "kind": "tick",
      "label": "40"
    },
    {
      "key": "main.b",
      "kind": "curve",
      "label": "Country B"
    },
    {
      "key": "main.bx",
      "kind": "tick",
      "label": "30"
    },
    {
      "key": "main.by",
      "kind": "tick",
      "label": "60"
    }
  ],
  "stats": [
    {
      "label": "Opportunity cost of 1 Good X in Country A",
      "value": "0.5 Good Y"
    },
    {
      "label": "Opportunity cost of 1 Good X in Country B",
      "value": "2 Good Y"
    },
    {
      "label": "Opportunity cost of 1 Good Y in Country A",
      "value": "2 Good X"
    },
    {
      "label": "Opportunity cost of 1 Good Y in Country B",
      "value": "0.5 Good X"
    },
    {
      "label": "Comparative advantage in Good X",
      "value": "Country A"
    },
    {
      "label": "Comparative advantage in Good Y",
      "value": "Country B"
    },
    {
      "label": "Absolute advantage in Good X",
      "value": "Country A"
    },
    {
      "label": "Absolute advantage in Good Y",
      "value": "Country B"
    }
  ],
  "example": {
    "template": "comparative-advantage",
    "params": {
      "countryA": "Country A",
      "countryB": "Country B",
      "goodX": "Good X",
      "goodY": "Good Y",
      "layout": "one",
      "values": true,
      "trade": false,
      "aX": 8,
      "aY": 4,
      "bX": 3,
      "bY": 6,
      "tot": 1
    }
  }
}