Predicting Gun Violence in Stockholm, Sweden, Using Sociodemographics, Crime and Drug Market Locations

The well-being of neighbourhoods in terms of socioeconomic conditions constitutes an important element in analyses focused on the explanation of crime trends and public safety. Recent developments in Sweden concerning gun violence and open drug scenes are worrying and the police are under a great deal of pressure to resolve the situation in many neighbourhoods, which is in turn affecting Swedish society as a whole. This study focuses on micro areas in terms of sociodemographic factors and the presence of drug markets and gun violence. The aim is to explore the relationship between these factors and what characterises areas that are experiencing the greatest difficulties. The study develops an index for the prediction of gun violence in micro areas, in this study portrayed by vector grids. The findings show an overlap between gun violence and drug markets and that micro areas in that overlap share harsh sociodemographic conditions. The study produces an index indicating the probability that a grid cell would experience gun violence. The index was then validated using recent gun incidents, and was found to have high accuracy. The resulting grids constitute a suitable target for resource allocation by police and other actors. This could facilitate a more accurate and precise focus for measures to prevent areas from becoming—or to disrupt already existing—hot spots for gun violence.


Introduction
In Sweden, there has been a surge in gun violence and gang conflicts during the last decade (Sturup et al., 2019), with the capital city Stockholm and its suburbs seeing the worst effects of this trend (Swedish Police Authority website, 2023; Swedish Police Authority, 2021).Drug markets and gun violence occur together, as has been shown by studies from both the USA and Europe (Ousey & Lee, 2002;Felson & Bonkiewicz, 2013;Andreas & Wallman, 2009).Links have also been established between gang criminality, gun violence and drug activity in Sweden (Magnusson, 2020;Gerell et al., 2021;Swedish Police Authority, 2017;2021).
Areas of low social status seem to have more problems related to drug markets and gun violence.Previous research has identified links between neighbourhood disruption and drug markets in many different locations (Harocopos & Hough, 2005;Andreas & Wallman, 2009;Johnson, 2016).Some of these studies view drug markets as a result of disadvantage in the area (Lum, 2009), or as being related to low informal social control (Ford & Beveridge, 2004), while others describe areas as becoming disadvantaged as a result of the presence of drug markets (Berg & Rengifo, 2009).Thus, the explanations of the underlying causal factors may vary, but the existence of an overlap between these factors has been established (Lum, 2009).Exposure to crime more generally is also unevenly distributed among citizens and across neighbourhoods.The combination of drug markets, gun violence and disparities in levels of community resources constitutes a problem both for society and for actors such as the police, and it also reflects an injustice when it comes to the quality of life for residents.
While research in other countries has focused on the locations of drug markets and gun violence, there has been a lack of research in this field in Sweden.One study on this topic, completed in 2021 (Gerell et al.), found that there was a very strong concentration of gun violence in open drug market locations, in particular when locations were in socially disadvantaged neighbourhoods.The present study will build on these findings and focus on micro areas in terms of sociodemographic factors as well as the presence of drug markets and gun violence.
For society in general and for actors such as the police and municipalities in particular, being able to foresee where problems will occur, thereby shifting the perspective from reaction to prevention, could help bring about a turning point in the negative development that is currently being observed in many places in terms of gun violence and drug markets.A great deal of research in a variety of academic fields aims to forecast and predict problems, not least in medicine.Criminology and police research have done so as well, but much remains to be done when it comes to gun violence in general and the Swedish context in particular.
The aim of this study is to explore the relationship between sociodemographic factors, drug markets and gun violence and to investigate what characterises areas that are experiencing the greatest difficulties with these issues, to identify possible predictors of future gun violence.The paper begins, however, by outlining the study's theoretical points of departure and research design.

Crime Concentration
Very small units of space account for a large proportion of crime across the globe and also across different types of crime.The law of crime concentration formulated by Weisburd (2015) has been specified (Weisburd et al., 2016), tested and consistently found support in European settings (Hardyns et al., 2019).Concentrations of crime at drug hot spots have been identified both in Sweden (Magnusson, 2020) and other countries (Lum, 2009, Weisburd & Green, 1995;Weisburd & Mazerolle, 2000;Houbourg et al., 2014;Corsaro et al., 2013), and gun violence has also been found to follow the principle of crime concentration, with high levels of gun incidents being noted at micro places (Braga et al., 2010).In crime pattern theory, Brantingham andBrantingham (1993, 1995) explain the concentration in some locations actually attracting crime, thus making the characteristics of locations central to understanding the problems.Drug markets may be seen as crime attractors because they increase the inflow of dealers, users and possible targets to areas.Neighbourhoods are not evenly exposed to crime.This is due to the fact that crime is concentrated in small areas (Weisburd & Amram, 2014) but also to differences in neighbourhood conditions.Patterns of crime concentration are central to the exploration of open drug markets and gun violence.Since different areas are unevenly exposed to concentrations of crime, clues to understanding differences between residential areas may be found in neighbourhood-based theories.

