{
  "name": "homicide-rates",
  "title": "Homicide Rates by Country",
  "description": "Intentional homicide victims per 100,000 people by country and year, with counts and the male-female split. El Salvador's rate fell from 108 in 2015 to 3.3 in 2024, below the US's 5.8 in 2023.",
  "status": "monitored",
  "keywords": [
    "homicide rate",
    "murder rate",
    "homicide rate by country",
    "intentional homicide",
    "murders per 100,000 people",
    "murder rate by country",
    "homicide victims",
    "violent crime statistics",
    "homicide by sex",
    "UNODC"
  ],
  "licenses": [
    {
      "name": "United Nations Terms of Use (UNODC Legal Notice)",
      "title": "\"The United Nations grants permission to Users to visit the Site and to download and copy the information, documents and materials (collectively, \"Materials\") from the Site for the User's personal, non-commercial use, without any right to resell or redistribute them or to compile or create derivative works therefrom, subject to the terms and conditions outlined below, and also subject to more specific restrictions that may apply to specific Material within this Site.\"",
      "path": "https://www.unodc.org/unodc/legal.html"
    }
  ],
  "sources": [
    {
      "title": "United Nations Office on Drugs and Crime (UNODC), Data Portal: Victims of intentional homicide",
      "path": "https://data.unodc.org/datareport/hom-victim"
    },
    {
      "title": "UNODC Data Portal open API for the report (JSON or CSV, no key)",
      "path": "https://data.unodc.org/api/dataset/v1/reports/hom-victim/data"
    },
    {
      "title": "UNODC Data Portal metadata: Intentional Homicide (definitions, estimation, source codes)",
      "path": "https://data.unodc.org/sites/dataportal.unodc.org/files/2026-07/metadata_intentional_homicide.pdf"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "annual",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "path": "data/homicide-rates.csv",
      "name": "victims-by-country-year",
      "title": "Intentional homicide victims by country and year: counts and rate per 100,000",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country",
            "type": "string",
            "description": "Country or territory name as UNODC writes it (e.g. 'Bolivia (Plurinational State of)'). The United Kingdom appears as three rows of parts (England and Wales, Northern Ireland, Scotland) and Iraq as two (Central Iraq, Kurdistan Region); there is no row for the whole UK or whole Iraq."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code. UNODC's own codes for the sub-national parts: GBR_E_W, GBR_NI, GBR_S, IRQ_C, IRQ_KRI; CHA for the Channel Islands; XKX for Kosovo."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Calendar year, 2003 to 2024.",
            "constraints": {
              "minimum": 2003
            }
          },
          {
            "name": "victims_total",
            "type": "number",
            "description": "Victims of intentional homicide, both sexes: the count UNODC holds. Blank where UNODC has no figure. Almost always a whole number; a few counts are UNODC estimates with decimals."
          },
          {
            "name": "rate_total",
            "type": "number",
            "description": "Victims per 100,000 of the whole population, both sexes (UNODC computes it; World Population Prospects 2024 population). Blank where UNODC has no figure.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "victims_female",
            "type": "number",
            "description": "Female victims. Blank where UNODC has no figure by sex."
          },
          {
            "name": "rate_female",
            "type": "number",
            "description": "Female victims per 100,000 females.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "victims_male",
            "type": "number",
            "description": "Male victims. Blank where UNODC has no figure by sex."
          },
          {
            "name": "rate_male",
            "type": "number",
            "description": "Male victims per 100,000 males.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "source",
            "type": "string",
            "description": "UNODC's source code for the figure, as the portal gives it (e.g. 'CTS' = UN Survey of Crime Trends, 'NSO' = national statistical office, 'MoI' = ministry of interior, 'NP' = national police, 'MD' = medical or death registration data, 'WHO', 'PAHO', 'Eurostat', 'GSH' = UNODC Global Study on Homicide revision, 'SDG' = SDG reporting). Several codes are joined with '/'. Taken from the total-sex counts figure when present."
          }
        ],
        "primaryKey": [
          "iso3",
          "year"
        ]
      }
    },
    {
      "path": "data/countries.csv",
      "name": "countries",
      "title": "Countries and territories: UNODC region and subregion",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country",
            "type": "string",
            "description": "Country or territory name as in homicide-rates.csv."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "Code as in homicide-rates.csv."
          },
          {
            "name": "region",
            "type": "string",
            "description": "UNODC region: Africa, Americas, Asia, Europe or Oceania."
          },
          {
            "name": "subregion",
            "type": "string",
            "description": "UNODC subregion, e.g. 'Latin America and the Caribbean', 'Sub-Saharan Africa'."
          }
        ],
        "primaryKey": [
          "iso3"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "latin-america",
      "title": "Homicide rate in five Latin American countries",
      "description": "Victims per 100,000 people. El Salvador went from the world's highest rate among reporting countries, 108 in 2015, to 3.3 in 2024, below the US's 2023 rate of 5.8. Honduras fell from 83 to 24 since 2011; Ecuador's rose eightfold in five years, to 46 in 2023.",
      "resourceName": "victims-by-country-year",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "x": {
          "tickFormat": "d",
          "label": "Year"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            110
          ],
          "label": "Homicide victims per 100,000 people"
        },
        "marks": [
          {
            "type": "areaY",
            "x": "year",
            "y": "rate_total",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "tip": false,
            "filter": [
              {
                "field": "iso3",
                "eq": "SLV"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "HND"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "COL"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "MEX"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "ECU"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#111827",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "SLV"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2015,
                "value": 107.64,
                "label": "El Salvador 2015: 108"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "dx": -6,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "value": 3.3,
                "label": "El Salvador 2024: 3.3"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -28,
            "dx": -4,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2023,
                "value": 45.87,
                "label": "Ecuador 2023: 46"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "dx": 0,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "us-and-peers",
      "title": "US homicide rate against five rich countries",
      "description": "Victims per 100,000 people. The US fell from 5.8 in 2006 to 4.4 in 2014, jumped to 6.8 in 2021 and was back to 5.8 in 2023: nearly three times Canada's 2.0 and about six times Germany's or England and Wales's 0.9. Japan's is 0.2.",
      "resourceName": "victims-by-country-year",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "x": {
          "tickFormat": "d",
          "label": "Year",
          "domain": [
            2003,
            2024
          ]
        },
        "y": {
          "tickFormat": ".0f",
          "grid": true,
          "domain": [
            0,
            8
          ],
          "label": "Homicide victims per 100,000 people"
        },
        "marks": [
          {
            "type": "areaY",
            "x": "year",
            "y": "rate_total",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "tip": false,
            "filter": [
              {
                "field": "iso3",
                "eq": "USA"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "CAN"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "FRA"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "DEU"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "GBR_E_W"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "JPN"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "rate_total",
            "stroke": "#111827",
            "sort": "year",
            "filter": [
              {
                "field": "iso3",
                "eq": "USA"
              },
              {
                "field": "rate_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2021,
                "value": 6.78,
                "label": "US 2021: 6.8"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "dx": 0,
            "textAnchor": "middle"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2014,
                "value": 4.38,
                "label": "US 2014: 4.4"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": 16,
            "dx": 0,
            "textAnchor": "middle"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2023,
                "value": 2.03,
                "label": "Canada 2.0"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "dx": 0,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2023,
                "value": 0.23,
                "label": "Japan 0.2"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "dx": 0,
            "textAnchor": "end"
          }
        ]
      }
    }
  ]
}
