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.

$${{Crime}}_{j}=\mathop{\sum }\limits_{i=1}^{5}{\beta }_{i}{X}_{j}+{\beta }_{o}+{e}_{j},\left(i=1,2,..,5\right)$$
(1)

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).

$${{Crime}}_{a}={{Crime}}_{j}-{{Crime}}_{m}$$
(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).

$${{Crime}}_{i}={{Crime}}_{i({base})}+\mathop{\sum }\limits_{j=1}^{S}{shap}({x}_{i,j})$$
(3)
$${shap}\left({x}_{i,j}\right)=\mathop{\sum}\limits _{M}\frac{{|M|}!\left(S-{|M|}-1\right)!}{S!}({Crime}_{(M\cup \{{x}_{i,j}\})}-{{Crime}}_{(M)})$$
(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).

$${{VSLY}}_{{it}}=\frac{\left({VSL}_{{USA}}\times {\left(\frac{{{GDP}}_{{it}}}{{{GDP}}_{{USA}}}\right)}^{e}\right)}{0.5\times {LE}}$$
(5)

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.

Fig. 1: The spatiotemporal patterns of crime for South Africa.
figure 1

Total crimes in 2023 (A), the quarterly crimes in its nine provinces in 2023 (B), and four crime patterns quarterly (C) between 2017 and 2023.

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%).

Table 1 The quarterly observed, meteorological, and anthropogenic trends of four crime patterns in South Africa from 2017 to 2023.

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.

Table 2 The influence of weather patterns in warm seasons on crime patterns from 2017 to 2023 based on the Poisson regression.

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.

Table 3 The quarterly observed, meteorological, and anthropogenic trends of IHs in Chicago, Mexico and South Africa from 1994–2021.
Fig. 2: The study framework of IML applied to crime’s determinants.
figure 2

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.

Fig. 3: The SHAP values of crime drivers.
figure 3

The partial dependent plots of pGDP (GDP per capita), PM2.5, education, and air temperature. SHAP summary plot of all features (A). Partial dependence plots of pGDP (B), PM2.5 (C), education (D), and air temperature (E), respectively.

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).

Fig. 4: The international homicide and its social cost across the world in 2021.
figure 4

The IH rate, measured as cases per 100,000 people (A). The estimated social cost of IH, measured in USD million (B).

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.

Table 4 The VSLY and social costs (attributed to weather and human behavior) of IH for South Africa from 2008 to 2021.

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).

Fig. 5: The distribution (160-meter grid) and cluster analysis of total crime for Chicago, the U.S. in 2023.
figure 5

Spatial distribution of total crime (A). Cluster analysis results of total crime (B). The distributions of the main four crime patterns, including violence (C), violence related (D), property (E), and other (F) crime.

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.

Table 5 Results of Poisson regression associated with total, violent, violent-related, and property crime.

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).

Table 6 Heterogeneity among South Africa, Chicago and Mexico based on LSDV analysis using quarterly data.

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.

Table 7 The regression of violent crime in nine South African 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.