Technical writing
CDC WISQARS: The Federal Injury and Violence Mortality Database Behind Public Health Research
Every year, roughly 230,000 Americans die from unintentional injuries, 49,000 die by suicide, 24,000 are killed by homicide, and 109,000 die of drug overdoses—figures that dwarf many conditions that receive far more public attention. The federal infrastructure that produces, maintains, and makes queryable this entire landscape of injury and violence mortality is the CDC's Web-based Injury Statistics Query and Reporting System: WISQARS. It is the primary data source behind virtually every academic paper on gun violence, suicide prevention, overdose epidemiology, and trauma policy published in the United States.
What WISQARS Is
The Web-based Injury Statistics Query and Reporting System (WISQARS) is the Centers for Disease Control and Prevention's public-facing query and data access tool for injury-related deaths, hospitalizations, and emergency department visits in the United States. It is maintained by the CDC's National Center for Injury Prevention and Control (NCIPC) and draws on two distinct data pipelines depending on whether the injury was fatal or nonfatal.
For fatal injuries, WISQARS uses death certificate data from the National Center for Health Statistics (NCHS) National Vital Statistics System (NVSS)—the same underlying source as CDC WONDER mortality data. Each death certificate submitted to a state vital records office is coded with ICD-10 underlying cause of death, and WISQARS applies a secondary filter to the external cause codes (the V, W, X, Y series of ICD-10) to classify injury deaths by mechanism: firearm, motor vehicle, fall, poisoning, drowning, suffocation, and so forth. Published fatal injury data extends back to 1981, making WISQARS the longest continuous federal time series for injury mortality. For nonfatal injuries, WISQARS uses the National Electronic Injury Surveillance System—All Injury Program (NEISS-AIP), a probability sample of hospital emergency departments that produces national estimates of ED visit counts stratified by injury mechanism and body region.
The interactive WISQARS query tool at cdc.gov/wisqars allows users to select an injury cause category, a year range, a geographic level (national, state, or in some datasets county), and demographic filters including age group, sex, and race and ethnicity. Output can be returned as a raw death count, an age-adjusted rate per 100,000 population, or years of potential life lost (YPLL)—a metric that weights deaths at younger ages more heavily and is often used to measure the economic burden of injury. Results are exportable as CSV. The WISQARS API at wisqars.cdc.gov/api provides programmatic JSON access to the same underlying data.
Fatal Injury Leading Causes
The 2022 final NVSS data, the most recent fully coded year as of publication, illustrates the full landscape of fatal injury in the United States. Unintentional injury is the leading cause of death for every age group between 1 and 44, producing approximately 230,000 deaths per year—more than diabetes, stroke, or Alzheimer's disease. Within unintentional injury, drug poisoning (overwhelmingly drug overdose) dominates.
Drug overdose accounted for approximately 109,680 deaths in 2022, the vast majority coded as unintentional (X40–X44) with a minority coded as suicide by poisoning (X60–X64) or undetermined intent (Y10–Y14). Motor vehicle traffic crashes killed approximately 46,000 people, including roughly 7,500 pedestrians and 6,000 motorcyclists. Falls killed approximately 44,000—a number concentrated almost entirely in adults over 65, where hip fractures and traumatic brain injuries from ground-level falls account for the majority of deaths. Drowning, fire and burn injuries, and suffocation account for most of the remaining unintentional injury deaths.
Intentional injury mortality is dominated by two categories with very different demographic profiles. Suicide produced approximately 49,000 deaths in 2022, the highest annual total in recorded US history. Firearms accounted for approximately 55 percent of suicide deaths, suffocation (predominantly hanging) for 27 percent, and poisoning for approximately 9 percent. The age distribution of suicide peaks in middle-aged adults (45–64) and among older men, while rates among adolescents and young adults have risen substantially over the past decade. Homicide produced approximately 24,000 deaths, with firearms accounting for approximately 79 percent—the highest firearm fraction among all injury intents. Knives accounted for roughly 9 percent of homicide deaths. The homicide death rate is highest by far among young Black men ages 15 to 34, reflecting the geographic concentration of firearm homicide in urban areas with high poverty and disinvestment.
The total firearm death count in 2022—combining all intents—was approximately 48,204, or 14.6 deaths per 100,000 population. Suicide accounted for roughly 54 percent of all firearm deaths (approximately 26,000), homicide for 43 percent (approximately 20,700), unintentional for about 2 percent, and undetermined intent for the remainder. The common conflation of “gun violence” with homicide alone substantially mischaracterizes the epidemiology: firearm suicide outnumbers firearm homicide in every year of the WISQARS record and in most US states.
ICD-10 External Cause Coding
Understanding WISQARS data requires understanding how ICD-10 structures injury classification. Every death coded under ICD-10 receives an underlying cause of death code from one of two injury axes: the nature of the injury (what body part or system was damaged, S and T series codes) and the external cause (how the injury happened, V through Y series codes). WISQARS uses the external cause axis for all injury classification.
The external cause block divides injury deaths by intent. Unintentional injuries occupy codes V01 through X59, covering transport accidents (V01–V99), falls (W00–W19), drowning (W65–W74), exposure to mechanical forces (W20–W64, including W54 for bitten or struck by dog), and poisoning (X40–X49). Intentional self-harm occupies X60 through X84, with specific mechanism subcodes: X72 (intentional self-harm by handgun discharge), X73 (by rifle, shotgun, and larger firearm), X74 (by other and unspecified firearm). Assault deaths occupy X85 through Y09, including X93 (assault by handgun), X94 (by rifle or shotgun), X95 (by other and unspecified firearm), and X99 (assault by sharp object). Undetermined intent deaths—where a medical examiner or coroner could not determine whether the death was accidental or intentional— occupy Y10 through Y34 and use parallel mechanism subcodes (Y22–Y24 for firearms of undetermined intent). Legal intervention and war deaths occupy Y35 and Y36.
WISQARS uses the external cause code to classify injuries into the mechanism categories displayed in its query interface: firearm, cut or pierce, motor vehicle traffic, poisoning, fall, fire or burn, drowning, struck by or against, suffocation, other transport, other specified, and unspecified. The firearm category aggregates W32–W34 (unintentional), X72–X74 (suicide), X93–X95 (homicide), and Y22–Y24 (undetermined) regardless of intent unless the user specifies an intent filter. This aggregation across the intent axis is the defining feature of WISQARS that distinguishes it from WONDER-based analysis, which requires users to build intent-specific queries manually.
The motorcycle accident code group (V20–V29) illustrates transport coding: each V20–V29 code specifies the rider's position (driver, passenger, unspecified) and the collision type (with pedestrian, pedal cycle, car, bus, heavy transport vehicle, other nonmotor vehicle, other and unspecified). The specificity of the V series allows WISQARS to break out motorcyclist deaths distinctly from car occupant deaths and pedestrian deaths, which appear in V01–V09.
Firearm Violence Data
WISQARS provides the most comprehensive publicly available federal data on firearm deaths in the United States, and it is the data source behind the vast majority of academic gun violence research published in journals like JAMA, the New England Journal of Medicine, the American Journal of Public Health, and Injury Epidemiology. The query interface allows stratification by state, year, five-year age group, sex, and race and ethnicity, producing the empirical foundation for policy analysis on firearm suicide, homicide, and unintentional death.
Geographic variation in firearm death rates is extreme. Mississippi, Louisiana, and Wyoming consistently rank among the states with the highest total firearm death rates, in the range of 28 to 30 deaths per 100,000 population. Massachusetts, New York, and Rhode Island consistently rank among the lowest, in the range of 3 to 5 per 100,000. This roughly six-to-one ratio between high and low states is among the widest geographic variances of any major cause of death in the United States, and it has been stable across decades of WISQARS data.
The geographic pattern differs dramatically by intent, and this distinction is analytically critical. Firearm suicide rates are highest in rural Mountain West and Plains states— Wyoming, Montana, Alaska, Idaho, New Mexico, Nevada—where household gun ownership rates are highest and where social isolation, geographic remoteness from mental health services, and the lethality of the predominant method (firearms have a case fatality rate of approximately 85 percent for suicide attempts, compared to 5 percent for overdose attempts) combine to produce elevated suicide rates. Firearm homicide rates, by contrast, are highest in Southern states—Mississippi, Louisiana, Alabama, South Carolina, Missouri—and in the District of Columbia, where concentrated urban poverty, high rates of illegal gun trafficking, and limited economic opportunity drive violence. Wyoming has a very high firearm suicide rate and a very low firearm homicide rate. DC has a very high firearm homicide rate and a much lower firearm suicide rate. States with the highest total firearm death rates in WISQARS often achieve that ranking through a combination of both elevations, but the drivers are epidemiologically distinct.
Demographic concentration is equally pronounced. Firearm homicide disproportionately affects Black men ages 15 to 34. The WISQARS data consistently shows that Black men in this age group die of firearm homicide at rates approximately ten times higher than white men of the same age. This disparity has been largely stable across the WISQARS historical record and represents the largest racial disparity in cause-specific mortality in the United States. The absolute number of firearm homicide deaths in Black communities is a relatively small fraction of total US mortality but represents a catastrophic burden of premature death concentrated in a specific demographic and geographic population. Firearm suicide, by contrast, disproportionately affects older white men and, in rural areas, American Indian and Alaska Native populations.
Nonfatal Injury: NEISS and NEISS-AIP
Fatal injuries are only one dimension of the injury burden captured by WISQARS. Nonfatal injuries produce an order of magnitude more events than fatal ones: approximately 40 million emergency department visits and approximately 3 million hospitalizations per year are attributed to injuries in WISQARS nonfatal data. The nonfatal surveillance infrastructure is entirely different from the death certificate system used for fatal data.
The National Electronic Injury Surveillance System (NEISS) is operated by the Consumer Product Safety Commission (CPSC) to monitor injuries associated with consumer products. NEISS maintains a probability sample of approximately 100 hospital emergency departments selected to be nationally representative by geography, hospital size, and rural versus urban location. Each participating hospital employs trained coders who review ED records daily and code injury events by consumer product involved. The CPSC uses this sample to produce national estimates of product-associated injury ED visit rates.
The CDC adapted the NEISS infrastructure for broader injury surveillance through the NEISS—All Injury Program (NEISS-AIP), which uses the same hospital sample but codes all injury-related ED visits regardless of consumer product involvement. NEISS-AIP uses a parallel coding scheme based on the mechanism, body region affected, and primary diagnosis, which allows WISQARS to report nonfatal injury ED visit estimates stratified by the same injury mechanism categories (falls, motor vehicle, struck by, firearm, cut or pierce) used in the fatal data. Because NEISS-AIP uses a probability sample, all national estimates carry confidence intervals that reflect sampling variability; estimates for small cells—rare mechanisms in specific demographic groups— can have very wide confidence intervals and should be interpreted with caution.
The nonfatal injury distribution differs substantially from the fatal distribution. Falls are the leading mechanism for nonfatal ED visits (approximately 10 million per year) but are much more heavily concentrated in children under 5 and adults over 65 than the fatal fall data suggests. Sports and recreational injuries account for a much larger fraction of nonfatal ED visits than of deaths, as these injuries (sprains, fractures, concussions) rarely result in death but generate high treatment volumes. Motor vehicle crashes produce fewer nonfatal ED visits per event than falls (because motor vehicle crashes are fewer in absolute number) but a much higher fatality rate per crash. Firearm nonfatal injuries produce approximately 85,000 to 100,000 ED visits per year, meaning that for every person killed by a firearm in the United States, roughly two more are treated for nonfatal firearm injuries in emergency departments.
Suicide Data and Mental Health Policy
The 2022 suicide total of approximately 49,000 deaths represents the highest annual count ever recorded in the United States, continuing a trend of rising absolute counts that began around 2000 even as age-adjusted rates have fluctuated. The age-adjusted suicide rate peaked in 2018 at approximately 14.2 per 100,000, declined during 2019 and 2020 (a pattern that has been observed in other countries during the COVID-19 period and attributed to crisis-related social cohesion), and has since partially rebounded.
The WISQARS suicide data reveals important method and geographic patterns that directly shape intervention strategy. Firearm suicide rates are highest in rural states with high household gun ownership—Wyoming, Montana, Alaska, Idaho, Colorado, Nevada, New Mexico—while poisoning and suffocation suicide rates are more evenly distributed geographically. This pattern is relevant to means restriction as a suicide prevention strategy: the evidence base from international natural experiments (the UK coal gas detoxification in the 1960s, pesticide restrictions in Sri Lanka and Bangladesh, bridge barriers in multiple countries) consistently shows that restricting access to a highly lethal method reduces suicide rates without equivalent substitution to alternative methods. Firearm-specific means restriction measures—cable lock distribution programs, secure storage requirements, background checks on private sales, extreme risk protection order (ERPO or “red flag”) laws that temporarily remove firearms from individuals in crisis—have been associated with reductions in firearm suicide rates in multiple state-level studies that use WISQARS as their primary data source.
The 988 Suicide and Crisis Lifeline, launched in July 2022 as a replacement for the ten-digit National Suicide Prevention Lifeline number, represents the most significant expansion of crisis intervention infrastructure in decades. WISQARS state-level suicide data is used to target outreach and crisis center capacity expansion, as states with higher suicide rates are prioritized for infrastructure investment under SAMHSA funding formulas. The Zero Suicide initiative—adopted by a growing number of hospital systems and behavioral health organizations—uses WISQARS county-level data to benchmark local suicide rates against national and regional averages and to set outcome targets for system-level quality improvement. WISQARS data is also used to evaluate the population-level impact of these interventions over time, providing the pre-post comparison baseline.
Drug Overdose in Detail
The 109,680 drug overdose deaths recorded in 2022 reflect the third and most lethal phase of the opioid epidemic, driven by illicit fentanyl and other synthetic opioids that have displaced heroin in most US drug markets. Synthetic opioids (ICD-10 multiple cause code T40.4) accounted for approximately 73,800 of these deaths—a figure that has grown essentially linearly since 2013 when illicit fentanyl first began appearing systematically in the drug supply.
Epidemiologists have characterized the opioid epidemic in three overlapping waves. Wave 1 (beginning late 1990s) was driven by prescription opioids—oxycodone, hydrocodone, morphine—coded T40.2 in the multiple cause field, concentrated in Appalachian and rural communities with high rates of physical labor and limited treatment access. Wave 2 (beginning approximately 2010) was driven by heroin (T40.1), as prescription opioid supplies tightened and dependent individuals shifted to cheaper street alternatives. Wave 3 (beginning approximately 2013) is driven by illicit fentanyl (T40.4), which is approximately 100 times more potent than morphine by weight and has penetrated essentially every US drug market including stimulant supplies. The heroin death count (T40.1), which peaked around 2017 at roughly 15,000, has declined to approximately 9,173 in 2022 as illicit fentanyl has substituted for it in the drug supply.
Stimulant deaths (methamphetamine and cocaine, T43.6 and T40.5) accounted for approximately 32,537 deaths in 2022, but the majority of these deaths now involve concurrent fentanyl exposure rather than stimulants alone. Prescription opioids (T40.2) accounted for approximately 14,716 deaths—still far above pre-epidemic baseline but declining as prescribing volumes have fallen under regulatory pressure and reformulation of high-abuse-potential formulations. The polydrug nature of modern overdose deaths—where a single death certificate carries T40.4 alongside T40.5, T43.6, or benzodiazepine codes—complicates the attribution of individual deaths to specific substances but reflects the contaminated supply chain reality: fentanyl is now present in cocaine, methamphetamine, counterfeit pills, and other non-opioid drug supplies, creating overdose risk in populations without opioid tolerance.
Policy responses captured or evaluated through WISQARS data include naloxone distribution programs (tracked against the nonfatal reversal rate), harm reduction infrastructure including syringe services programs (associated with reduced bloodborne disease transmission and some evidence of overdose reduction), DEA fentanyl seizure programs (whose population-level impact on overdose mortality has been difficult to isolate in the WISQARS time series), and medication-assisted treatment (buprenorphine, methadone, naltrexone) expansion under the federal DATA 2000 Act and its successor legislation. The WISQARS time series provides the before-after framework for evaluating state-level policy changes, though causal identification is complicated by the simultaneous spread of illicit fentanyl across all US markets.
Data Access
WISQARS provides several pathways for accessing fatal and nonfatal injury data. The primary interactive interface at cdc.gov/wisqars allows point-and-click query construction: select an injury category (fatal or nonfatal), an intent (all intents, unintentional, suicide, homicide, legal intervention, undetermined), a cause (falls, firearm, motor vehicle, poisoning, and so on), a year range from 1981 to the most recent finalized year, a geographic level (national or state for most queries), age and sex filters, and race and ethnicity filters. The system returns a formatted table with death counts, population denominators, crude rates, and age-adjusted rates. CSV export is available for all outputs.
The WISQARS API at wisqars.cdc.gov/api provides JSON-format programmatic access to the same fatal injury data, enabling integration with data pipelines and reproducible analysis scripts. The API documentation describes endpoint parameters for intent, mechanism, year, state, age group, sex, and race filters. For users who need the underlying death certificate records rather than pre-aggregated query results, CDC WONDER (wonder.cdc.gov) provides the full Multiple Cause of Death dataset from 1999 onward with flexible cross-tabulation by any combination of ICD-10 underlying cause, multiple cause codes, geography, and demographics. WONDER is the appropriate tool for ICD-10 code-specific analysis, such as isolating deaths coded specifically X93 (assault by handgun) versus X94 (assault by rifle or shotgun), which WISQARS does not expose at that granularity.
The National Violent Death Reporting System (NVDRS) provides substantially richer case-level data for a subset of injury deaths. NVDRS collects case-level data on violent deaths—suicide, homicide, unintentional firearm deaths, legal intervention deaths, and deaths of undetermined intent—from all 50 states and DC, linking data from three sources for each death: the death certificate, the coroner or medical examiner report, and law enforcement incident reports. This linkage allows NVDRS to capture circumstance information not available in the death certificate alone: relationship between perpetrator and victim, precipitating circumstances (job loss, recent relationship breakup, substance use at time of death, prior mental health diagnosis), weapon type at a more granular level than ICD-10 allows, and toxicology findings. NVDRS is available to researchers through the restricted-use data portal at CDC's Secure Access Management Services (SAMS) platform, with a public-use data file available through the CDC Open Data portal with geographic identifiers suppressed below the state level. NVDRS is more detailed than WISQARS but less timely; data typically lags finalization by 18 to 24 months rather than the 12-month lag of the NVSS-based WISQARS fatal data.
Python: Firearm Death Rates by State and Correlation with Gun Ownership
The following script demonstrates how to access WISQARS fatal injury data programmatically via the wisqars.cdc.gov API for 2022, retrieve total firearm death rates, firearm suicide rates, and firearm homicide rates by state, compute Pearson correlations between state-level gun ownership rates (approximated using the Siegel et al. firearm suicide fraction proxy) and each firearm death rate, and identify the ten states with highest firearm suicide rates and the ten with highest firearm homicide rates—illustrating their distinct and largely non-overlapping geographic distributions.
import requests
import pandas as pd
import numpy as np
# ---------------------------------------------------------------
# CDC WISQARS / WONDER: Firearm death rates by state, 2022
# Source: CDC WONDER Multiple Cause of Death, 2022 final data
# Underlying cause: X72-X74 (firearm suicide), X93-X95 (firearm homicide),
# W32-W34 (unintentional firearm), Y22-Y24 (undetermined firearm intent)
# ---------------------------------------------------------------
# NOTE: WONDER requires browser-based query for full demographic breakdown.
# For programmatic access, use the CDC WONDER XML batch API:
# POST https://wonder.cdc.gov/controller/datarequest/D76
# with an XML request body specifying the ICD-10 cause filters.
#
# Alternatively, the CDC WISQARS Fatal Injury Data is available via
# the CDC Open Data portal at data.cdc.gov for some query types.
# The example below uses the Socrata API for the CDC Wide-ranging Online
# Data for Epidemiologic Research (WONDER) underlying cause of death data.
# For this example we use the CDC WONDER underlying cause of death API.
# Dataset D76 = Multiple Cause of Death 1999-2022.
# We filter by ICD-10 external cause groups for firearm deaths:
# W32-W34 (unintentional firearm), X72-X74 (intentional self-harm firearm),
# X93-X95 (assault firearm), Y22-Y24 (undetermined firearm)
WONDER_FIREARM_ICD10 = [
# Firearm suicide
"X72", "X73", "X74",
# Firearm homicide
"X93", "X94", "X95",
# Unintentional firearm
"W32", "W33", "W34",
# Undetermined intent firearm
"Y22", "Y23", "Y24",
]
FIREARM_SUICIDE_CODES = {"X72", "X73", "X74"}
FIREARM_HOMICIDE_CODES = {"X93", "X94", "X95"}
FIREARM_UNINT_CODES = {"W32", "W33", "W34"}
# ---------------------------------------------------------------
# Since WONDER does not expose a simple REST GET endpoint,
# we simulate the workflow using a pre-downloaded WONDER export
# (tab-delimited text) loaded from disk, or from data.cdc.gov.
#
# The CDC WISQARS API at https://wisqars.cdc.gov/api/ provides
# JSON endpoints. Example: fatal injury counts by state, year, cause.
# ---------------------------------------------------------------
WISQARS_BASE = "https://wisqars.cdc.gov/api/fatal/data"
# Build request payload for WISQARS fatal injury API
# intent: 0=all, 1=unintentional, 2=suicide, 3=homicide, 4=undetermined, 5=legal intervention
# mechanism: 11=firearm (varies by API version; verify at wisqars.cdc.gov/api/docs)
def fetch_firearm_deaths_by_state(year: int, intent_code: int) -> pd.DataFrame:
"""
Fetch WISQARS firearm fatality counts and crude rates by state for a given
year and intent. Returns a DataFrame with columns: state, deaths, population, rate.
intent_code: 2=suicide, 3=homicide, 0=all intents
"""
params = {
"year1": year,
"year2": year,
"intent": intent_code,
"mechanism": 11, # firearm
"groupby": "state",
"ageGroup": 0, # all ages
"sex": 0, # both sexes
"race": 0, # all races
}
resp = requests.get(WISQARS_BASE, params=params, timeout=60)
resp.raise_for_status()
data = resp.json()
rows = data.get("data", data.get("results", []))
df = pd.DataFrame(rows)
return df
# Fetch total firearm deaths (all intents), firearm suicide, firearm homicide
print("Fetching 2022 firearm death data from WISQARS...")
df_all = fetch_firearm_deaths_by_state(2022, intent_code=0)
df_suicide = fetch_firearm_deaths_by_state(2022, intent_code=2)
df_homicide = fetch_firearm_deaths_by_state(2022, intent_code=3)
# Standardize column names (WISQARS API may vary — adjust as needed)
# Typical columns: state_abbr, state_name, deaths, population, crude_rate
for df, label in [(df_all, "total"), (df_suicide, "suicide"), (df_homicide, "homicide")]:
df.rename(columns={
"state_abbr": "state",
"deaths": f"deaths_{label}",
"crude_rate": f"rate_{label}",
"population": "population",
}, inplace=True)
# Merge into a single state-level DataFrame
merged = (
df_all[["state", "population", "deaths_total", "rate_total"]]
.merge(df_suicide[["state", "deaths_suicide", "rate_suicide"]], on="state")
.merge(df_homicide[["state", "deaths_homicide", "rate_homicide"]], on="state")
)
# ---------------------------------------------------------------
# Gun ownership proxy: Siegel et al. household gun ownership proxy
# Uses the fraction of suicides committed with firearms (FS/S ratio)
# as a validated proxy for household gun ownership rates.
# Reference: Siegel M et al., Am J Public Health 2014;104(8):1442-1449.
# FS/S = firearm suicides / all suicides; higher ratio = higher ownership.
#
# All-suicide data needed from WONDER; here we use illustrative values.
# In practice: fetch all-suicide deaths by state from WONDER D76,
# filter underlying cause X60-X84, and merge.
# ---------------------------------------------------------------
# Illustrative state-level gun ownership proxies (FS/S ratio, approximate 2022)
# Source: Siegel et al. methodology applied to WISQARS state suicide data
GUN_OWNERSHIP_PROXY = {
"AL": 0.72, "AK": 0.64, "AZ": 0.56, "AR": 0.72, "CA": 0.35,
"CO": 0.53, "CT": 0.28, "DE": 0.40, "FL": 0.52, "GA": 0.60,
"HI": 0.21, "ID": 0.68, "IL": 0.37, "IN": 0.60, "IA": 0.58,
"KS": 0.64, "KY": 0.68, "LA": 0.71, "ME": 0.56, "MD": 0.34,
"MA": 0.18, "MI": 0.54, "MN": 0.52, "MS": 0.75, "MO": 0.62,
"MT": 0.71, "NE": 0.60, "NV": 0.45, "NH": 0.44, "NJ": 0.20,
"NM": 0.52, "NY": 0.22, "NC": 0.58, "ND": 0.68, "OH": 0.51,
"OK": 0.70, "OR": 0.51, "PA": 0.49, "RI": 0.17, "SC": 0.65,
"SD": 0.72, "TN": 0.66, "TX": 0.62, "UT": 0.58, "VT": 0.55,
"VA": 0.52, "WA": 0.44, "WV": 0.68, "WI": 0.55, "WY": 0.74,
"DC": 0.09,
}
merged["gun_ownership_proxy"] = merged["state"].map(GUN_OWNERSHIP_PROXY)
merged = merged.dropna(subset=["gun_ownership_proxy"])
# ---------------------------------------------------------------
# Compute correlations between gun ownership proxy and death rates
# ---------------------------------------------------------------
corr_total = merged["gun_ownership_proxy"].corr(merged["rate_total"])
corr_suicide = merged["gun_ownership_proxy"].corr(merged["rate_suicide"])
corr_homicide = merged["gun_ownership_proxy"].corr(merged["rate_homicide"])
print(f"Correlation (gun ownership proxy vs. total firearm death rate): r = {corr_total:.3f}")
print(f"Correlation (gun ownership proxy vs. firearm suicide rate): r = {corr_suicide:.3f}")
print(f"Correlation (gun ownership proxy vs. firearm homicide rate): r = {corr_homicide:.3f}")
# ---------------------------------------------------------------
# Top 10 states by firearm SUICIDE rate
# ---------------------------------------------------------------
top10_suicide = merged.nlargest(10, "rate_suicide")[
["state", "deaths_suicide", "rate_suicide", "gun_ownership_proxy"]
].reset_index(drop=True)
top10_suicide.index += 1
print("\n--- Top 10 States: Firearm Suicide Rate (per 100,000), 2022 ---")
print(top10_suicide.to_string())
# ---------------------------------------------------------------
# Top 10 states by firearm HOMICIDE rate
# ---------------------------------------------------------------
top10_homicide = merged.nlargest(10, "rate_homicide")[
["state", "deaths_homicide", "rate_homicide", "gun_ownership_proxy"]
].reset_index(drop=True)
top10_homicide.index += 1
print("\n--- Top 10 States: Firearm Homicide Rate (per 100,000), 2022 ---")
print(top10_homicide.to_string())
# Key finding to note:
# Firearm suicide top-10 will be dominated by rural Mountain West and Plains states
# (WY, MT, AK, ID, NM, NV, UT, SD, ND, WV) with high gun ownership rates.
# Firearm homicide top-10 will be concentrated in Southern states and DC
# (MS, LA, AL, SC, MO, GA, DC, MD, AR, TN) with high urban concentration.
# These two lists have almost NO geographic overlap, illustrating that
# "gun violence" encompasses two epidemiologically distinct phenomena.
print("\n--- Summary ---")
print(f"Total firearm deaths (all intents), 2022 national estimate: 48,204")
print(f" Firearm suicide: ~26,000 (~54% of total)")
print(f" Firearm homicide: ~20,700 (~43% of total)")
print(f" Unintentional: ~1,000 (~2% of total)")
print(f" Undetermined: ~500 (~1% of total)")
print(f"National firearm death rate: 14.6 per 100,000 (2022)")
The correlation analysis will typically yield a strong positive correlation between the gun ownership proxy and firearm suicide rates (r approximately 0.80 to 0.90 across most study years)—one of the most robust findings in the gun violence epidemiology literature and the foundation for the population-level argument for means restriction as a suicide prevention strategy. The correlation between the gun ownership proxy and firearm homicide rates is typically weaker and sometimes negative at the state level (r approximately −0.10 to 0.30), reflecting the fact that firearm homicide is driven more by urban socioeconomic conditions than by household gun ownership rates. The top-10 suicide states will be dominated by rural Mountain West and Plains states; the top-10 homicide states will be dominated by Southern states and the District of Columbia, with almost no overlap between the two lists.
For the NIST National Vulnerability Database covering 250,000+ CVE entries with CVSS severity scores, CWE weakness classifications, and CISA KEV confirmed-exploited vulnerabilities, including the NVD REST API and a Python walkthrough for Critical CVE analysis in 2024, see NIST NVD: The National Vulnerability Database Behind CVE Scoring and Cybersecurity Compliance (2026-11-23).
For the CDC NNDSS infectious disease surveillance system that complements WISQARS injury data with weekly notifiable disease case reports, including STI trends, influenza surveillance, and a Python walkthrough for Lyme disease temporal analysis, see CDC NNDSS: The National Notifiable Disease Surveillance System Behind Weekly US Epidemic Tracking (2026-11-16).
For the SEC Form D private placement database tracking exempt securities offerings by venture capital, private equity, and hedge funds, including EDGAR access and Python analysis of Regulation D filing trends, see SEC Form D: The Private Placement Database Behind $2 Trillion in Annual Exempt Offerings (2026-11-15).