{
  "name": "tax-revenue-by-country",
  "title": "Tax Revenue by Country",
  "description": "Total tax revenue as a share of GDP for about 140 countries, split into income, social security, payroll, property and goods and services taxes. OECD countries collect about twice as much as African ones: 34% against 16% of GDP.",
  "status": "monitored",
  "keywords": [
    "tax revenue by country",
    "tax to GDP ratio",
    "tax revenue as percentage of GDP",
    "tax revenue by tax type",
    "tax mix",
    "income tax revenue",
    "social security contributions",
    "VAT revenue by country",
    "OECD Global Revenue Statistics"
  ],
  "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, Global Revenue Statistics Database: Comparative tax revenues (OECD Data Explorer dataflow OECD.CTP.TPS:DSD_REV_COMP_GLOBAL@DF_RSGLOBAL, version 2.1)",
      "path": "https://sdmx.oecd.org/public/rest/dataflow/OECD.CTP.TPS/DSD_REV_COMP_GLOBAL@DF_RSGLOBAL/latest"
    },
    {
      "title": "OECD Data Explorer SDMX API (how the data were retrieved)",
      "path": "https://sdmx.oecd.org/public/rest/"
    },
    {
      "title": "OECD, Tax revenue statistics (Global Revenue Statistics Database and the Revenue Statistics publications)",
      "path": "https://www.oecd.org/en/topics/policy-issues/tax-revenue-statistics.html"
    }
  ],
  "upkeep": {
    "mode": "frozen",
    "snapshot": "2026-12-05",
    "reason": "OECD's SDMX API answers HTTP 500 to GitHub Actions runners (tested 2026-12-05), so a refresh job cannot run there. Re-run scripts/fetch.mjs and scripts/build.mjs from a normal network when OECD publishes new data (about once a year)."
  },
  "resources": [
    {
      "path": "data/tax-revenue-by-country.csv",
      "name": "tax-revenue-by-year",
      "title": "Tax revenue as a percentage of GDP by country, year and main tax type",
      "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.",
            "constraints": {
              "pattern": "^[A-Z]{3}$"
            }
          },
          {
            "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), 1990 to 2025."
          },
          {
            "name": "total_tax",
            "type": "number",
            "description": "Total tax revenue of the general government (central, state, local and social security funds), percent of GDP. OECD heading 'Total tax revenue'.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "income_profits",
            "type": "number",
            "description": "Taxes on income, profits and capital gains of individuals and corporations, percent of GDP (OECD heading 1000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "social_security",
            "type": "number",
            "description": "Social security contributions by employees, employers and the self-employed, percent of GDP (OECD heading 2000). Blank where OECD gives no value.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "payroll",
            "type": "number",
            "description": "Taxes on payroll and workforce, percent of GDP (OECD heading 3000). 0 where OECD reports none or the value rounds to zero; a few small negative values (Bhutan 2016 -0.049).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "property",
            "type": "number",
            "description": "Taxes on property (immovable property, net wealth, inheritance, financial transactions), percent of GDP (OECD heading 4000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "goods_services",
            "type": "number",
            "description": "Taxes on goods and services (VAT, sales taxes, excises, customs and import duties), percent of GDP (OECD heading 5000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Other taxes, percent of GDP (OECD heading 6000). Can be slightly negative where refunds exceed receipts (Armenia 2018).",
            "constraints": {
              "minimum": -1
            }
          }
        ],
        "primaryKey": [
          "country_code",
          "year"
        ]
      }
    },
    {
      "path": "data/latest.csv",
      "name": "latest",
      "title": "Tax revenue 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.",
            "constraints": {
              "pattern": "^[A-Z]{3}$"
            }
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country name as OECD labels it."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Latest year with a total for the country (2023 to 2025; Venezuela 2013)."
          },
          {
            "name": "total_tax",
            "type": "number",
            "description": "Total tax revenue of the general government (central, state, local and social security funds), percent of GDP. OECD heading 'Total tax revenue'.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "income_profits",
            "type": "number",
            "description": "Taxes on income, profits and capital gains of individuals and corporations, percent of GDP (OECD heading 1000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "social_security",
            "type": "number",
            "description": "Social security contributions by employees, employers and the self-employed, percent of GDP (OECD heading 2000). Blank where OECD gives no value.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "payroll",
            "type": "number",
            "description": "Taxes on payroll and workforce, percent of GDP (OECD heading 3000). 0 where OECD reports none or the value rounds to zero; a few small negative values (Bhutan 2016 -0.049).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "property",
            "type": "number",
            "description": "Taxes on property (immovable property, net wealth, inheritance, financial transactions), percent of GDP (OECD heading 4000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "goods_services",
            "type": "number",
            "description": "Taxes on goods and services (VAT, sales taxes, excises, customs and import duties), percent of GDP (OECD heading 5000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Other taxes, percent of GDP (OECD heading 6000). Can be slightly negative where refunds exceed receipts (Armenia 2018).",
            "constraints": {
              "minimum": -1
            }
          }
        ],
        "primaryKey": [
          "country_code"
        ]
      }
    },
    {
      "path": "data/regional-averages.csv",
      "name": "regional-averages",
      "title": "Average tax revenue as a percentage of GDP: OECD, Africa, Asia and the Pacific, Latin America and the Caribbean",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "group",
            "type": "string",
            "description": "Average as published by OECD: 'OECD average', 'Africa average', 'Asia and the Pacific average' or 'Latin America and the Caribbean average'.",
            "constraints": {
              "enum": [
                "OECD average",
                "Africa average",
                "Asia and the Pacific average",
                "Latin America and the Caribbean average"
              ]
            }
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Calendar year (or fiscal year as the country reports it to OECD), 1990 to 2025."
          },
          {
            "name": "total_tax",
            "type": "number",
            "description": "Total tax revenue of the general government (central, state, local and social security funds), percent of GDP. OECD heading 'Total tax revenue'.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "income_profits",
            "type": "number",
            "description": "Taxes on income, profits and capital gains of individuals and corporations, percent of GDP (OECD heading 1000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "social_security",
            "type": "number",
            "description": "Social security contributions by employees, employers and the self-employed, percent of GDP (OECD heading 2000). Blank where OECD gives no value.",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "payroll",
            "type": "number",
            "description": "Taxes on payroll and workforce, percent of GDP (OECD heading 3000). 0 where OECD reports none or the value rounds to zero; a few small negative values (Bhutan 2016 -0.049).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "property",
            "type": "number",
            "description": "Taxes on property (immovable property, net wealth, inheritance, financial transactions), percent of GDP (OECD heading 4000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "goods_services",
            "type": "number",
            "description": "Taxes on goods and services (VAT, sales taxes, excises, customs and import duties), percent of GDP (OECD heading 5000).",
            "constraints": {
              "minimum": -1
            }
          },
          {
            "name": "other",
            "type": "number",
            "description": "Other taxes, percent of GDP (OECD heading 6000). Can be slightly negative where refunds exceed receipts (Armenia 2018).",
            "constraints": {
              "minimum": -1
            }
          }
        ],
        "primaryKey": [
          "group",
          "year"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "tax-to-gdp-since-1990",
      "title": "Tax revenue as a share of GDP since 1990",
      "description": "Total tax revenue of the general government as a percentage of GDP, as OECD averages it. The OECD average rose from 31% in 1990 to 34% in 2024. Latin America and the Caribbean climbed from 15% to 22%; Africa, published from 2013, is at 16%.",
      "resourceName": "regional-averages",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 50,
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": "d",
          "grid": true,
          "domain": [
            0,
            40
          ],
          "label": "% of GDP"
        },
        "marks": [
          {
            "type": "areaY",
            "x": "year",
            "y": "total_tax",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "filter": {
              "field": "group",
              "eq": "OECD average"
            },
            "tip": false
          },
          {
            "type": "line",
            "x": "year",
            "y": "total_tax",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": {
              "field": "group",
              "eq": "Latin America and the Caribbean average"
            }
          },
          {
            "type": "line",
            "x": "year",
            "y": "total_tax",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": {
              "field": "group",
              "eq": "Africa average"
            }
          },
          {
            "type": "line",
            "x": "year",
            "y": "total_tax",
            "stroke": "#111827",
            "sort": "year",
            "filter": {
              "field": "group",
              "eq": "OECD average"
            }
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "total_tax": 34.063,
                "label": "OECD average: 34%"
              }
            ],
            "x": "year",
            "y": "total_tax",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "total_tax": 21.725,
                "label": "Latin America: 22%"
              }
            ],
            "x": "year",
            "y": "total_tax",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "total_tax": 15.815,
                "label": "Africa: 16%"
              }
            ],
            "x": "year",
            "y": "total_tax",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "lowest-tax-countries",
      "title": "Countries that collect the least tax",
      "description": "Countries whose tax revenue is 12% of GDP or less in their latest year (2024 or 2025). Somalia is lowest at 3%, then Angola, Bangladesh and Equatorial Guinea at 6 to 7%. Denmark, the highest, collects 45%.",
      "resourceName": "latest",
      "specType": "plot",
      "spec": {
        "height": 420,
        "marginLeft": 170,
        "x": {
          "tickFormat": "d",
          "domain": [
            0,
            14
          ],
          "label": "Tax revenue, % of GDP"
        },
        "y": {
          "grid": false
        },
        "marks": [
          {
            "type": "barX",
            "x": "total_tax",
            "y": "country",
            "fill": "#111827",
            "sort": "total_tax",
            "filter": {
              "field": "total_tax",
              "lte": 12
            }
          }
        ]
      }
    }
  ]
}
