Abstract
Crimes in South Africa are characterized by more violent crimes, more frequent in warm seasons, and more in Gauteng Province. We propose interpretable machine learning (IML) and multiple linear regression (MLR) algorithms to quantify the determinants of crime. From 2017 to 2023, the total number of crimes decreased by 974.8 cases per quarter, but violent crimes continued to increase (694.8 cases per quarter). Meteorological factors accounted for 64% of the contribution to violent crime, greater than that of property crime (44%). Notably, air temperature and precipitation may increase violent crime by 0.41% (95% CI: 0.38%, 0.44%) and 33% (95% CI: 31%, 34%) in the warm season. PM2.5 pollution leads to a 2.1% increase in violent-related crime, indicating a marginally significant impact on human activity. South Africa’s international homicide (IH), as a severe violent crime, reached the top in 2021 worldwide. Based on the IML, per capita income plays a leading role in IH. The social cost of IH reaches USD 838.49 million, with the climate-induced factor accounting for USD 503.09 million (60%). Despite differences in the economic and climatic contexts of Chicago’s urban crime data and Mexico’s crime records, the findings remain valid, revealing universal patterns of crime and the impact of climate change. We therefore recommend that economic development, together with the mitigation of climate and environmental pollution, can effectively reduce criminal activities and thus contribute to sustainable social development.
Similar content being viewed by others
Introduction
Public safety is critical in the concept of sustainable cities (Kourtit et al. 2021). Urban crime directly affects personal security and even poses social problems, notably in South Africa (Demombynes and Özler, 2005; Grabrucker and Grimm, 2018). Even violence and crime are the second leading drivers of death in South Africa (Seedat et al. 2009). Prior studies have concluded that crime is usually attributed to some socioeconomic and meteorological factors (Corcoran and Zahnow, 2022; Skudder et al. 2017; Rotaru et al. 2022). For instance, crimes are strongly associated with economic inequality, especially in developing areas with high Gini index and unemployment rate (Manea et al. 2023; Sviatschi and Trako, 2024). Recently, South Africa’s frequent extreme weather events (floods) have further fueled social unrest due to climate change (Baninla et al. 2022). Therefore, there is an urgent need to identify the anthropogenic and meteorological contributions to the high crime rate in South Africa and promote a sustainable city linking the climate and public safety.
Socioeconomic factors are the primary determinants of crime. Traditionally, per capita income negatively correlates with crime rates (Gould et al. 2002). Poverty (mainly attributed to unemployment) and income inequality are also crucial (Lymperopoulou and Bannister, 2022), especially in areas with high agricultural employment (Enamorado et al. 2016). The Gini coefficient is a potent predictor of violent crime in countries with high economic inequality such as South Africa (Adeleye and Jamal, 2020). Inflation contributes to more crimes by reducing purchasing power and increasing financial stress (Adekoya and Abdul Razak, 2016). Unemployment affects crime through two opposing effects. One is the motivation effect, suggesting that unemployed individuals have a greater incentive to commit crimes. The other is the opportunity effect, i.e., a higher unemployment rate leads to less time spent at work and traveling, thus reducing the number of suitable targets and increasing the number of guardians (Phillips and Land, 2012). Additionally, utility gained from criminal activities can exceed that of legal activities in contexts of high unemployment and low income, thereby motivating criminal behavior (Becker, 1968). Education may lower crime rates by increasing wage rates, thereby increasing the opportunity cost of crime (Lochner, 2020).
The influence of meteorological factors on violent crime appears to be realized through economic and non-economic channels, with the non-economic channel being more critical (Blakeslee et al. 2021; Jiang et al. 2013). The routine activity theory and the heat-aggression hypothesis help to explain it (Choi et al. 2024; Cruz et al. 2023). More specifically, temperature or rainfall affects the chances of a crime by altering individual routine activity patterns, e.g., increasing outdoor activities, changing modes of transport, etc. (Blakeslee and Fishman (2013); Cruz et al. 2020). High temperatures trigger irritability and impulsivity in individuals, which in turn increases aggressive behavior and leads to more violent crime (Thomas et al. 2024). In the United States (Ranson, 2014), higher temperatures lead to more cases of violent crime, partly due to changes in alcohol consumption and time use patterns (Cohen and Gonzalez, 2024). Climate-induced crime even exhibits significant seasonality, with seasonal weather variations such as less rain and higher temperatures reducing the opportunity cost of crime (Skudder et al, 2017). Severe seasonal weather reduces agricultural productivity (Lesk et al. 2016), resulting in lower wages and higher unemployment for agricultural workers (Rotaru et al. 2022). In addition, the seasonality presented by robberies and rape offenses is associated with haze (Mares and Moffett (2016)), urban environments (Kim and Lee, 2023), wind speed (WS), wind direction (WD), and relative humidity (RH) (Shen et al. 2020).
Other potential drivers of crime may be attributed to haze pollution and mental health. Environmental pollution, such as PM2.5 pollution, is usually a long-term concern with economic development. Specifically, the influence of PM2.5 emissions on crime is not fully verified. Herrnstadt et al. (2021) conclude that air pollution increases violent crime instead of property crime in Chicago from 2001 to 2012. On the contrary, the effect of haze on crime is negative because unfavorable weather increases the discomfort of offenders, who are more likely to flee unpleasant situations (Shen et al. 2020). Additionally, some of the latest studies link crime to mental health disorders (Halle et al. 2020). Access to mental healthcare might significantly reduce the likelihood of criminality among those with mental health histories (Jácome, 2020).
Measuring the social costs of crime is crucial for maintaining public safety, crime policymaking, etc. (Picasso and Grand, 2019). Existing literature summarizes the cost of each of the following crimes to describe the range of potential social costs, e.g., USD 5 million for murder, manslaughter, etc. (Cohen et al. 2004; McCollister et al. 2010), but this is a rough estimate (Ranson, 2014). In legal cases involving personal injury, the availability of Value of Statistical Life (VSL) allows the victim’s future economic contribution, quality of life, and other factors to contribute to the amount of compensation more reasonably reflecting the value of the victim’s life (Hoffmann et al. 2017; Picasso and Cohen, 2019). Nevertheless, the assumption of constant income or consumption over a lifetime ignores real-world fluctuations (e.g., income peaks in middle age), which may underestimate the VSL for younger populations (Hammitt and Robinson (2011)). VSL has mainly been applied in developed countries, with Masterman and Viscusi (2018) calibrating the US VSL to income levels to obtain VSLs for the rest of the world. Robinson et al. (2019) adjust for income levels and expected life expectancy to obtain an adjusted value of statistical life year (VSLY).
Multiple linear regression (MLR) has been widely used to analyze environmental and anthropologic factors that can affect air quality and pollution levels (Liu and Wang, 2020). However, MLR is less efficient for big datasets due to its limited ability to handle complicated, non-linear relationships. Machine learning algorithms are effective substitutes that provide improved interpretability and performance (Backer and Billing, 2024). Specifically, interpretable machine learning (IML), such as the Shapley additive explanation (SHAP) method, has proven to be robustly interpretable in a wide range of situations. In particular, to clarify the effects of environmental factors on air quality, SHAP can be integrated with models like XGBoost (Extreme Gradient Boosting) (Wang et al. 2023; Hou et al. 2022). Therefore, the XGBoost-SHAP algorithm is applied to quantify and visualize the influence of meteorological factors on crime rates (Zhang et al. 2022).
In light of the above summary, there is a lack of quantitative research to reveal the impact of meteorological and anthropogenic factors on crime, notably climate-induced social costs. Our main contributions are quantifying the effect of climate-induced crime and its associated social cost. More specifically, this study aims to (1) quantify the meteorological and anthropogenic contributions to crime in South Africa, (2) reveal the influence of air temperature on violent crime, (3) reveal the influence of PM2.5 pollution on crime, (4) apply IML to quantify further and visualize the multiple drivers of violent crime, such as international homicide (IH), and (5) calculate the social cost of IH.
Materials and methods
Data resources
The Republic of South Africa (22°S-35°S, 17°E-33°E), located in the Southern Hemisphere, has been plagued by economic inequality. Besides, the quarterly crime statistics (2017–2023) are taken from the South Africa Police Service (SAPS). Hourly data for meteorological indexes including air temperature (°C), wind direction (degree), wind speed (m/s), precipitation (mm), and relative humidity (%) are taken from the Pretoria Airport from 1994 to 2021. The data of the Pretoria Airport can be seen on the R package named “worldmet”. The quarterly per capita GDP (rands) is taken from the Federal Reserve Bank of St. Louis. Quarterly export data (USD) can be collected from the China Entrepreneur Investment Club (CEIC). The yearly IH per 100,000 people, rate of population growth (%), unemployment rate (%), and life expectancy at birth (year) in South Africa are collected from the World Bank. Yearly PM2.5 emissions (μg/m3) for South Africa are taken from the Atmospheric Components Analysis Group of Washington University in St. Louis.
According to the SAPS, violent crimes include murder, sexual offenses, homicide, assault with the intent to inflict grievous bodily harm, common assault, common robbery, and robbery with aggravating circumstances. The violent-related crimes cover arson and malicious property damage. Property-related crimes include burglary at non-residential and residential premises, theft of motor vehicles and motorcycles, theft out of or from vehicles and motorcycles, and stock-theft. Other serious crimes include theft not mentioned elsewhere, commercial crime, and shoplifting.
Methods
Multiple linear regression
Many existing studies use MLR to quantify the meteorological and anthropogenic drivers of pollutants, namely ozone and PM2.5 pollution (Yao et al. 2024). In light of the influence of weather conditions on crime, MLR is employed to reveal the weather conditions and anthropogenic contributions to crime.
where X denotes each meteorological factor, covering relative humidity, wind direction, wind speed, air temperature, and precipitation, \(\beta\) denotes the regression coefficient, \({\beta }_{o}\) is the intercept term, ej is the residual, and j indicates each observation.
The residual in Eq. (1) is the component of the anomaly that cannot be explained by the MLR meteorological model but is defined as the anthropogenic effect of homicide. The anthropogenic-driven homicide (\({{Crime}}_{a}\)) can be expressed as Eq. (2).
where \({{Crime}}_{j}\) indicates the observed homicide and \(m\) denotes the meteorological effect.
Interpretable machine learning algorithms
Machine learning models
In this study, several machine learning models were applied to identify the impact of meteorological and anthropologic factors on criminal activities. Artificial Neural Network (ANN) has the potential to rapidly process information through massive parallel implementation, making it a promising choice for classification, clustering, and prediction tasks (Abiodun et al. 2018). Additionally, Multilayer Perceptron (MLP) is utilized as a powerful tool that applies supervised training procedures using data examples and known outputs to construct nonlinear prediction functions (Taud and Mas, 2018). Decision Trees (DT), a prevalent data mining technique for managing large datasets by segmenting them into branching structures, were utilized as the base classifier in the Gradient Boosting Machine (GBM) algorithm (Friedman, 2001). GBM build predictive models by iteratively adding weak learners (usually decision trees) and minimizing a variable loss function through gradient descent in the function space, thus improving prediction accuracy and interpretability. In each iteration, a new classifier is trained on the updated dataset, progressively reducing errors and enhancing the overall accuracy, particularly in imbalanced datasets (Sevinç, 2022). Advanced tree-based models, including the XGBoost, are selected for their efficiency in handling high-dimensional data and large-scale analysis (Chen and Guestrin, 2016). These models provide the foundation for applying the SHAP algorithm as the explainer.
Shapley additive explanation model
The SHAP algorithm can open the ‘black box’ of traditional machine learning models and improve the interpretability and accuracy of the models. As a result, SHAP is employed to reveal further the contribution of meteorological and non-meteorological factors in criminal activities. SHAP is a model-agnostic technique rooted in cooperative game theory, designed to compute an additive feature importance score for individual predictions while adhering to a set of well-defined properties (Lundberg and Lee, 2017). Moreover, tree SHAP is a variant optimized for tree-based models such as XGBoost. It can enhance the practical applicability of SHAP by efficiently calculating SHAP values and accurately capturing feature interactions, thereby offering valuable insights into both global and local model behaviors. The SHAP value of each determinant of crime cases can be expressed as Eq. (3) ~ (4).
where \({{Crime}}_{i({base})}\) is the expectancy-value of \({{Crime}}_{i}\), shap(\({x}_{i,j})\) denotes the value of the contribution of factor j to Crimei at moment i, S denotes the set of all input indexes, x includes all meteorological (wind speed, wind direction, relative humidity, air temperature and precipitation) and non-meteorological factors (per capita GDP, unemployment rate, export, education level, population growth rate, life expectancy and PM2.5 pollution) related to crime, and M is the subset of features excluding factor j.
The adjusted value of a statistical life year
The VSL is commonly used as a metric for assessing the economic cost of life. The VSL depicts variability across different countries, influenced by varying levels of social development. It represents the amount individuals are willing to pay for a marginal reduction in mortality risk. Notably, VSL does not represent the value of an individual’s life. It reflects the aggregated willingness to pay (WTP) within a population for minor reductions in mortality risk (Viscusi, 2018). Whereas the VSL estimates the monetary value of reducing the risk of death, the VSLY focuses on extending life by one year. Following the Global Fund, the VSLY can be derived for specific nations by calibrating the VSL of the United States. In converting VSL to VSLY, the remaining life expectancy is discounted to ensure consistency in the discounting of all health benefits and costs. This methodology allows the valuation of homicide deaths in relation to the remaining life expectancy associated with the counterfactual scenario of that death, that is, the length of life that individuals would have experienced had they not been victim to homicide. The adjusted VSLY can be expressed as Eq. (5) (Robinson et al. 2019).
where VSLUSA refers to the VSL for the United States (Supplementary Fig. S1), \({{GDP}}_{{it}}\) denotes the purchasing power parity (PPP)-adjusted GDP per capita for other countries, including South Africa, \({{GDP}}_{{USA}}\) denotes the PPP-adjusted GDP per capita for the USA, LE represent the life expectancy at birth, the one-half LE denotes the discounted remaining LE from middle age, i denotes different countries, and t indicates the year ranging from 2008 to 2021. Besides, e is a conservative estimate of income elasticity set at 1.5, indicating that individuals with lower income levels are willing to allocate a smaller proportion of their income for a given increment of health risk reduction.
Results
The crime patterns in South Africa
According to the SAPS, there are quarterly changes in the general crime rate from 2017 to 2023. Broadly, violent crimes are the most frequent, but violent-related offenses are the least frequent (Fig. 1C). Crime in South Africa first experienced an increase and then, after a decline during the epidemic, a rapid increase. The COVID-19 stay-at-home restrictions resulted in a sharp decrease in 2020 and 2022 (Nivette et al. 2021; Shepherd et al. 2021). The lockdown policy taken to prevent the spread of the virus requires social distancing, which also drastically reduces the incidence of criminal acts. It is worth noting that crime rates tend to be relatively high in the fourth quarter, possibly due to higher temperatures. The third quarter of 2022 reached the top, with 426,791 offenses. In comparison, the second quarter of 2020 is the minimum, with 350,519 offenses. Violent and violent-related crimes seem to have a more striking seasonality.
For the provincial distribution of crimes in South Africa in 2023, all provinces had the highest number of offenses in the fourth quarter, related to the warm season (Fig. 1B). Gauteng had the highest number of offenses, followed by KwaZulu-Natal and the Western Cape. Gauteng topped the list with 107,128 offenses in the fourth quarter. Conversely, the Northern Cape had the lowest number in the first quarter, with 10,530 offenses.
The meteorological and anthropogenic contributions to crime
Quantifying the multiple drivers of crime by MLR
According to the SAPS, the total number of crimes in South Africa experienced a decrease, with 974.8 cases per quarter from 2017 to 2023 (Table 1). The total reduction is primarily attributed to a decrease in property crime (1681.8 cases). However, violent crime shows an upward trend, with 694.8 cases. The results of regressions between crime patterns and meteorological factors are shown in Supplementary Table S1. Notably, violent crimes are strongly associated with weather conditions. MLR is committed to revealing the meteorological and anthropogenic trends of crimes in South Africa. The decomposition of total crime trends does not account for the heterogeneity between different types of crime. Specifically, meteorological conditions accounted for a higher proportion of violent crimes (64%), while human factors accounted for a higher proportion of property crimes (56%).
The influence of temperature and PM2.5 on crime
Quarterly data are applied to examine the effect of air temperature and precipitation on crime from 2017 to 2023. As they depict strong seasonality, a dummy variable (DV) is built. In the fourth and first seasons, DV is equal to 1. Otherwise, 0. For Table 2, the Poisson regression for violence-related crime performs best with the lowest AIC (Akaike Information Criterion). During the warm season, temperature and precipitation have a significant stimulating effect on crime frequency. When seasonal effects are not involved, precipitation has a non-significant effect on violent and property crime, and wind direction has a non-significant effect on violent crime. Still, all other variables are significant at the 0.1% level. The ADF (Augmented Dickey-Fuller) test is shown in Supplementary Table S2, and the model’s introduction is in the Supplementary Method A. The results show that temperature is the cause of Granger variation in crime rates.
This paper focuses on the impact of temperature and precipitation on crime during the warm season, as South Africa does not experience very high temperatures throughout the year. For every 1 °C increase in temperature during the warm season, violent crime increases by 0.41% (95% CI: 0.38%, 0.44%), violence-related crime increases by 0.40% (95% CI: 0.33%, 0.46%), but property crime decreases by 1.5% (95% CI: 1.49%, 1.56%). The impact of precipitation on crime appears to be masked by seasonality throughout the year. However, precipitation increases property, violent, and violence-related crime by 45% (95% CI: 43%, 47%), 33% (95% CI: 31%, 34%), and 9.6% (95% CI: 6.6%, 13%) in the warm season, respectively. Therefore, higher temperature and rainfall during the warm season can easily lead to flooding outbreaks, which are likely to cause social disruption. The SAPS should intensify its deployment to maintain public order and create a safe society.
South Africa suffers from slight haze pollution (Supplementary Fig. S2). For every unit increase in PM2.5 pollution, violent-related crime increases by 2.1% (95% CI: −0.2%, 4.3%). However, other crime patterns are not significantly correlated with PM2.5 emissions (see Supplementary Table S3). Since overall crime has been on a downward trend since 2014, the relationship between PM2.5 pollution, violent crime, and property crime, is not as entirely consistent as in the study by Herrnstadt et al. (2021). We can speculate that the positive relationship between property crime and pollution is relatively strong. Temperature stimulates an increase in all crime types, while the seasonal effect is primarily associated with an increase in violent crime.
The multiple drivers and social cost of homicide
The multiple drivers of homicide by data-driven models
We quantify the quarterly observed, meteorological, and anthropogenic trends of IH in South Africa from 1994-2021. Table 3 shows that meteorological conditions affect 60% of IH in South Africa (60%), while anthropogenic factors account for 40% of IH. The SHAP algorithm is further committed to quantifying the multiple drivers of homicide (Fig. 2). The evaluation metrics of ML techniques include mean average error (MAE), mean standard error (MSE), root mean standard error (RMSE), and the coefficient of determination (R2), where the R2 is the primary metric. Compared to the other five machine learning algorithms, the XGBoost technique (R² = 0.96, MSE = 3.81, MAE = 1.68, and RMSE = 1.95) performs better and is therefore used as the explainer for SHAP (Supplementary Fig. S3). The models’ parameters are illustrated in Supplementary Table S4.
Meteorological and anthropogenic factors are processed through data splitting (training set and testing set), modeled using DT, ANN, MLP, GBM, and XGBoost algorithms, interpreted by SHAP, and assessed for their contributions to crime determinants. Mental health factors are mainly explored in the Supplementary Material.
The results represent that per capita GDP plays a leading role in crime, followed by population growth rate, export, PM2.5 emissions, unemployment rate, education level, urbanization, and life expectancy (Fig. 3). Socio-economic factors contribute significantly to crime and the contribution is almost negative. IH increases as the level of urbanization increases. However, murder decreases when urbanization is too high, which may be related to income. On the contrary, the employment rate is positively associated with crime. For weather conditions, higher air temperature is the primary contributor to rising crime. Figure 3B–E illustrate partial dependent plots for significant factors affecting IH, other factors are shown in Supplementary Fig. S4.
The social cost of homicide
South Africa has the highest IH rate globally at 42 cases per 100,000 inhabitants in 2021 (Fig. 4). Other serious countries include Honduras (38.2 cases), Myanmar (28.4 cases), Mexico (28.2 cases), and Colombia (27.5 cases). The area around the Caribbean has more homicides, such as St. Lucia (39.0 cases). The IH rate of the USA is just 6.8 cases per 100,000 persons. However, the social cost of the USA reaches 6988.90 USD million, followed by Mexico (1946.13 USD million), Russia (1347.96 USD million) and South Africa (838.49 USD million).
Compared with the US, South Africa’s VSLY is much lower since its economic development varies dramatically. The VSLY of South Africa’s homicide rises from 2008 to 2021, reaching the top in 2021 (Table 4). South Africa’s IH depicts a marked downward trend, where the weather contribution is 60%, based on MLR. Consistent with the social costs of crime, weather-induced social costs have also experienced incremental growth from USD 299.02 million in 2008 to USD 503.09 million.
Robustness test
IHs in Mexico and Chicago
To demonstrate the generalizability of this paper’s MLR quantitative decomposition approach to the crime domain, this study applies the method to both Chicago as an urban case and Mexico as a national case. The three regions share similar characteristics with high population density, economic inequality, and inter-regional social unrest, which leads to crime (Campedelli et al. 2020; Demombynes and Özler, 2005). We use IHs for Mexico and Chicago from 1994 to 2021 to verify the impact of climatic factors. Table 3 illustrates that meteorological conditions affect 67% of IH in Mexico and 65% of IH in Chicago, similar to South Africa (60%), indicating the reliability of climate change effects on murder as a significant crime type. Cohen and Gonzalez (2024) find that daily temperatures are associated with changes in time use and higher alcohol consumption, triggering more crime in Mexico. Therefore, controlling alcohol consumption might reduce crime.
Evidence from Chicago
Due to the limited availability of data from South Africa and the importance of crime in urban studies, the study verifies the results from an urban perspective using the data-rich case of Chicago. The total number of crime cases in Chicago is 262,280 in 2023, where property crimes are more than violent crimes (Supplementary Fig. S6). Noticeably, there are more crimes in Chicago’s coastal and central areas (Fig. 5).
Moran’s I (Supplementary Method B) is proposed to examine the spatial autocorrelation of urban crime (Zhuo et al. 2024). The Global Moran’s I reaches 0.21 (p-value < 0.01), indicating a positive spatial correlation. We also use Local Moran’s I to develop a clustering analysis that reflects the geographical variation in crime. High-high clusters are concentrated near the eastern border and center of Chicago (Fig. 5B), and low-low clusters are located in the southwest and northwest parts. The number of crime incidents in these areas is significantly and positively correlated with the number of crime incidents in the neighboring areas, i.e., they positively impact the neighboring areas. High-low anomalies are located in the periphery of Chicago’s high-high clusters and are concentrated in relatively large numbers in the community border areas. Low-high anomalies are primarily located around low-low clusters in Chicago. The number of crimes in these squares is negatively correlated with the number of crimes in the surrounding area, indicating that they harm the surrounding area.
Chicago has more haze pollution than South Africa, presenting strong seasonality (Supplementary Fig. S7). PM2.5 concentrations are higher during the warm season and are more strongly associated with sea breezes (Supplementary Fig. S8). Poisson regression is employed to reveal the influence of PM2.5 emissions on crime at the daily level from 2014-2023. In a set of generalized linear models, we control for potential confounders such as temperature, public holidays, and year effects (Table 5). Results present that crime in Chicago is decreasing slightly. Crime rises by 0.08% (95% CI: 0.06%, 0.1%) and 0.40% (95% CI: 0.4%, 0.41%), if PM2.5 pollution and air temperature increase by one unit, respectively. Besides, the holiday effect is more significant. Crime is expected to rise by 14% (95% CI: 12%, 15%) during the holidays.
Since total crime has been on a downward trend since 2014, the relationship between PM2.5 pollution, violent crime, and property crime is not as entirely consistent as in the study by Herrnstadt et al. (2021). We can speculate that the positive relationship between property crime and pollution is relatively strong. Temperature stimulates an increase in all types of crime, while the seasonal effect has a significant impact on the frequency of violent crime. Violent crime increased by 29% during the holidays, while property crime decreased by 13%.
Explanation of heterogeneity
Differences in IHs among three regions
A Least Squares Dummy Variable (LSDV) model (Supplementary Method C) is committed to revealing the significant heterogeneity in the impact of various meteorological factors between developed areas (Chicago), developing areas (South Africa), and emerging economies (Mexico). Specifically, Chicago experiences a lower baseline IH, while Mexico has a higher baseline IH than South Africa when controlling for other factors (Table 6). This suggests that unique regional characteristics, such as economic conditions and policing strategies, influence overall crime trends (Scheider et al. 2012).
The model with interaction terms indicates that WS, AT, and RH have different effects on IH in these three regions. The marginal effect of wind speed on IH is lower in Chicago compared to South Africa, but higher in Mexico than in South Africa. This difference may be attributed to the varying urban infrastructure and social behaviors in response to weather conditions. In Chicago, stronger winds might disrupt outdoor activities more significantly than South Africa (Hart et al. 2022). Conversely, Mexico’s harmful interaction with wind speed may reflect different infrastructure and social conditions that lessen wind’s impact on crime compared to South Africa. Additionally, IH is expected to increase more in South Africa compared to Chicago when the apparent temperature or relative humidity rises. This heterogeneity may result from different social contexts, such as varying levels of heat tolerance (Ankel-Peters et al. 2023) or residents’ source of income (Algahtany et al. 2022).
Differences in nine provinces for South Africa
From the perspective of the nine provinces in South Africa, Gauteng has a much higher level of urbanization than the other provinces, based on the density of nightlights (Supplementary Fig. S9). Therefore, in the dummy variable for the level of urbanization, only Gauteng takes the value of 1. In addition, South Africa is located at a higher altitude, and we set provinces with an altitude of more than 1 km to 1, and the others to 0. The results represent that provinces with an altitude higher than 1 km have a 41% reduction in violent crime and a 52% reduction in violence-related crime compared to those with a lower altitude (Table 7). In contrast, provinces with higher levels of urbanization have 157% more and 155% more violence-related crime than other provinces.
Discussions
This study deduces that weather conditions may contribute to about 64% of violent crime in South Africa. Air temperature and precipitation are expected to increase violent crime by 0.41% (95% CI: 0.38%, 0.44%) and 33% (95% CI: 31%, 34%) during warm seasons. For every unit increase in PM2.5 pollution, violent-related crime increases by 2.1% (95% CI: −0.2%, 4.3%). The social cost of weather-induced IH is 503.09 USD million in 2021, with weather patterns accounting for 60%. Finally, urban crime data from Chicago and homicide data from Mexico support the main findings of this study and further reveal the spatial aggregation of crime and the holiday effect, thus providing guidance for crime control policy in South Africa.
Although the general crime rate in South Africa shows a downward trend (−974.8 cases per quarter), this is mainly due to a decline in property-related offenses (−1681.8 cases per quarter). Conversely, violent (694.8 cases) and violent crime-related (48.24 cases) offenses significantly increased. Based on MLR, the meteorological contribution to violent-related crime is as high as 80%, followed by violent crime (64%), other crime (47%), and property crime (44%). For meteorological factors, temperature does not strongly influence the total crime rate. Nonetheless, it significantly affects violence-related offenses and depicts a seasonal effect. During the warm season, temperature leads to a 0.40% (95% CI: 0.33%, 0.46%) increase in violent crime from 2017–2023. Precipitation results in a 33% (95% CI: 31%, 34%) increase in violent crime, and a 45% (95% CI: 43%, 47%) rise in property crime. The heat-aggression theory can explain the positive effect of temperature on crime. Nevertheless, South Africa’s precipitation defies the routine activity theory. It may be attributed to the fact that South Africa has experienced excessive precipitation and flooding in recent years, resulting in severe damage to the personal property of its citizens, thus triggering an excessive amount of property and violent crime. Provinces with high altitudes, such as Gauteng and North West Provinces, have lower temperatures, thus making their violent crime 41% lower than other provinces. For anthropogenic factors, PM2.5 pollution will increase violent-related crime by 2.1% (95% CI: −0.2%, 4.3%) from 2017–2022. Compared to the provinces, Gauteng’s high level of urbanization has resulted in 157% higher violent crime than other provinces with low levels of urbanization. Additionally, mental health disorders might be associated with crime in South Africa in 2021 (Supplementary Fig. S5).
There is limited research data for South Africa, and we apply daily crime data for Chicago from 2014 to 2023 to support our conclusions despite the economic and climatic differences between the two regions. In addition, crime is a classic ‘urban disease’, thus necessitating the selection of the city with the higher crime rate, i.e., Chicago. Significantly, Chicago’s urban crime results show that PM2.5 pollution leads to a 0.08% increase in crime, and temperature leads to a 0.40% increase in crime. More importantly, crime in Chicago presents spatial clustering and holiday effects. Governments or policymakers should prioritize areas where crime is clustered and increase the cost of crime in the altered area, thus reducing crime in that and surrounding areas and thus reducing overall crime. Additionally, security should be increased during holidays to improve public safety. These proposals provide an essential reference for the governance of crime in South Africa.
IH is a very serious violent crime and has become one of the leading causes of death in South Africa. IML is committed to revealing the multiple drivers. The results of the XGBoost-SHAP technique show that socio-economic factors are far more crucial than weather conditions. Per capita income plays a dominant role in crime, and temperature is the primary meteorological factor. Compared with the U.S., the VSLY of South Africa is much lower, since their economic development varies dramatically. The VSLY of South Africa’s homicide rose from 2008 to 2021, reaching the top in 2021. The IHs of the USA are just 6.8 cases per 100,000 persons, however, the social cost of the USA (6988.90 USD million), followed by Mexico (1946.13 USD million), Russia (1347.96 USD million) and South Africa (838.49 USD million). It is noted that the social cost of climate-induced homicide is 503.09 USD million in 2021, highlighting the importance of mitigating climate change.
This study proposes novel data models to examine climate-induced crime in developing countries and its social costs, but it still has some limitations. First, due to the inaccessibility of data from South Africa, the research corroborates the South African findings with typical cases from Mexico and Chicago, USA. However, these three regions have immense economic and climatic differences, and some of the data are inconsistent on time scales, especially the VSL. Second, the study does not fully account for potential confounding factors that could influence the observed climate–crime relationship (Supplementary Fig. S10). For instance, localized policy adaptations, such as alcohol sales restrictions in the U.S. or targeted policing strategies, could simultaneously reduce crimes (Dau et al. 2023; Jennings et al. 2014). Similarly, abrupt economic shocks, such as price shocks in natural resources, may also impact crime rates (Axbard et al. 2021). Third, there remains a possibility of reverse causality. Specifically, high crime rates often trigger population out-migration from affected areas (Kirk & Laub, 2010). This population outflow often accelerates neighborhood deterioration, leading to abandoned properties and a decline in vegetation and green spaces, which together intensify urban heat island effects (Stone et al. 2010). Future research could explore the VSL for developing areas and use more refined data to uncover causal links between climate, policy, and crime.
Conclusion
In summary, rising temperatures, extreme precipitation, and PM2.5 emissions are visible features of global climate change, positively contributing to crime, which affects up to 64% of violent crime. Combating climate change, reducing pollution alongside economic development, and reducing the income gap are essential for reducing crime and enhancing the sustainability of societies.
Data availability
The quarterly crime statistics are publicly available at the South Africa Police Service (https://www.saps.gov.za/services/crimestats.php). Air temperature, wind direction, wind speed, precipitation, and relative humidity are taken from the R package named “worldmet” (https://github.com/openair-project/worldmet). The quarterly per capita GDP is taken from the Federal Reserve Bank of St. Louis (https://fred.stlouisfed.org/series/ZAFGDPNQDSMEI). Quarterly export data can be collected from the China Entrepreneur Investment Club (Available at: https://www.ceicdata.com/en/country/south-africa). The yearly international homicide rate, population growth rate, unemployment rate, and life expectancy at birth in South Africa are collected from the World Bank (https://data.worldbank.org/country/south-africa). Yearly PM2.5 emissions for South Africa are taken from the Atmospheric Components Analysis Group of Washington University in St. Louis (https://sites.wustl.edu/acag/datasets/surface-pm2-5/).
Code availability
The codes generated in this study have been deposited in the following GitHub repository: https://github.com/KallenSivan/Crime-models-code.
References
Abiodun OI, Jantan A, Omolara AE, Dada KV, Mohamed NA, Arshad H (2018) State-of-the-art in artificial neural network applications: A survey. Heliyon 4(11). https://doi.org/10.1016/j.heliyon.2018.e00938
Adekoya AF, Abdul Razak NA (2016) Inflation, deterrence and crime: Evidence from Nigeria using bounds test approach. J Econ. Sustain Dev 7(18):23–32
Adeleye N, Jamal A (2020) Dynamic analysis of violent crime and income inequality in Africa. Int J Econ Comm Manag 8(2):1–25
Algahtany M, Kumar L, Barclay E(2022) A tested method for assessing and predicting weather-crime associations. Environ Sci Pollut Res 29:75013–75030
Ankel-Peters J, Bruederle A, Roberts G (2023) Weather and Crime—cautious evidence from South Africa. Q Open 3(1):qoac033
Axbard S, Benshaul-Tolonen A, Poulsen J (2021) Natural resource wealth and crime: The role of international price shocks and public policy. J Environ Econ Manag 110:102527
Backer D, Billing T (2024) Forecasting the prevalence of child acute malnutrition using environmental and conflict conditions as leading indicators. World Dev 176:106484
Baninla Y, et al. (2022) An overview of climate change adaptation and mitigation research in Africa. Front Clim 4. https://doi.org/10.3389/fclim.2022.976427
Becker GS (1968) Crime and punishment: An economic approach. J Polit Econ 76(2):169–217
Blakeslee D, Chaurey R, Fishman R, Malghan D, Malik S (2021) In the heat of the moment: Economic and non-economic drivers of the weather-crime relationship. J Econ Behav Organ 192:832–856
Blakeslee DS, Fishman R (2013) Rainfall shocks and property crimes in agrarian societies: Evidence from India. Available at SSRN 2208292
Campedelli GM, Favarin S, Aziani A, Piquero AR (2020) Disentangling community-level changes in crime trends during the COVID-19 pandemic in Chicago. Crime Sci 9:1–18
Chen T, Guestrin C (2016) Xgboost: A scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 785–794. https://doi.org/10.1145/2939672.2939785
Choi HM, Heo S, Foo D, Song Y, Stewart R, Son J, Bell ML (2024) Temperature, crime, and violence: A systematic review and meta-analysis. Environ Health Perspect 132(10):106001
Cohen MA, Rust RT, Steen S, Tidd ST (2004) Willingness-to-pay for crime control programs. Criminology 42(1):89–110
Cohen F, Gonzalez F (2024) Understanding the link between temperature and crime. Am Econ J Econ Policy 16(2):480–514
Corcoran J, Zahnow R (2022) Weather and crime: a systematic review of the empirical literature. Crime Sci 11(1):16
Cruz AR, de Castro-Rodrigues A, Barbosa F (2020) Executive dysfunction, violence and aggression. Aggress Violent Behav 51:101380
Cruz E, D’Alessio SJ, Stolzenberg L (2023) The effect of maximum daily temperature on outdoor violence. Crime Delinquency 69(6-7):1161–1182
Dau PM, Vandeviver C, Dewinter M, Witlox F, Vander Beken T (2023) Policing directions: A systematic review on the effectiveness of police presence. Eur J Crim Policy Res 29(2):191–225
Demombynes G, Özler B (2005) Crime and local inequality in South Africa. J Dev Econ 76(2):265–292
Enamorado T, López-Calva LF, Rodríguez-Castelán C, Winkler H (2016) Income inequality and violent crime: Evidence from Mexico’s drug war. J Dev Econ 120:128–143
Friedman JH (2001) Greedy function approximation: a gradient boosting machine. Ann Stat 1189–1232. https://doi.org/10.1214/aos/1013203451
Gould ED, Weinberg BA, Mustard DB (2002) Crime rates and local labor market opportunities in the United States: 1979–1997. Rev Econ Stat 84(1):45–61
Grabrucker K, Grimm M (2018) Does crime deter South Africans from self-employment? J Comp Econ 46(2):413–435
Halle C, Tzani-Pepelasi C, Pylarinou NR, Fumagalli A (2020) The link between mental health, crime and violence. N. Ideas Psychol 58:100779
Hammitt JK, Robinson LA (2011) The income elasticity of the value per statistical life: transferring estimates between high and low income populations. J Benefit-Cost Anal 2(1). https://doi.org/10.2202/2152-2812.1009
Hart R, Pedersen W, Skardhamar T (2022) Blowing in the wind? Testing the effect of weather on the spatial distribution of crime using generalized additive models. Crime Sci 11:9
Herrnstadt E, Heyes A, Muehlegger E, Saberian S (2021) Air pollution and criminal activity: Microgeographic evidence from Chicago. Am Econ J Appl Econ 13(4):70–100
Hoffmann S, Krupnick A, Qin P (2017) Building a set of internationally comparable value of statistical life studies: estimates of Chinese willingness to pay to reduce mortality risk. J Benefit-Cost Anal 8(2):251–289
Hou L, Dai Q, Song C, Liu B, Guo F, Dai T, Feng Y (2022) Revealing drivers of haze pollution by explainable machine learning. Environ Sci Technol Lett 9(2):112–119
Jácome E (2020) Mental health and criminal involvement: Evidence from losing Medicaid eligibility. Job Market Paper, Princeton University
Jennings JM, Milam AJ, Greiner A, Furr-Holden CDM, Curriero FC, Thornton RJ (2014) Neighborhood alcohol outlets and the association with violent crime in one mid-Atlantic city: the implications for zoning policy. J Urban Health 91:62–71
Jiang S, Land KC, Wang J (2013) Social ties, collective efficacy and perceived neighborhood property crime in Guangzhou, China. Asian J Criminol 8:207–223
Kim S, Lee S (2023) Nonlinear relationships and interaction effects of an urban environment on crime incidence: Application of urban big data and an interpretable machine learning method. Sustain Cities Soc 91:104419
Kirk DS, Laub JH (2010) Neighborhood change and crime in the modern metropolis. Crime Justice 39(1):441–502
Kourtit K, Nijkamp P, Wahlström MH (2021) How to make cities the home of people–a ‘soul and body’ analysis of urban attractiveness. Land Use Policy 111:104734
Lesk C, Rowhani P, Ramankutty N (2016) Influence of extreme weather disasters on global crop production. Nature 529(7584):84–87
Liu Y, Wang T (2020) Worsening urban ozone pollution in China from 2013 to 2017–Part 1: The complex and varying roles of meteorology. Atmos Chem Phys 20(11):6305–6321
Lochner L (2020) Education and crime. In: The economics of education. Academic Press, pp 109–117. https://doi.org/10.1016/B978-0-12-815391-8.00009-4
Lundberg SM, Lee SI (2017) A unified approach to interpreting model predictions. Adv Neural Inf Process Syst 30. https://doi.org/10.48550/arXiv.1705.07874
Lymperopoulou K, Bannister J (2022) The spatial reordering of poverty and crime: A study of Glasgow and Birmingham (United Kingdom), 2001/2 to 2015/16. Cities 130:103874
Manea RE, Piraino P, Viarengo M (2023) Crime, inequality and subsidized housing: Evidence from South Africa. World Dev 168:106243
Mares DM, Moffett KW (2016) Climate change and interpersonal violence: a “global” estimate and regional inequities. Clim Change 135:297–310
Masterman CJ, Viscusi WK (2018) The income elasticity of global values of a statistical life: stated preference evidence. J Benefit-Cost Anal 9(3):407–434
McCollister KE, French MT, Fang H (2010) The cost of crime to society: New crime-specific estimates for policy and program evaluation. Drug Alcohol Depend 108(1–2):98–109
Nivette AE, Zahnow R, Aguilar R, Ahven A, Amram S, Ariel B, Eisner MP (2021) A global analysis of the impact of COVID-19 stay-at-home restrictions on crime. Nat Hum Behav 5(7):868–877
Phillips J, Land KC (2012) The link between unemployment and crime rate fluctuations: An analysis at the county, state, and national levels. Soc Sci Res 41(3):681–694
Picasso E, Cohen MA (2019) Valuing the public’s demand for crime prevention programs: A discrete choice experiment. J Exp Criminol 15:529–550
Picasso E, Grand MC (2019) The value of the risk to life in the context of crime. J Benefit-Cost Anal 10(2):178–205
Ranson M (2014) Crime, weather, and climate change. J Environ Econ Manag 67(3):274–302
Robinson LA, Hammitt JK, O’Keeffe L (2019) Valuing mortality risk reductions in global benefit-cost analysis. J Benefit-Cost Anal 10(S1):15–50
Rotaru V, Huang Y, Li T, Evans J, Chattopadhyay I (2022) Event-level prediction of urban crime reveals a signature of enforcement bias in US cities. Nat Hum Behav 6(8):1056–1068
Scheider MC, Spence DL, Mansourian J (2012) The relationship between economic conditions, policing, and crime trends. US Department of Justice, Washington, DC
Seedat S, Scott KM, Angermeyer MC, Berglund P, Bromet EJ, Brugha TS, Kessler RC (2009) Cross-national associations between gender and mental disorders in the World Health Organization World Mental Health Surveys. Arch Gen Psychiatry 66(7):785–795
Sevinç E (2022) An empowered AdaBoost algorithm implementation: A COVID-19 dataset study. Comput Ind Eng 165:107912
Shen B, Hu X, Wu H (2020) Impacts of climate variations on crime rates in Beijing, China. Sci Total Environ 725:138190
Shepherd JP, Moore SC, Long A, Kollar LMM, Sumner SA (2021) Association between COVID-19 lockdown measures and emergency department visits for violence-related injuries in Cardiff, Wales. JAMA 325(9):885–887
Skudder H, Druckman A, Cole J, McInnes A, Brunton-Smith I, Ansaloni GP (2017) Addressing the carbon-crime blind spot: A carbon footprint approach. J Ind Ecol 21(4):829–843
Stone B, Hess JJ, Frumkin H (2010) Urban form and extreme heat events: are sprawling cities more vulnerable to climate change than compact cities? Environ Health Perspect 118(10):1425–1428
Sviatschi MM, Trako I (2024) Gender violence, enforcement, and human capital: Evidence from women’s justice centers in Peru. J Dev Econ 168:103262
Taud H, Mas JF (2018) Multilayer perceptron (MLP). In: Geomatic approaches for modeling land change scenarios. Springer, pp 451–455
Thomas C, Jeong J, Wolff KT (2024) Testing Routine Activity Theory: Behavioural pathways linking temperature to crime. Br J Criminol azae091
Viscusi W (2018) Pricing lives: Guideposts for a safer society. Princeton University Press, Princeton
Wang L, Zhao Y, Shi J, Ma J, Liu X, Han D, Huang T (2023) Predicting ozone formation in petrochemical industrialized Lanzhou city by interpretable ensemble machine learning. Environ Pollut 318:120798
Yao T, Lu S, Wang Y, Li X, Ye H, Duan Y, Li J (2024) Revealing the drivers of surface ozone pollution by explainable machine learning and satellite observations in Hangzhou Bay, China J Clean Prod 440:140938
Zhang X, Liu L, Lan M, Song G, Xiao L, Chen J (2022) Interpretable machine learning models for crime prediction. Comput Environ Urban Syst 94:101789
Zhuo J, Hao M, Ding F, Dong J, Jiang D, Chen S (2024) The spatiotemporal patterns and driving factors of cybercrime in the UK during the COVID-19 pandemic. Humanit Soc Sci Commun 11(1):1–10
Author information
Authors and Affiliations
Contributions
TY and MX conceived and designed the manuscript.TY, JZ, XY, YW, and HY did a literature search and downloaded the data. TY, JZ, and XY conducted the analysis and interpretation of the data; TY, JZ, XY, and MX drafted the manuscript. TY, JZ, XY, ZZ, and MX. improved this research and edited the manuscript. All authors read and approved the final version of the paper.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Ethical approval
This article does not contain any studies with human participants performed by any of the authors.
Informed consent
This article does not contain any studies with human participants performed by any of the authors.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Yao, T., Zhang, J., Yang, X. et al. The impact of weather patterns on increasing violent crime and social cost in South Africa. Humanit Soc Sci Commun 12, 1106 (2025). https://doi.org/10.1057/s41599-025-05460-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1057/s41599-025-05460-0