<p class="Els-keywords">This study employs a machine learning methodology, specifically the decision tree algorithm, in conjunction with the Quantum Geographic Information System (QGIS), to conduct a rigorous analysis of traffic accident data. The research aims to investigate various factors associated with traffic accidents, with a particular emphasis on their spatial distribution and the socio-economic determinants contributing to recurring accidents caused by drivers. The study focuses on the city of Duhok, located in the Kurdistan Region of Iraq, and utilizes a questionnaire to collect data from drivers regarding accident locations and the frequency of accidents within the past decade (from 2010 to 2020). The findings of the study reveal that the city center experiences the highest concentration of accidents, while severe collisions tend to occur in specific “black spots” scattered across the city’s road network. The decision tree model, employed to classify drivers with multiple accidents, identifies the primary causes of accidents as traffic conditions, traffic law violations, and overspeeding. Furthermore, the accident locations are found to be influenced by various factors, including different types of road hierarchy. The age and gender of drivers also contribute to accident patterns. These research findings have practical implications for enhancing road safety measures and reducing the frequency of traffic accidents. The utilization of machine learning techniques, combined with the analysis of spatial data through QGIS, provides a comprehensive understanding of the underlying factors contributing to accidents. Moreover, this research contributes novel insights to the field of road traffic accidents and safety, particularly in the context of the city of Duhok in Kurdistan Region, Iraq, and provides a valuable reference for future studies in the domain of road safety and urban planning.</p>