Atul Iwale · Project 14 · Real data · NLP and LLMs

Construction Safety Intelligence

Reads the free-text narrative of a construction injury report and codes its cause, the way an OSHA coder would. Trained and tested on real OSHA severe injury reports from US construction sites, January 2015 to November 2025: amputations, hospitalisations and eye losses.

Real public data: OSHA Severe Injury ReportsTF-IDF + logistic regression (in this app)Compared with Naive Bayes, SVM, 1D-CNN, BiLSTM, OpenAI LLMTime split: train 2015–2022, test 2024–2025

Notebook 1: cleaning and exploration · Notebook 2: models · Notebook 3: LLM · Source code · README

Code an incident report

Pick a real 2024–2025 report the model never saw in training, or type your own. The model runs in your browser; nothing is sent anywhere.

Where serious injuries come from

All construction reports with a known cause, 2015 to November 2025.

Reports by cause

Share of reports with an amputation

Falls are the most frequent severe injury, but caught-in and crushing accidents are the amputation hazard: fingers and hands in machinery or between loads.

Hazard mix by trade (% of each trade's reports)

How the models compare

Accuracy and macro-F1 on the 2024–2025 reports, which no model saw during training or tuning. Macro-F1 weighs all nine causes equally, so rare causes such as fire count as much as falls.

A real-data lesson: OSHA changed its coding manual

In January 2024 OSHA's coders started using new event titles. The most common "caught in" title stopped in December 2023, and the same kind of accident is now often coded differently. The model was trained on the old manual and tested on the new one.

Cause shares by year

F1 by cause: 2023 vs 2024–2025

The biggest drops are in caught-in and struck-by, the groups whose codes were redrawn. Retraining with a year of new-manual reports did not recover it, so it is reported as a known limit.

How it works

  • 19,021 construction reports (NAICS 23) out of 105,996 across all industries. Employer names, addresses and coordinates removed.
  • 348 inconsistent OSHA event codes grouped into nine causes using the event titles; 381 reports with no usable cause left out.
  • TF-IDF turns each narrative into word and two-word-phrase weights; logistic regression learns a weight per phrase per cause, tuned on 2023.
  • Highlighted words show each phrase's contribution to the predicted cause, straight from the model's weights.
  • The browser runs the same model as Python and checks itself against Python's answers on load.

Honest limits

  • OSHA's codes are the "truth" here, but they are human judgements, and the 2024 manual change moved the line between caught-in and struck-by.
  • Severe injuries only (amputation, hospitalisation, eye loss) from states under federal OSHA. Minor injuries and state-plan states are not in the data.
  • US reports in US English. A contractor in India or the UK would need to test it on their own incident reports.
  • An aid for consistent coding and trend reporting, not a replacement for incident investigation.