Neighbourhood Conditions, Drug Markets and Gun Violence
Criminological theories have historically considered the context in which crime occurs in terms of society, community and neighbourhood.During the first half of the twentieth century, the Chicago School emphasised the importance of disorganisation in the areas in which people live (Shaw & McKay, 1942) and group cultures (Sutherland, 1939) for crime and deviant behaviour.Areas of low social status, and in some countries also ethnic homogeneity (Johnson, 2016), have consistently been found to have higher levels of crime and disruption, with research findings continuously confirming this to be the case (Krivo & Peterson, 1996;Anderson, 1999;Lee et al., 2003).Disadvantaged areas are characterised by the combination of high levels of crime and disruption and poor socioeconomic conditions, which together produce a negative trend that is often linked to low levels of informal control (Sampson & Wikström, 2006).The residential context plays an important role as a protective factor for some individuals, but constitutes a risk factor for others, depending on structural differences between neighbourhoods and individual propensities.
This well-established link between disadvantaged neighbourhoods and crime is also transferrable to drug markets, which also appear to be more violent and more common in poor neighbourhoods (Lum, 2011;Johnson, 2016;Okundaye et al., 2001).Research has shown that lower levels of neighbourhood-level informal control tend to give rise to higher levels of violence in connection with drug markets, and that it is the drug markets that generate the violence found in these exposed areas (Berg & Rengifo, 2009).However, no consistent answer has been found to the question of what leads to the establishment of drug markets, or to differences in the level of violence at drug markets.Moeller and Hesse (2013) hypothesised, for example, that market instability following police arrests would lead to higher levels of violence.Violent drug markets may emerge as a result of many different factors, such as substances sold and lucrativeness (Friman, 2009), individuals at the location (Reuter, 2009), the involvement of gangs (Cohen et al., 1998) and also police actions (Moeller & Hesse, 2013).Studies also show that levels of violence differ due to cultural and structural differences in local supply chains (Coomber, 2015).However, geography and demographics also play a role (Johnson, 2016, Gerell et al., 2021).Lum (2008) has argued that spatial factors associated with areas characterised by drug markets and violence have received too little focus.
The presence of drug markets has been found to be linked to feelings of unsafety at the neighbourhood level in Stockholm (Magnusson, 2020).Growing up in socially disorganised settings increases the risk of becoming deviant (Johnson, 2016).Exposure to violence in one's environment has been shown to affect both the use of violence and gun carrying among youth (Patchin et al., 2006).Gun violence has a major impact on society not only in terms of deaths and injury, but also in terms of harm and fear in communities and costs to society (Cook, 2020;Wilhelmsson et al., 2022).Gun violence increased as a consequence of the establishment of crack-cocaine markets run by already violent street gangs in the 1980s in many parts of the USA, and similar developments at other types of drug markets can also be seen elsewhere (Blumstein, 1995;Felson & Bonkiewicz, 2013).The combination of dealing drugs and carrying weapons has been found to be linked to variables such as having an absent father, being excluded from school and ethnicity (Allen & Lo, 2012).Studies on gang reproduction have also found a certain logic in the decision to enter a gang community when young people face structural exclusion from society (Baird, 2018).In a study on the relationship between gun carrying and drug dealing, Docherty et al. (2020) have found that drug dealing precedes carrying weapons, while Emmert et al. (2018) found that drug dealing and drug abuse also increase with gun carrying.
Gun violence is also a consequence of gang activities.Cohen et al. (1998) have argued that the spatial and temporal distribution of violent incidents in certain neighbourhoods is due to the business-related characteristics of drug markets and the characteristics of the individuals involved in dealing operations.Gun violence is a result of a perceived need to protect these enterprises, which goes back as far as the crack markets of the 1980s.Cohen et al. found that gang-and drug-related homicide give rise to more of the same, providing support for the epidemiological view of the spread of such violence suggested earlier by Blumstein (1995).Braga and Cook (2018) found that both lethal and non-lethal gun violence tend to be strongly linked to gang-and drug-related factors.Studies on murder within gang structures (Papachristos, 2009) have shown that retaliation plays a significant role in the nature of gang murders, and gang rivalry is seen as one explanation for increases in gang homicide (Cohen et al., 1998).The number of active gangs in an area has also been found to be strongly linked to crime levels (Block, 2000).

