{
  "name": "social-spending-by-country",
  "title": "Social Spending by Country",
  "description": "Public spending on pensions, health, family, unemployment and other social programmes as a share of GDP, for 42 countries since 1980. France spends about 31% of GDP, against an OECD average of 21%.",
  "status": "monitored",
  "keywords": [
    "social spending by country",
    "social expenditure as percentage of GDP",
    "public social spending OECD",
    "pension spending by country",
    "healthcare spending as percent of GDP",
    "welfare state spending",
    "family benefits spending",
    "unemployment benefits spending",
    "OECD Social Expenditure Database",
    "SOCX"
  ],
  "licenses": [
    {
      "name": "OECD Terms of Use",
      "title": "OECD Terms & Conditions, section 3 (Data): any use, including commercial, with credit to the OECD",
      "path": "https://www.oecd.org/en/about/terms-conditions.html"
    }
  ],
  "sources": [
    {
      "title": "OECD, Social Expenditure Database (SOCX): Social expenditure aggregates (OECD Data Explorer dataflow OECD.ELS.SPD:DSD_SOCX_AGG@DF_SOCX_AGG, version 1.0)",
      "path": "https://sdmx.oecd.org/public/rest/dataflow/OECD.ELS.SPD/DSD_SOCX_AGG@DF_SOCX_AGG/latest"
    },
    {
      "title": "OECD Data Explorer SDMX API (how the data were retrieved)",
      "path": "https://sdmx.oecd.org/public/rest/"
    },
    {
      "title": "OECD, Social Expenditure Database (SOCX)",
      "path": "https://www.oecd.org/en/data/datasets/social-expenditure-database-socx.html"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "quarterly",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "path": "data/social-spending-by-country.csv",
      "name": "social-spending-by-year",
      "title": "Public social spending as a percentage of GDP by country, year and policy area",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country_code",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 country code as used by OECD (OECD for the OECD aggregate).",
            "constraints": {
              "pattern": "^[A-Z]{3,4}$"
            }
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country name as OECD labels it."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Calendar year (or fiscal year as the country reports it to OECD), 1980 to 2024."
          },
          {
            "name": "total_public",
            "type": "number",
            "description": "Public social expenditure, all areas, percent of GDP. Spending by general government and compulsory social security funds, OECD source code ES10.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "old_age",
            "type": "number",
            "description": "Public spending on old age (pensions, early retirement pensions, care and services for the old), percent of GDP. OECD area 1.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "survivors",
            "type": "number",
            "description": "Public spending on survivors (survivors' pensions, funeral expenses), percent of GDP. OECD area 2.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "incapacity",
            "type": "number",
            "description": "Public spending on incapacity-related benefits (disability pensions, sick pay, rehabilitation), percent of GDP. OECD area 3.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "health",
            "type": "number",
            "description": "Public spending on health (in-patient and out-patient care, medical goods), percent of GDP. OECD area 4.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "family",
            "type": "number",
            "description": "Public spending on family (child allowances, maternity and parental leave, early childhood education and care), percent of GDP. OECD area 5.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "active_labour_market",
            "type": "number",
            "description": "Public spending on active labour market programmes (training, employment incentives, job creation, public employment services), percent of GDP. OECD area 6.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "unemployment",
            "type": "number",
            "description": "Public spending on unemployment (unemployment compensation, severance pay, early retirement for labour market reasons), percent of GDP. OECD area 7. Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "housing",
            "type": "number",
            "description": "Public spending on housing (housing assistance and other housing benefits), percent of GDP. OECD area 8.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Public spending on other social policy areas (income support to low-income households, social assistance), percent of GDP. OECD area 9.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "total_public_and_mandatory_private",
            "type": "number",
            "description": "Public plus mandatory private social expenditure, all areas, percent of GDP (OECD source code ES10_20). Blank where OECD gives no value; only a few countries report it for the newest years.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "mandatory_private",
            "type": "number",
            "description": "Mandatory private social expenditure (for example employer-run sickness pay and compulsory private pensions), all areas, percent of GDP (OECD source code ES20). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "voluntary_private",
            "type": "number",
            "description": "Voluntary private social expenditure (for example voluntary occupational and personal pensions and health insurance), all areas, percent of GDP (OECD source code ES30). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "country_code",
          "year"
        ]
      }
    },
    {
      "path": "data/latest.csv",
      "name": "latest",
      "title": "Public social spending as a percentage of GDP in each country's latest year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country_code",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 country code as used by OECD (OECD for the OECD aggregate).",
            "constraints": {
              "pattern": "^[A-Z]{3,4}$"
            }
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country name as OECD labels it."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Latest year with a public total for the country (2021 to 2024); the other columns are for the same year."
          },
          {
            "name": "total_public",
            "type": "number",
            "description": "Public social expenditure, all areas, percent of GDP. Spending by general government and compulsory social security funds, OECD source code ES10.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "old_age",
            "type": "number",
            "description": "Public spending on old age (pensions, early retirement pensions, care and services for the old), percent of GDP. OECD area 1.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "survivors",
            "type": "number",
            "description": "Public spending on survivors (survivors' pensions, funeral expenses), percent of GDP. OECD area 2.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "incapacity",
            "type": "number",
            "description": "Public spending on incapacity-related benefits (disability pensions, sick pay, rehabilitation), percent of GDP. OECD area 3.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "health",
            "type": "number",
            "description": "Public spending on health (in-patient and out-patient care, medical goods), percent of GDP. OECD area 4.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "family",
            "type": "number",
            "description": "Public spending on family (child allowances, maternity and parental leave, early childhood education and care), percent of GDP. OECD area 5.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "active_labour_market",
            "type": "number",
            "description": "Public spending on active labour market programmes (training, employment incentives, job creation, public employment services), percent of GDP. OECD area 6.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "unemployment",
            "type": "number",
            "description": "Public spending on unemployment (unemployment compensation, severance pay, early retirement for labour market reasons), percent of GDP. OECD area 7. Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "housing",
            "type": "number",
            "description": "Public spending on housing (housing assistance and other housing benefits), percent of GDP. OECD area 8.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Public spending on other social policy areas (income support to low-income households, social assistance), percent of GDP. OECD area 9.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "total_public_and_mandatory_private",
            "type": "number",
            "description": "Public plus mandatory private social expenditure, all areas, percent of GDP (OECD source code ES10_20). Blank where OECD gives no value; only a few countries report it for the newest years.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "mandatory_private",
            "type": "number",
            "description": "Mandatory private social expenditure (for example employer-run sickness pay and compulsory private pensions), all areas, percent of GDP (OECD source code ES20). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "voluntary_private",
            "type": "number",
            "description": "Voluntary private social expenditure (for example voluntary occupational and personal pensions and health insurance), all areas, percent of GDP (OECD source code ES30). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "country_code"
        ]
      }
    },
    {
      "path": "data/oecd-average.csv",
      "name": "oecd-average",
      "title": "OECD average social spending as a percentage of GDP by year and policy area",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country_code",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 country code as used by OECD (OECD for the OECD aggregate).",
            "constraints": {
              "pattern": "^[A-Z]{3,4}$"
            }
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country name as OECD labels it."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Calendar year (or fiscal year as the country reports it to OECD), 1980 to 2024."
          },
          {
            "name": "total_public",
            "type": "number",
            "description": "Public social expenditure, all areas, percent of GDP. Spending by general government and compulsory social security funds, OECD source code ES10.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "old_age",
            "type": "number",
            "description": "Public spending on old age (pensions, early retirement pensions, care and services for the old), percent of GDP. OECD area 1.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "survivors",
            "type": "number",
            "description": "Public spending on survivors (survivors' pensions, funeral expenses), percent of GDP. OECD area 2.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "incapacity",
            "type": "number",
            "description": "Public spending on incapacity-related benefits (disability pensions, sick pay, rehabilitation), percent of GDP. OECD area 3.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "health",
            "type": "number",
            "description": "Public spending on health (in-patient and out-patient care, medical goods), percent of GDP. OECD area 4.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "family",
            "type": "number",
            "description": "Public spending on family (child allowances, maternity and parental leave, early childhood education and care), percent of GDP. OECD area 5.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "active_labour_market",
            "type": "number",
            "description": "Public spending on active labour market programmes (training, employment incentives, job creation, public employment services), percent of GDP. OECD area 6.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "unemployment",
            "type": "number",
            "description": "Public spending on unemployment (unemployment compensation, severance pay, early retirement for labour market reasons), percent of GDP. OECD area 7. Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "housing",
            "type": "number",
            "description": "Public spending on housing (housing assistance and other housing benefits), percent of GDP. OECD area 8.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Public spending on other social policy areas (income support to low-income households, social assistance), percent of GDP. OECD area 9.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "total_public_and_mandatory_private",
            "type": "number",
            "description": "Public plus mandatory private social expenditure, all areas, percent of GDP (OECD source code ES10_20). Blank where OECD gives no value; only a few countries report it for the newest years.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "mandatory_private",
            "type": "number",
            "description": "Mandatory private social expenditure (for example employer-run sickness pay and compulsory private pensions), all areas, percent of GDP (OECD source code ES20). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "voluntary_private",
            "type": "number",
            "description": "Voluntary private social expenditure (for example voluntary occupational and personal pensions and health insurance), all areas, percent of GDP (OECD source code ES30). Blank where OECD gives no value.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "country_code",
          "year"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "oecd-social-spending-since-1980",
      "title": "OECD social spending as a share of GDP since 1980",
      "description": "Public social spending (pensions, health, family, unemployment and other benefits) as a percentage of GDP, as OECD averages it. It rose from 14% in 1980 to 21% in 2024, with a spike to 23% in 2020, the Covid year.",
      "resourceName": "oecd-average",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 50,
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": "d",
          "grid": true,
          "domain": [
            0,
            26
          ],
          "label": "% of GDP"
        },
        "marks": [
          {
            "type": "ruleX",
            "staticData": [
              {
                "year": 2020
              }
            ],
            "x": "year",
            "stroke": "#8b929d",
            "strokeDasharray": "4,4",
            "tip": false
          },
          {
            "type": "areaY",
            "x": "year",
            "y": "total_public",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "tip": false
          },
          {
            "type": "line",
            "x": "year",
            "y": "total_public",
            "stroke": "#111827",
            "sort": "year"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2020,
                "v": 23.32,
                "label": "2020: 23%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -8,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 1980,
                "v": 14.404,
                "label": "1980: 14%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -10,
            "textAnchor": "start"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "v": 21.229,
                "label": "2024: 21%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": 14,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "social-spending-ranking",
      "title": "Countries ranked by public social spending",
      "description": "Public social spending as a percentage of GDP in each country's latest year (2024 for 24 of 42 countries, 2021 to 2023 for the rest). Austria spends 31.6%, Finland 31.4% and France 30.6% of GDP; Belgium, Germany and Italy about 28%; Mexico spends 10% and Peru 8%. The OECD average is 21%.",
      "resourceName": "latest",
      "specType": "plot",
      "spec": {
        "height": 820,
        "marginLeft": 110,
        "x": {
          "tickFormat": "d",
          "domain": [
            0,
            34
          ],
          "label": "Public social spending, % of GDP"
        },
        "y": {
          "grid": false
        },
        "marks": [
          {
            "type": "barX",
            "x": "total_public",
            "y": "country",
            "fill": "#111827",
            "sort": "total_public"
          }
        ]
      }
    },
    {
      "name": "oecd-spending-by-area",
      "title": "Selected OECD public social spending areas",
      "description": "OECD average public spending by area, as a percentage of GDP. Old age is the largest area and rose most: from 5.0% in 1980 to 7.7% in 2021. Health rose from 4.1% to 6.6%; family spending from 1.5% to 2.3%. Unemployment stays near 1%.",
      "resourceName": "oecd-average",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 50,
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": "d",
          "grid": true,
          "domain": [
            0,
            9
          ],
          "label": "% of GDP"
        },
        "marks": [
          {
            "type": "line",
            "x": "year",
            "y": "health",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": {
              "field": "health",
              "notNull": true
            }
          },
          {
            "type": "line",
            "x": "year",
            "y": "family",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": {
              "field": "family",
              "notNull": true
            }
          },
          {
            "type": "line",
            "x": "year",
            "y": "unemployment",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": {
              "field": "unemployment",
              "notNull": true
            }
          },
          {
            "type": "line",
            "x": "year",
            "y": "old_age",
            "stroke": "#111827",
            "sort": "year",
            "filter": {
              "field": "old_age",
              "notNull": true
            }
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2021,
                "v": 7.746,
                "label": "Old age: 7.7%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2021,
                "v": 6.637,
                "label": "Health: 6.6%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2021,
                "v": 2.314,
                "label": "Family: 2.3%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2021,
                "v": 1.034,
                "label": "Unemployment: 1.0%"
              }
            ],
            "x": "year",
            "y": "v",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          }
        ]
      }
    }
  ]
}
