Fixing MSHA Accident Counts That Include Non-Injuries and Illnesses
On this page
Problem statement
MSHA's accident file is called the accident file, and most people count its rows as injuries. They are not all injuries. Each row is a report with a degree of injury, and the degrees include accidents in which nobody was hurt, occupational illnesses, injuries from natural causes such as heart attacks, injuries to people who are not employees, and "no value found". The NO_INJURIES column is not a count of injured people either. This page lists the degrees, decides which rows are injuries, shows what NO_INJURIES holds and why the current year is short, and compares the trend counted both ways.
Quick answer
Count the reports since 2000 by degree of injury:
acc = read("msha-accidents-2000-2026.txt")
acc["CAL_YR"] = acc.CAL_YR.astype(int)
print(acc.DEGREE_INJURY.value_counts().to_string())
print(f"rows since 2000: {len(acc):,}")
DEGREE_INJURY
DAYS AWAY FROM WORK ONLY 89148
NO DYS AWY FRM WRK,NO RSTR ACT 71770
DAYS RESTRICTED ACTIVITY ONLY 43655
ACCIDENT ONLY 30618
DYS AWY FRM WRK & RESTRCTD ACT 20858
OCCUPATNAL ILLNESS NOT DEG 1-6 10632
PERM TOT OR PERM PRTL DISABLTY 2491
ALL OTHER CASES (INCL 1ST AID) 2096
INJURIES DUE TO NATURAL CAUSES 1551
FATALITY 1217
NO VALUE FOUND 910
INJURIES INVOLVNG NONEMPLOYEES 575
rows since 2000: 275,521
The 275,521 reports since 2000 have twelve degrees. The commonest are injuries with days away from work, 89,148, injuries with neither days away nor restrictions, 71,770, and restricted duty only, 43,655. But 30,618 are "accident only", with no injury at all, 10,632 occupational illnesses, 1,551 injuries due to natural causes, 575 injuries to non-employees and 910 with no value. There are 1,217 fatalities.
Injuries, NO_INJURIES and the current year
1. Which rows are injuries
NOT = ["ACCIDENT ONLY", "OCCUPATNAL ILLNESS NOT DEG 1-6", "INJURIES DUE TO NATURAL CAUSES", "INJURIES INVOLVNG NONEMPLOYEES", "NO VALUE FOUND", "ALL OTHER CASES (INCL 1ST AID)"]
inj = acc[~acc.DEGREE_INJURY.isin(NOT)]
print(f"injury rows: {len(inj):,} ({len(inj) / len(acc):.1%})")
injury rows: 229,139 (83.2%)
Leaving out accidents without injury, illnesses, natural causes, non-employees, first-aid-only cases and missing values keeps 229,139 rows, 83.2% of the file. Which rows to keep depends on the question: for an injury rate, keep injuries to employees, for a workload of reports, keep everything.
2. NO_INJURIES is not a count of people
print(acc.NO_INJURIES.value_counts().head(5).to_dict())
print(acc[acc.DEGREE_INJURY == "ACCIDENT ONLY"].NO_INJURIES.value_counts().head(3).to_dict())
{'1': 242737, '0': 30628, '2': 1422, '3': 265, '4': 132}
{'0': 30617, '1': 1}
NO_INJURIES is 1 for 242,737 reports and 0 for 30,628, and only a few hundred reports have 2 or more. The zeros are the accidents without injury, 30,617 of the 30,618 "accident only" rows. Each injured person has a report of their own, so the column says whether a report involved an injury, not how many people one accident hurt; to count people, count rows.
3. The current year is short
y = acc.groupby("CAL_YR").size()
print(y.loc[2020:].to_string())
CAL_YR
2020 5391
2021 5676
2022 5980
2023 6093
2024 5991
2025 5603
2026 4477
The year 2026 has 4,477 reports to the end of October, against 5,603 for all of 2025 and between 5,980 and 6,093 a year in 2022 to 2024. Reports arrive during the year and are revised after it, so the current year is always short. Compare full years, or the same months of each year.
The injury trend, two ways
The data used on this page
The US Mine Safety and Health Administration's Open Government Data sets: the Mines file of every mine ever registered, annual employment and production by mine since 2000, and the accident reports from 2000 on (24 of their 57 columns, without the narratives), all as published on 23 October 2026, downloaded on 28 October 2026 and saved on this site, because MSHA replaces the files every week. Public domain. The files are pipe-delimited and Latin-1 encoded.
from pathlib import Path
import zipfile
import geopandas as gpd
import numpy as np
import pandas as pd
import requests
Path("data").mkdir(exist_ok=True)
# MSHA's Mines file, annual employment and production by mine since 2000 and accident reports since 2000 (24 columns,
# no narratives), all of 23 October 2026, with the Census Bureau's county estimates, counties and states. Saved
# 28 October 2026: MSHA replaces the files every week.
# Live: https://arlweb.msha.gov/OpenGovernmentData/DataSets/Mines.zip (and MinesProdYearly.zip, Accidents.zip)
ARCHIVE = "msha-mines-2026-10-28.zip"
if not Path(f"data/{ARCHIVE}").exists():
Path(f"data/{ARCHIVE}").write_bytes(requests.get(f"https://data.spatialworkflow.io/{ARCHIVE}", timeout=900).content)
Z = zipfile.ZipFile(f"data/{ARCHIVE}")
for f in ["cb_2024_us_county_20m.zip", "cb_2024_us_state_20m.zip"]:
Path(f"data/{f}").write_bytes(Z.read(f))
def read(name):
return pd.read_csv(Z.open(name), sep="|", encoding="latin-1", dtype=str, low_memory=False) # pipe-delimited, Latin-1, ids keep zeros
mines = read("Mines.txt")
for c in ["LATITUDE", "LONGITUDE", "NO_EMPLOYEES"]:
mines[c] = pd.to_numeric(mines[c], errors="coerce")
print(f"MSHA Mines file: {len(mines):,} mines; {mines.CURRENT_MINE_STATUS.value_counts().head(3).to_dict()}")
MSHA Mines file: 92,090 mines; {'Abandoned': 69608, 'Abandoned and Sealed': 8823, 'Active': 6667}
Example 1: injury trend, two ways
a = acc.groupby("CAL_YR").size(); b = inj.groupby("CAL_YR").size()
print(pd.DataFrame({"all rows": a, "injuries": b}).loc[[2000, 2010, 2020, 2025]].to_string())
print(f"change 2000-2025: all rows {a[2025] / a[2000] - 1:+.1%}, injuries {b[2025] / b[2000] - 1:+.1%}")
all rows injuries
CAL_YR
2000 18704 16029
2010 10756 8586
2020 5391 4590
2025 5603 4854
change 2000-2025: all rows -70.0%, injuries -69.7%
Counted as all rows, reports fell from 18,704 in 2000 to 5,603 in 2025, by 70.0%; counted as injuries, from 16,029 to 4,854, by 69.7%. The trend survives either way, but the levels differ by more than a sixth, and per-hour rates built on all rows overstate injury rates by as much.
Internal links
- Mine injury rates β the injury rows per hour worked
- What injures miners β the injury rows by cause
- Reading the Mines file β the mine register
- MSHA's mine data explained β the files, and getting the data without code