Need for Research on Swedish Contexts
One recent study of open drug scenes (ODSs) in the Stockholm region (Magnusson, 2020) found that these are often located in residential areas, and that they are characterised by both social disruption and concentrations of crime, but they also differ in terms of crime concentration, perceptions of unsafety, area composition and levels of gun violence.Another Swedish study of neighbourhoods with high levels of problems found both drug dealing and gun violence to be recurrent issues in such areas (Gerell et al., 2022).There is also research showing links between gun violence and drug markets in Stockholm (Magnusson, 2020), particularly drug markets located in disadvantaged areas (Gerell et al., 2021).However, the links between gun violence and drug markets are a relatively recent phenomenon in Sweden, although gun violence, at least among the young male population, has been increasing for the last 20 years (Sturup et al., 2019).Street-gang violence in Sweden is on the increase (Rostami, 2017), which is having a substantial effect on neighbourhoods and residents.Gangs or criminal networks have been studied in many locations, and regardless of the definition or research perspective employed, there is clear evidence in Sweden today of drug markets characterised by the presence of criminal groups with a capacity for violence (Swedish Police Authority, 2021).
Studies focused on the links between social disorganisation and drug markets or violence have for the most part been conducted in countries other than Sweden, predominantly in the USA.There can be little doubt that the residential context of different areas plays a role in producing the conditions for drug markets and gun violence.While there may be lessons to learn from the American situation with regard to Swedish drug markets and the increases in gun violence witnessed in Stockholm, there seem to be distinctive differences between Sweden and the USA with regard to both gang characteristics (Sarnecki, 2000) and social structure (Ceccato, 2016).In Sweden, for example, research focused on the significance of ethnicity commonly compares "Swedes" and "immigrants", whereas US research employs categorisations that distinguish between a number of ethnic minorities (Sarnecki, 2000).This means that the Swedish setting is likely to be characterised by other criminal contexts, and might require other analytical tools and theories.Despite the development of a number of insights into trends relating to drug markets and gun violence, the overlap between the two has not been studied sufficiently.
Variables having to do with the conditions in different areas, drug market locations and previous incidents of gun violence might help to determine which areas are likely to be exposed to gun violence in the future.If disadvantaged areas have more severe problems, sociodemographic data on employment, population, age, housing and ethnic background may also be able to provide interesting insights into Swedish settings.
This study aims to explore the overlap between open drug scenes and gun violence.A second aim is to enhance the accuracy of forecasting where gun violence might happen.This will be achieved by examining whether locations characterised by both of these phenomena share common characteristics and whether it is possible to identify predictive variables indicating where such locations will be found in the future.
"Open drug scene"is the term used in this study and refers to locations similar to open air drug markets and illicit drug markets.All three terms capture locations of illicit drug dealing and drug use, and with effects on the local community, but "open drug scene" is found to be more firmly defined.The definition of the term used in this study reads: "a geographically durable place where the use and dealing of drugs takes place in public and is conceived as problematic by authorities and /or the public" (Magnusson, 2020).

Place-Based Approach-Spatial Data Analysis
Place-based criminology explores and explains crime using place-related variables, making geographic locations central.Spatial analyses show that crime patterns vary over both time and space (Ceccato & Uittenbogaard, 2012) and that the distribution of many types of crime follows people's everyday movement patterns, as suggested by routine activity theory (Cohen & Felson, 1979).Disadvantaged neighbourhoods have been researched in relation to crime and deviance mostly on the basis of a density mapping of factors related to community structure.However, the interactive or physical characteristics of places were not included in the analysis of crime patterns until the more recent emergence of place-based forecasting.Crime concentration has been acknowledged as an important phenomenon and has been analysed by police agencies for some time now via hot spot analysis.This type of analysis takes a retrospective approach, using prior offences to predict where crimes might occur in the future (Chainey et al., 2008).There are several different techniques for making hot spot calculations.These range from simple counts of crime at specific locations (see for example Johnson et al., 2007) to the use of computer programs based on advanced algorithms such as optimised hot spots analysis in ArcGIS, based on the work of Getis and Ord (1992).Kernel density estimation (KDE) is one tool that is often used to predict the geographic location of future crime based on earlier offences, and has been described as the best spatial analysis technique for the visualisation of crime data (Chainey & Ratcliffe, 2005, 2013).The technique involves superimposing a grid over the area in focus, on which crime incidents are plotted, producing a map of variations in crime density that helps identify crime hot spots (Doyle et al., 2021).The effectiveness of the technique depends on the selection of a smoothing parameter, also called the bandwidth (Silverman, 1986;Chainey & Ratcliffe, 2005, 2013).In a study using risk terrain modelling (RTM), Kennedy et al. (2011) showed that environmental risk factors are also important in the forecasting of crime, in addition to the data on past offences and individual risk factors that have traditionally been used.There is no established "best" technique (Drawve et al., 2016) but the use of several different techniques is to be preferred, as is the use of PAI (Chainey et al., 2008) to measure the accuracy of the predictions produced (Doyle et al., 2021).Adding sociodemographic variables to the study of, in this case, drug markets and gun violence thus has the potential to enhance our understanding of these phenomena.

Micro Place as a Unit of Analysis
In the work of the Chicago School and the early criminological work on areas characterised by social disorganisation, the focus may not have been directed at the size of an area or the unit of analysis, but the community context nonetheless played a powerful role in theory development.The focus on geographical areas rather than simply individuals may be seen as having given rise to the field of place-focused criminology, which Weisburd (2015) then developed further, drawing on research from several other micro-geographic studies (see for example Sherman et al., 1989;Weisburd & Green, 1995), to look at microgeographic crime hot spots.The definition of micro places varies based on the perspective employed and the research questions being examined.Weisburd employed street segments as the unit of analysis in developing his law of crime concentration (2015), while other researchers have chosen units that might simplistically be described as "what the eye can see" (Sherman et al., 1989).The argument for focusing research on small units of analysis is based on the insight that crime is geographically concentrated; small geographical units account for a large proportion of registered crime (Weisburd et al., 2012).Another reason for policing research to focus on small units is found in the positive results produced by prevention studies focused on small and stable hot spots (Braga & Weisburd, 2010).This also motivates the use of micro places as the unit of analysis in the current study.
In order to prevent crime as cost effectively as possible, as intended by the evidencebased policing (EBP) approach (Sherman, 1998), concentrated multi-actor collaborations appear to constitute the way forward (Connoly, 2006(Connoly, , 2012)).The resources available are often minimal, and there is strong evidence of positive results from crime prevention initiatives focused on crime hot spots (Braga & Weisburd, 2010).However, predictions, or at least qualified guesswork, are needed in order to identify the right locations.Following the reasoning of Chainey et al. (2008), this study focuses on developing a methodology, based on several different analyses, for predicting future gun violence in different areas.

Research Questions
To what extent do gun violence and ODSs overlap in Stockholm?
What sociodemographic and crime characteristics have an association with micro areas that have both ODS and gun violence in Stockholm?With what level of accuracy could a statistical analysis model on socio demographic and crime data predict risk for gun violence at micro places in Stockholm?

Setting
Stockholm is the most populated county in Sweden, covering 6519 km 2 (1.6% of the country's total land area) and with a population of almost 2.4 million, almost a quarter of the 10.3 million residents of Sweden (23.3%;SCB, 2020 first quarter).There are approximately 200 police officers per 100,000 inhabitants in Stockholm, with a total of around 7000 police employees and 19 local police districts.Stockholm has seen the most marked increase in gun violence compared to Sweden's two other metropolitan areas, Gothenburg and Malmö (Swedish Police Authority website, 2023).In Stockholm, 48 open drug scenes (ODS) were identified in 2017 (Magnusson, 2020).

Data
The analyses are based on three sets of data: open drug scenes (ODSs), gun violence data and vector grid data for sociodemographic variables and crime.
The drug market data comprise data on ODSs in the Stockholm region between 2017 and 2019 (N = 164), geocoded into polygons.These data are drawn from the annual police mapping of ODSs in Stockholm County.This mapping is conducted via a survey completed by all local police districts, often in collaboration with municipality representatives.Each year, approximately 55 ODSs are identified and mapped in the region, but several of these consist of two or more polygons located close together; sometimes, a road or a building can serve to separate a single area into two polygons, for example.
The gun violence data relate to shootings in the Stockholm region between 2017 and 2020 (N = 499), collected from the Stockholm region police, which have been geocoded into point data.The shootings were blurred, which means that the exact location of the shooting may have been moved a maximum of 100 m from the point at which it occurred.This blur has been carried out by the police intelligence department in order to anonymise the data points in relation to specific individuals and to make it possible to publish maps relating to shootings without infringing on pre-trial confidentiality issues.Another data set on shootings with incidents (N = 95) from January to September 2021 was used to validate predicted micro areas as the last step.All the data on shootings were collected from the Stockholm region police.
In operationalising the theoretical concept of micro places, the unit of analysis needs to be small, and in the current case, the demographic data consist of vector grids of 250 × 250 m for the Stockholm region (N = 15,429).These have aggregated data including registry data on the population from Statistics Sweden, crime data for eight offence categories and data on municipal boundaries.The included variables are population size, proportion employed, proportion foreign-born, proportion with foreign-born parents, persons per household, single-parent households, other households, proportion aged 0-15, proportion aged 16-24, offences involving explosions, narcotic offences, robberies, vandalism, bicycle theft, assault in the public environment, assaulting a public official and theft from motor vehicle.The vectorised grid net data were managed using the statistical software package R and were provided by Malmö University (for more details on the grid data, see Gerell et al., 2022).

Study Design
The study was conducted in the form of several methodological steps, each of which employed different techniques and variables to develop new knowledge which was then used to advance the line of inquiry and generate further insights with each successive methodological step (Table 1).The first analysis examines retrospective gun violence data using the KDE hot spot technique.The stability of ODSs is seen as a means of addressing the issue of concentration without relying exclusively on retrospective crime data.The sociodemographic neighbourhood variables are used to extend the design to a broader, more stable, context in order to better predict future gun violence.Several crime variables are included in the data set, and ODS locations are also added here to further enhance predictive power.A calculation of a predictive index, inspired by a recent study on predicting grid cells (See Gerell et al., 2022), was completed on sociodemographic variables and crime variables in the grid net.The resulting prediction index is then validated using gun incidents registered during 2021 and is tested using the prediction accuracy index (PAI) measure.The PAI also allows for a comparison of the predictive accuracy with other attempted forecasting.
The next section describes the method and data management procedures in more detail.

Methods and Data Management
In this study, all data were geocoded and exported to ArcGIS Pro 2.7.1.The ODSs were first analysed using the ODSs identified in each year as a layer and superimposing the gun incidents from the same year.The selection function was used to explore how many of the gun incidents had taken place within the ODSs.Buffer zones of 200 m were added to the ODSs to explore relationships, patterns and tendencies.The ODS locations cannot be regarded as micro places, but in the later steps of the analysis, they were superimposed on the vector grid net, allowing for the inclusion of the ODS variable in the micro area analysis.
All shootings from 2017 to 2020 were also aggregated into a single data set in the same way.To answer the first research question, kernel density estimation (KDE) was conducted on the gun incident data set (n = 499) to visualise and explore any concentration of gun incidents in the region.The KDE was preceded by an average nearest neighbour (ANN) calculation to determine if the clusters of gun violence were significant.Both analyses were conducted in ArcGIS Pro.In order to answer the second research question, the grid data set was used to explore the areas with ODSs, areas with gun incidents and then areas with both and to compare them to the "normal" vector grids.The analysis was completed by comparing the mean grid values for all variables included in the analysis, which were then t-tested for the presence of significant differences.
The grid net was combined with the ODS and gun incident data set in ArcGIS Pro.In relation to the third research question, the exploration of a predictive model, this complete data set was then exported for further tests of significance and for regression analysis using the software package IBM SPSS version 26.A binary logistic regression analysis was then conducted on the gun violence variable.All variables were standardised into Z scores for this step of the analysis.Logistic regression is used to predict the relationship between predictors (independent variables) and a predicted variable (the dependent variable) when the dependent variable is binary.In this study, this means that all variables on sociodemographic characteristics and crime were included as independent variables while gun violence was the dependent variable.The analysis was primarily focused on significant values of the regression coefficient (B) in order to explore the impact of the independent variables on the dependent, and the classification table was used to understand the proportion of predicted and observed events for the dependent variable.Some of the independent variables are likely to be correlated.The variables are not analysed individually, however, and the focus is rather directed at the creation of an index.
An index was then modelled to predict vector grids in which gun incidents were likely to occur.The index was conducted by computing a new index variable.This index variable was created in SPSS using the compute variable tool.Only significant variables were included in the index, and this gun violence predictor index was then included as a new variable in the SPSS data set.The regression coefficients (B) for the variables were multiplied by the value of each variable in each vector grid in order to weight them, and they were then summed to form an index.For example, if employment and assaulting a public official were the only variables showing a significant correlation with gun violence, then the coefficient (B) for employment would be multiplied by the grid cell's value on the employment variable, which would then be added to the coefficient for assaulting a public official multiplied by the grid cell's value on the variable assaulting a public official.
This index variable could now also be exported back to ArcGIS Pro for analysis and visualisation.The gun violence predictor index was graded in five prediction levels with the thresholds: very low, low, medium, high and very high.The three highest index score classes were then used in the next step of the analysis, the index validation.
To answer the third research question, the accuracy of the index in predicting vector grids correctly was tested using PAI, created by Chainey et al. (2008).The PAI was used in order to evaluate the index, while also considering not only how many gun incidents fell within the predicted grid cells, but also how large a portion of the area these grid cells incorporate.The proportion of gun incidents in 2021 that happened at the proportion of predicted cells results in the PAI.For example, if 10% of the recorded gun incidents in 2021 were observed within 1% (of the predicted grid cells) of the total grid net, this would give a PAI of 10 (Chainey et al., 2008).The PAI was calculated for each of the three highest prediction index classes.The PAI was also used to compare prediction models suggested.The ODS data were added to explore the predictive accuracy of the index.

ODSs and Gun Violence Overlap
In order to explore the presence of an overlap between ODSs and gun violence in Stockholm County, all ODSs and all violence incidents were combined into two data sets for analysis.The ODSs are stable over time.Sixty-eight percent of the ODSs have existed for more than 10 years and a total of 79% have been present over the whole period.Table 2 shows a concentration of gun violence at ODSs, 37% of the gun violence at 0.6% of the regional area.
The gun violence incidents were found to have a clustered pattern.The nearest neighbour analysis shows that the gun violence incident patterns were found to be significant, and the results showed that there is a less than 1% likelihood that this clustered pattern could be the result of random chance.In Fig. 1, the kernel density estimations for all shootings (N = 499) have been graded into 10 classes on the basis of natural breaks (Jenks), with grid cell size set to 250 m and using the default bandwidth, with the lowest class being specified as having no colour.The highest class was coloured red and the other classes in successively lighter shades of red.The visualisation shows an overlap between ODSs and gun violence hot spots.

Vector Grids
The overlap between ODSs and gun violence and the hot spots of gun violence are created from data on earlier gun violence.Adding ODSs which are viewed as more stable locations of problems is beneficial for a better understanding of these locations.Nevertheless, there are also a number of more stable variables that might be linked to levels of gun violence.The analysis now moves on to the sociodemographic characteristics of the neighbourhoods in order to answer the second research question: What sociodemographic and crime characteristics have an association with micro areas that have both ODS and gun violence?The vector grid net, comprising variables focused on micro areas, was exported to ArcGIS Pro.When data on the ODSs (red) and shootings (blue) are combined, several areas characterised by both shootings and ODSs emerge (Fig. 2).In order to explore these areas in more detail, the areas were superimposed on the grid net (light blue cells) containing information on demographic and crime data.
In this step of the analysis, Stockholm County is divided into a grid net, which now also contains information on whether each grid cell intersects with an ODS or a gun violence incident or both.These three categories of grid cells were separated and compared in order to examine the sociodemographic and crime variables in each group.The objective was to

Comparison of Micro Areas
To begin with, the mean values for the relevant variables were calculated and compared for the grid cells included in ODSs, those that have experienced incidents of gun violence and those with no connection to either ODSs or gun violence.A t-test was used to explore whether differences in mean values were significant.Grid cells linked to open drug scenes, gun violence or both were compared with the total mean (labelled "All").First, it is clear that significant differences are found for many of the variables, which is often the case when using large data sets.In this data set, the independent variables are likely to be correlated, which might also have an impact on the differences.Descriptive statistics showing mean values and the results of significance tests for mean differences for the grid-level variables are included in the study (Table 3).For population and crime variables, the variable values represent counts, while the other variables are reported as proportions.
The mean values for "All" are the mean for all cells in Stockholm.The means for the areas containing ODSs and incidents of gun violence, and for areas containing both, are the mean value of comparison to the "All" cells.
To control for a possible effect of outliers and to exclude any impact from specific micro places affecting the mean values for the categories, all categories were examined thoroughly in terms of the highest and lowest values for all variables.In the case of the areas characterised by both ODSs and gun violence, for example, which only included 173 grid cells in total, the mean of the population variable could be affected by the presence of a small number of grid cells situated in the inner city, with a very dense population.The analysis showed that there were a few inner-city grid cells in this category, but that the population size in these grid cells was no higher than that found in some of the most populous grid cells in other locations outside the inner city.The same analysis was conducted for all variables and values.Since the number of grid cells included in the areas categorised by gun violence is relatively small and even smaller in the combined category, this analysis is important since an outlier in the small amount of cells could have a big impact.
The overall pattern shows high levels of most of the variables in the categories of ODS, gun violence and combined, which is in line with the results from most research on disadvantaged areas and what might be expected.Applied to this data set, we see that the mean values increase successively in grid cells characterised by drug market presence and gun violence and with the highest values being found in the grids characterised by both features.For some variables, the pattern is the reverse, with employment for example being lowest in this last category of grid cells.Drug markets and gun violence are associated with areas of lower employment, a higher share of foreign-born individuals, overcrowding and higher levels of single parents.The areas with both gun violence and drug markets have the worst conditions measured in terms of the sociodemographic variables.Almost all variables have their highest means in the cells characterised by both gun violence and ODS presence.The crime variables bicycle theft and assaulting a public official, such as a police officer, have significantly higher values in cells with only ODS presence.
In order to further explore the relationship between the sociodemographic and crime variables and the level of gun violence, a regression analysis was conducted to analyse this relationship.

Predicting the Probability of Gun Violence at Micro Places
In the regression analysis, the presence of at least one gun incident was specified as the dependent variable, and the analysis explored how this variable was affected by the sociodemographic and crime variables measured at the level of the grid cells.Binary logistic regression (Table 4) was employed using SPSS version 26.
Based on the results of the regression analysis, the variables with statistically significant coefficients (*p < 0.05, **p < 0.01, ***p < 0.001) were identified as follows: proportion foreign-born, proportion with foreign-born parent, population, single parent, other household, explosions, bicycle theft, robberies and assault of public official.These variables were then used in the next stage of the analysis to generate an index to predict the likelihood of gun violence at the grid cell level.A multicollinearity test was performed using SPSS linear regression tool with no indications of multicollinearity when following the thresholds on tolerance, VIF, eigenvalue, index condition and variance proportions suggested by Montgomery et al (2021).A reliability test of the variables was also conducted, resulting in a Cronbach's alpha value of 0.765.An overview showed only minor impact on values when deleting variables.This suggests that the variables are fit for an index.

Forecasting Areas of Gun Violence
To assess whether a specific vector grid meets the model criteria for being a presumptive location for gun violence, results from the regression analysis were used to generate a weighted gun violence index.In order to predict in which cells gun violence might occur, the coefficient (B) for each (statistically significant) independent variable in Table 5 was first multiplied by the value of the respective variable for each grid cell.The weighted variable values were then added together to produce a summed index score that measures the probability of a given grid cell experiencing a gun incident.This new variable was named the gun violence predictor index.All grid cells with high scores on the index were checked to see whether any extreme values on the variables included in the index might be affecting the index results.
The vector grid index scores were then exported back into GIS and added to the maps for visualisation and analysis.The gun violence predictor index, based on the significant variables from the regression analysis, had values between − 4.62 and 7.81.The index was graded in five prediction levels with the thresholds: very low, low, medium, high and very high.This was done by sorting all grids from low to high scores on the gun violence predictor index and then analysing the range of the index.The grading was then conducted manually with cut-offs at integer scores.The threshold values were chosen on the basis of the number of grid cells included in each prediction-level group and on all three groups combined.The number of grid cells to be included in the prediction-level groups was chosen to mirror the number of gun incidents recorded in 2021, and a proximate yearly amount of cells with gun violence and also in relation to the amount of cells that ODS data comprise.Consideration was given to the indexed score values to include approximately half of the prediction value (that ranges from − 4.62 to 7.81), which would be about 1.5.The three highest index score classes were then used in the analysis.The grids within the very high level with scores 4.0-7.81(N = 93) were coloured red, those within the high level with scores 3.0-3.99(N = 240) orange and those within the medium level with scores 2.0-2.99 (N = 553) yellow.Figure 3 presents the grid cells with gun violence index scores in the three highest classes for part of the northern Stockholm area with the added gun incidents of 2021 superimposed.The area in the figure was chosen because it is the area that has experienced the highest number of shooting incidents in 2021.

Validation of Index
Finally, the cells identified using the gun violence prediction index were compared to the actual locations of the gun violence incidents recorded during 2021 in order to explore the accuracy of the predictions.Of a total of 98 recorded incidents of gun violence in 2021 (to 23 September), it was possible to geocode 95 incidents, which were then located on the map.Of these 95 incidents, 23 were located within cells with the highest predictive value (red), 16 of the 95 incidents were located in orange cells and 19 in yellow cells.In total, 61% of the gun incidents recorded to date in 2021 have occurred within grid cells with values on the gun violence prediction index that place them in one of the highest three classes of the index (which together account for a total of 886 grid cells).
The ODS cells overlapped with a rather large proportion of the gun incidents recorded during the period 2017-2020, and could also be used as predictors of future gun violence.The predictive accuracy of the three ODS categories described earlier was therefore also examined in the same way as the predicted accuracy of the gun violence prediction index (Table 6).
The use of ODSs to predict areas of future gun violence appears to be almost as accurate as the use of the gun violence index.This resulted in the next step, which involved combining the two predictions (Fig. 4).This was conducted in ArcGIS Pro and calculated using PAI.Sixty-eight percent of the gun incidents were predicted at 12% of the total cells.The combination of the two resulted in the prediction of a higher proportion of the gun incidents but with a PAI at 5.7 due to the increased number of cells.
However, the number of gun incidents is relatively small, and the results should be interpreted with caution.It might be unreliable to place too much weight on the gun violence measure, since some cells may only have experienced a single incident over the course of 4 years, which also might be random and have little to do with the surrounding area.However, the cells also cover ODSs, and these are stable over time and are not randomly distributed geographically.

Discussion and Limitations
The geography of Stockholm differs from smaller cities in Sweden and from other countries.The city structure of several larger cities in Sweden such as Stockholm and Gothenburg include a city centre and neighbourhoods in the suburbs, on the outskirts, with social challenges.In other countries, these areas are often located in the innercity neighbourhoods (Andersson, 1998).Some suburban areas of Stockholm have seen an increased spatial concentration of poverty and, with that, an increase in residential segregation and disadvantage (Scarpa, 2015).The presence of gun violence and ODSs in Stockholm is connected to the living context of these poorer neighbourhoods.A next step in understanding these connections would be to study if, similarly, socioeconomically troubled areas in an inner-city context have similar gun violence and drug market characteristics and if the predictive index could be used with similar results.In order to enhance predictive methods, attempting to replicate this article's findings in different settings would be one way forward.Additionally, it would be of importance to investigate other variables as predictors of gun violence, such as health care statistics on population well-being, drug abuse and school results, for example.It might also be possible to create indexes predicting drug markets and other gang crime-related issues.
Considering the nature of the gun violence data, it is important to be cautious about drawing firm conclusions.To begin with, the points at which the gun incidents occurred has been masked in the data, by specifying these locations at up to 100 m from the point at which the incidents occurred, and the accuracy of locational data was variable to begin with.In some cases, the accuracy is relatively good, for example where bullet casings or bullet holes have been found at a scene following reports of gunfire in the area.This varying accuracy is not portrayed in the data.The circumstances of the gun violence incidents may also affect the interpretation of the results.For example, the offender and victim may have been at a considerable distance from one another, which might place the offender at the ODS while the victim was located outside it, or vice versa.Another factor is related to the nature of gang activity, since victims of gun violence often belong to gangs, and they are more likely to be found in the areas in which they live, which are often close to the ODSs at which they are active.This means that ODS locations may function as a hunting ground for perpetrators looking for a specific victim.
The narcotic crime variable must also be interpreted with caution.Since the recording of narcotic offences is the product of police activities and prioritisations, rather than citizen reports, this variable should be interpreted as reflecting police presence more than actual crime levels.What this variable shows is rather that locations with high levels of drug crime also have a higher police presence.The data do not show if the drug crime reports are the result of uniformed patrolling or of police surveillance, for example.The police presence might also be a consequence of earlier violence or disturbances.A calmer drug market will not attract the same amount of attention and thus police will not be there detecting drug crimes to the same extent.
ODSs are locations where many criminals are present, which makes them a good place to seek out and attack those identified as the potential victims of gun violence, at least those who are involved in criminal activity, such as gang members.This may explain the high levels of gang shootings at ODSs.In relation to this, the police are also likely to focus on places where a shooting has been previously recorded, and therefore, more incidents are likely to be recorded there than elsewhere.This could artificially strengthen the relationship between locations of shootings and drug scenes, which could affect the validity of the results in this study.The ODS data is, however, not created on the basis of crime data but on the knowledge from police officers and municipality representatives.Conversely, gun violence data is not based on police initiative and contains fewer missing incidents compared to other crimes due to its loud and lethal nature.

Conclusion
There is a clear overlap between gun violence and ODS in Stockholm.The concentration of gun violence at ODS is high.All in all, the total ODS data represent 37% of gun incidents and only 0.6% of the land area in the region.
The study finds several characteristics with association of micro places with ODSs and gun violence.Overall, these places face more severe problems in terms of sociodemographic factors and other types of crime than micro places without ODSs or gun violence.The comparison in this study shows that micro places characterised by ODSs seem to be worse off than those with gun violence when it comes to crime reported.The locations of ODSs are more exposed to all the types of crime examined in the analysis.The grid cells that have been the location of gun violence are characterised by worse sociodemographic conditions than the cells with ODSs.Those grid cells with both gun violence and ODSs suffer from the worst sociodemographic conditions and have the worst levels of most of the violent crimes examined: public assault, robberies and explosions but also thefts, narcotic offences and vandalism.However, since this category is comprised of a small number of grid cells, these results should be interpreted with caution.
In the regression analysis, the variables identified as having a significant correlation with gun violence were weighted and added to produce an index indicating the probability that a grid cell would experience gun violence.The index was then validated using recent gun incidents, and was found to have high accuracy, at 10 PAI for the three highest classes of the index combined and a PAI of 40 for the grid cells in the highest class on the index.
The overall PAI for all three included index classes was 10.7, while the PAI for all ODSs was 8.6, which leads to the conclusion that knowledge of the locations of ODSs not only provides insights in the context of retrospective analysis, such as KDE analysis of the distribution of gun violence, but also adds value in predicting future gun violence.
This study has examined the relationship between ODSs and gun violence in an analysis conducted in several steps in order to enhance the precision of the available knowledge on gun violence in Stockholm.The use of several techniques has proved useful, and the process and techniques employed may be used by others, which make this study methodologically interesting, as it has tested methods that may improve our understanding of micro hot spots and the prediction of gun violence.There are several policy implications of the findings in this study.The practical relevance of these results is mainly found in the prediction of areas that are more likely than others to be exposed to gun violence.Narrowing the number and type of locations to focus on may assist in both the prioritisation of resources and collaborations among different actors such as the police, municipal and health care, in troubled areas.The overlap of gun violence and ODS indicates that targeting ODSs could have effects on drug distribution and drug use but also on the lethal violence.At a time when Stockholm police departments are prioritising all actions with possible effects on gang violence to stop the persistent increase of gun violence, crime prevention is central.The stability of ODSs also speaks to the continued prioritisation of these locations in prevention efforts, in line with the arguments of Weisburd and Telep (2011).Police presence at these micro areas over time might help not only (if conducted in a good way) strengthen the relation to the communities and build trust in a long-term perspective but also prevent or at least obstruct or move gun violence short term.An improved understanding of how the data generated at police departments may be used also hints at how the accuracy of GPS referencing and specification might be improved, by focusing not only on location but also on the circumstances in which gun incidents occur-for example whether a gun incident was drug-or gang-related.
Funding Open access funding provided by Malmö University.

Fig. 2
Fig. 2 Vector grids (light blue cells), all ODSs (red) and gun incidents (blue dots) in the northern area of Stockholm

Fig. 3
Fig.3Grid cells in the northern area of Stockholm with the three highest levels on the gun violence index, medium (yellow), high (orange) and very high (red), and gun incidents recorded in 2021 by whether they lie within the predicted areas (blue) or outside these areas (black)

Fig. 4
Fig. 4 Area of Upplands Väsby, Stockholm, with predictive index (yellow-orange), ODS (blue) squares then added and gun violence (dots).The figure shows how the addition of ODS could help in predicting micro areas of gun violence

Table 1
Overview of methodological steps

Table 2
ODS area, and the proportions of gun violence Fig. 1 KDE hot spots of gun incidents (pink to red) and ODSs (black) in Stockholm County 2017-2020

Table 3
Comparison of means; the mean value per category is shown, with significance based on independent sample t-test shown as asterisks.*p < 0.05, **p < 0.01, ***p < 0.001

Table 4
Results from binary logistic regression with gun violence as the dependent variable

Table 6
Calculation of PAI of ODSs, on gun incidents recorded in 2021