Ijgi 11 00400
Ijgi 11 00400
Geo-Information
Article
Crime Prediction and Monitoring in Porto, Portugal, Using
Machine Learning, Spatial and Text Analytics
Miguel Saraiva 1, * , Irina Matijošaitienė 2 , Saloni Mishra 2 and Ana Amante 1
1 CEGOT—Centre of Studies in Geography and Spatial Planning, Faculty of Arts and Humanities,
University of Porto, Via Panorâmica s/n, 4150-564 Porto, Portugal; [email protected]
2 Data Science Institute, Saint Peter’s University, Jersey City, NJ 07306, USA;
[email protected] (I.M.); [email protected] (S.M.)
* Correspondence: [email protected]; Tel.: +351-226-077-100
Abstract: Crimes are a common societal concern impacting quality of life and economic growth.
Despite the global decrease in crime statistics, specific types of crime and feelings of insecurity, have
often increased, leading safety and security agencies with the need to apply novel approaches and
advanced systems to better predict and prevent occurrences. The use of geospatial technologies,
combined with data mining and machine learning techniques allows for significant advances in the
criminology of place. In this study, official police data from Porto, in Portugal, between 2016 and 2018,
was georeferenced and treated using spatial analysis methods, which allowed the identification of
spatial patterns and relevant hotspots. Then, machine learning processes were applied for space-time
pattern mining. Using lasso regression analysis, significance for crime variables were found, with
random forest and decision tree supporting the important variable selection. Lastly, tweets related to
insecurity were collected and topic modeling and sentiment analysis was performed. Together, these
methods assist interpretation of patterns, prediction and ultimately, performance of both police and
planning professionals.
Citation: Saraiva, M.; Matijošaitienė,
I.; Mishra, S.; Amante, A. Crime Keywords: spatial analysis; machine learning; criminology of place; sentiment analysis; topic
Prediction and Monitoring in Porto, modeling; Portugal
Portugal, Using Machine Learning,
Spatial and Text Analytics. ISPRS Int.
J. Geo-Inf. 2022, 11, 400. https://
doi.org/10.3390/ijgi11070400 1. Introduction
Academic Editors: Jamal Crime is defined as any act that is unlawful. The existence of crime, and more impor-
Jokar Arsanjani and Wolfgang Kainz tantly the feelings of insecurity that may stem directly from it, affects quality of life and the
Received: 13 May 2022
sustainability of societies. Relevant policy and planning agendas such as the UN’s Sustainable
Accepted: 12 July 2022
Development Goals, UN Habitat’s Safer Cities Program, OECD’s well-being index [1] or the
Published: 14 July 2022
EU’s Cohesion Reports [2] clearly stress the need to create urban spaces where inhabitants
feel safe and secure. In that sense, it has long been established that traditional crime fighting
Publisher’s Note: MDPI stays neutral
responses are not, in themselves, enough [3]. Already since the 1970s, but particularly in
with regard to jurisdictional claims in
the last two decades, policing paradigms have shifted from reaction to prevention, and from
published maps and institutional affil-
analyzing just the perpetrator and contextual social factors, to take into account urban factors
iations.
associated to space, time and the generation of opportunities.
Environmental criminology principles [4–6] are thus based on three main ideas. First
that criminal behavior is significantly influenced by the contextual nature of the environ-
Copyright: © 2022 by the authors.
ment it occurs in, i.e., place matters [5], because it possesses individual characteristics that
Licensee MDPI, Basel, Switzerland. potentiate or mitigate crime. Second, the distribution of crime patterns is not random,
This article is an open access article because it is a consequence of such territorial conditions that vary in space and time. Third,
distributed under the terms and by changing the characteristics and also by channeling resources (of police, of urban design
conditions of the Creative Commons or of social or cultural intervention) to these hot-spot locations, a significant reduction in
Attribution (CC BY) license (https:// insecurity can be obtained.
creativecommons.org/licenses/by/ The proliferation of computer modelling, geographical information systems and geospa-
4.0/). tial technologies [7–9] has allowed for significant advances in crime georeferencing, mapping
and hot-spotting. Such use of spatial data and analytics to improve performance and preven-
tion has been dubbed as hot-spot policing [10,11], place-based policing [12] or even forensics
GIS [13], part of what Couldren et al. [14] have called the new paradigm of “smart policing”,
which also urges for greater integration and knowledge sharing between police organizations
and research institutes, such as universities. On one hand, increasingly advanced methods as
Space Syntax [15], as well as data mining and machine learning algorithms are being used to
understand spatial patterns and even predict occurrences, using linear methods or Bayesian
models [16–18]. These include, but are not limited to, random forest algorithm (RF) [19],
decision tree [20,21], K-nearest neighbor (KNN) [22,23], support vector machine (SVM) [24]
or artificial neural networks (ANN) [25]. On the other, authors such as Bannister et al. [26]
have recently cautioned for the increasing dependency of results derived from Big Data and
modelling algorithms, where “causation is dead, correlation is king” [26] (p. 323), because
they privilege “method over meaning by adopting a non-critical approach to the spatial and
temporal features of the data” [26] (p. 323). Furthermore, it is clear from the literature that the
use of these techniques is more prevalent in certain countries, whereas other countries are still
in the early stages of place-based policing, with a low academic and institutional culture of
crime mapping or even crime georeferencing [27].
Consequently, these advances need to be properly framed and understood in local
contexts. First, the impact that new technologies and this unprecedented capacity for
data management and spatial analysis can have on evidence-based policing needs to be
addressed. Second, how they can go beyond computation to a more holistic contribution
to decision support, in line with the sharing and shifting of responsibilities promoted by
new models of policing [28]. Third, as Andresen and Weisburd [12] suggest, how such
theories, methods and models behave outside the locations where most of them have been
developed and tested, namely outside larger metropolis and also in peripheral countries.
In this paper, these queries are addressed in a case study in Porto, Portugal. At
the western edge of Europe and recently overcoming a deep financial crisis, Portugal is
considered one of the safest countries in the world, holding the fourth worldwide position
in the Global Peace Index [29] and presenting one of the lowest victimization rates in
Europe [30], as well as a medium-threat status [31]. At the same time, it presents high fear
of crime [32], something which may be reflected on the fact that it has one of the highest
rates of police officers per inhabitant in Europe [33]. Furthermore, there is still a low crime
mapping, georeferencing and spatial analysis culture in the country [27] and very few
examples of crime modelling using space-based algorithms exist [34–36].
Using official registries of crime data from Porto’s Public Security Police from the
pre-pandemic period between January 2016 to December 2018, this paper aims to contribute
to the current literature on geospatial crime modelling by combining spatial analysis with
machine learning to create an experimental predictive model. More than the use of the
techniques themselves, the production of evidence- and space-based knowledge for urban
safety is deemed crucial at a time when often scarce local resources need to be properly
managed and integrated with planning and territorial agendas, catering for quality of life
and sustainability.
For example, Lin et al. [42], working in Taiwan, proposed a data-driven method
based on the broken windows theory to predict emerging crime hotspots, improving
model performance by accumulating data with different time scales. Of all methods tested,
deep learning algorithms, random forest and naïve Bayes provided better predictions.
For Zhang et al. [43], however, the results based on the historical crime data and using
built environment points of interests and urban road network density as co-variates to
improve performance, suggested that the deep learning long short-term memory (LSTM)
model outperformed others. In another recent study on the space-time patterns of theft
in Manhattan, where an application prototype for searching safer parking was developed,
Matijosaitiene et al. [44] discovered that linear models performed better. Comparing
five boroughs of New York city, Pinto et al. [45] also uncovered that multivariate linear
regression yielded a better accuracy at predicting the type of crime represented but decision
trees were best at predicting the borough where the crime occurred.
Such findings should imply that considering place-specific conditions, rather than univer-
sal computation (a one-method fits all approach), should guide the use of these algorithms. In-
deed, authors have applied machine learning methods to extract knowledge and predict crime
data trends with underlying place-based social, urban and economic factors. Mittal et al. [46],
for example, used machine learning in an Indian context to predict the causality between
crime rates, such as of theft, robbery and burglary, with economic indicators, observing, in
that case, that unemployment was the greatest explanatory variable.
Recurrent as well is the integration of these models with spatial analysis using geo-
graphical information systems (GIS), as a way to clarify space-time patterns, uncover spatial
determinants and overall improve the geographical hot-spot and place-based approach of
modern day Criminology of Place. For example, Bogomolov et al. [47] used aggregated
behavioral Big Data derived from mobile phones in combination with basic demographic
information, to predict if areas in London were prone to being crime hotspots or not, arriv-
ing at an accuracy of 70%. The experiments of Zhou et al. [48] arrive at similar conclusions,
uncovering high efficiency and accuracy rates using a combined approach of a non-linear
algorithms, gradient boost decision trees (GBDT) and GIS models, to assess the influence
of over one thousand factors ranging from demographic, housing, education, economy,
social and city planning. GBDT performed, in this case, better than other methods as
logistic regression (LR), support vector machines (SVM), artificial neural networks (ANN)
or random forest (RF).
Such area-specific crime prediction models, as Boni et al. [49] named them, should
recognize the geographical non-homogeneity of crime patterns, something which fits with
Weisburd’s Law of Crime Concentration [50]. In the case of Boni, hierarchical and multi-task
statistical learning was used to predict crimes at ZIP code level, through localized models
where sparseness was mitigated by sharing information across areas. Spatial-temporal
prediction through the encoding of area-specific crime incidents was also applied, for
example, by Zhang et al. [51] and Bappee et al. [52], showing results in compliance with
Weisebud’s Law. The first used histogram-based statistical methods, discriminant analysis
(LDA), and K-nearest neighbors (KNN), comparing patterns with neighborhood features
and the temporal distance to important holidays, noticing greater performance as more
fine-tuned the temporal data was. The second used hierarchical density-based spatial
clustering of applications with noise (HDBSCAN) to extract hotpoints from crime hotspots
for different categories of crime, then computing a spatial distance between the cluster
centroids (i.e., hotpoints of crime hotspots) as a feature for classifiers. In this case LR and
SVM displayed more accuracy than RF. Like those of spatial analysis, these area-specific and
space-based results of machine learning can, to a certain extent, be displayed, interpreted
and shared in web GIS applications, to assist in decision support of local authorities but
also citizens [53].
Another point of debate is how to include non-structured data, related to perceptions,
routines and overall sentiments of city dwellers. Moving beyond surveys, research has
increasingly looked into mobile phone data as a proxy for activity patterns [47,54] but
ISPRS Int. J. Geo-Inf. 2022, 11, 400 4 of 18
also extensively at social media, constructing sentiment analyses, i.e., based on emotions
derived from the study of individual messages. Many of these have used Twitter data
as a source, due to substantial use in many countries, the free availability of data and
the fact that tweets are often associated to spatial and temporal coordinates [55–59]. In
the United States, Gerber [55] showed how the use of Twitter data, through linguistic
analysis and statistical topic modeling, improved the performance of prediction models
for 19 of 25 types of crime, in comparison with a standard interpolation approach based on
kernel density estimation. In India, Thanh et al. [56] found that sentiment analysis based on
Twitter data led to results which matched with real crime rate data, whereas Wang et al. [57]
display how a model including the automatic semantic analysis of Twitter posts combined
with dimensionality reduction and prediction via linear modeling outperformed baseline
models. Using data from nearby tweets of a criminal occurrence, Siriaraya et al. [58] also used
sentiment analysis to uncover the negative characteristics of spatial areas related to different
crimes, again emphasizing the relevance of a geographical baseline in such analysis.
Contrary to sentiment analysis, not many examples are found that have used topic
modelling on crime-related data [60,61]. This method uses statistical machine learning
techniques to identify patterns (as a verbal description) in a corpus or large amount of
unstructured text. For example, Pandey et al. [60] analyzed crime reports from Los Angeles,
evaluating topic coherence against spatial concentration, in a test of the Law of Crime
Concentration. Their findings suggest that latent dirichlet allocation (LDA) generated
crime-related topics with higher coherence and crime concentration, whereas non-negative
matrix factorization (NMF) improved the coherence, but the spatial concentration was not
as high.
As Bannister et al. [26] suggest, studies like these all have data limitations related to
the representativeness of the social media data but also in connection with the accuracy of
the geographical and temporal crime data used [62]. More research is needed into models
that can cross detailed spatial analysis using GIS and official geo-temporal crime data, with
the advances in machine learning and data-mining techniques.
Other datasets included census data, obtained from the Portuguese Institute of Na-
tional Statistics [63], reporting from the last population census or more recent data, when
available. This consisted of over 150 indicators at a city block level, related to building
data (such as building type, age and type of use); dwelling data (such as size, typology,
conditions and occupancy); population data (such as age, gender or education); family data
(types, size, number of children) and employment data. Urban and land-use data were
retrieved either from official sources of Porto’s Municipality or Open Street Maps when
the first was unavailable. This includes land-use and points-of-interest; connectivity, road
network and traffic signal data; as well as the location of police stations and CCTV cameras.
Tweets for topic modeling and sentiment analysis were extracted using Snscrape [65].
A radius of 1 km from all crime data points was considered to extract the tweets, and a
specific set of terms related to crime in English and Portuguese were searched. Based on
the literature analysis, a set of crime-related terms was prepared. The list consists of over
fifty crime-related terms.
3.3. Methodology
Three types of methodological procedures were used to identify the crime pattern in
the city, forecast crime rates and then predict crime as occurs/does not occur. These were
geospatial analysis, machine learning modeling and natural language processing (NLP).
For understanding crime patterns, spatial analysis tools were applied to the dataset,
using ArcGIS 10.7.1. After all datasets were merged and the final merged dataset was
preprocessed and cleaned, crime entries were georeferenced considering street coordinates,
and then plotted with a kernel density estimation (KDE), an interpolation technique often
used in crime analysis, as it presents more precise results and is easily understood by
stakeholders [66,67]. Although there is not a consensus regarding which parameters to
use [68], authors have advocated that it is a very useful methodology to describe small
local changes [69]. For that reason, and also catering to the smaller size of Portuguese cities,
a cell size of 50 m was tested. This is smaller than those recently used in crime mapping
literature as for example 63 m [67], 90 m [70] or 100 m [71], but consistent with previous
research for Portugal [72]. Results were validated with officers from the Public Safety
Police of Porto. Further emerging hot-spot analysis was performed [73], i.e., a data-mining
technique which reveals which hot and cold spots have been maintained or changed over
space and time. A fishnet grid was used, taking into account a larger cell size.
Considering this information, a random forest algorithm was used to predict the
values of each location of a space-time cube. The tool builds two models for each location
in cube, and then forecasts the future time phase values. The fit of the model is determined
by the value of the forecast root mean square error (RMSE). A “windowing” technique is
used, when for each location of the space-time cube two random forest regression models
are built. The model uses the actual and then forecasted values to forecast the values for
the future time steps. The model with a smaller RMSE is selected as the best fit model out
of two models for each location of a space-time cube.
After understanding the point pattern of registered crimes, various machine learning
analysis based on supervised methods were performed to determine the influence of
contextual urban, morphological and socio-economic factors. Variable selection, in order
to pick the most appropriate subset of predictors for the model, thus avoiding noise,
complexity and multicollinearity issues, was carried out using LASSO regression (least
absolute shrinkage and selection operator) [74]. Then, for the crime modeling, where crime
rates were converted into a binary target—0 if no crime occurred and 1 if at least one crime
occurred—four different classification methods were applied to predict crime classes 0 “No
Crime Will Occur” or 1 “At Least One Crime Will Occur”. First logistic regression, where
the sigmoid function is used to map the predictions to probabilities, where L-1 penalty
is added to perform variable selection (i.e., to select only the most important for crime
variables out of a large number of initial variables), which shrinks the coefficients of the
less contributive variables to zero. Second, decision trees, a non-parametric supervised
ISPRS Int. J. Geo-Inf. 2022, 11, 400 6 of 18
learning method where a model is built by splitting the data records until all or most of
the records classify into their respective class labels 0 “No Crime Will Occur” or 1 “At
Least One Crime Will Occur”. Decision trees are applied with the “pruning” of leaves and
branches responsible for classification [75] to prevent tree-based model from overfitting.
Overfitting happens when the model learns very well patterns in the training data and
therefore, demonstrates a high model performance on the training data; however, it is
unable to generalize the learned patterns on a new data. Third, random forest, where a
large number of individual decision trees, constructed from samples taken from the training
set, are considered, with each predicting a class and then an ensemble method determining
the class with the most votes as the prediction of the model [76,77]. To build and train the
random forest model, a random split on the features is also performed, in addition to a
random selection of bootstrap samples. Fourth, support vector machine (SVM), which aims
to allocate hyperplanes that specifically classify data points, i.e., the ones with the greatest
difference between data points in both groups [78].
Lastly, two natural language processing methods, topic modeling and sentiment
analysis, were used. The first, through latent dirichlet allocation (LDA) [79], classifies text
in a document to a particular topic. For each document d, it processes each word w and
computes p (topic t|document d), i.e., the proportion of words in document d that are
assigned to topic t. Then p (word w|topic t), i.e., the proportion of assignments to topic
t over all documents that come from the word w. On the other hand, sentiment analysis
mines the text to identify and extract subjective information related, for example, to positive
or negative sentiments [80]. An approach is to use machine learning and different functions
to construct a classifier that can recognize sentimental text. Another, which does not include
data training, is lexicon based and uses a variety of terms annotated by the polarity score.
Both approaches can be merged into a third hybrid approach. Though, in this research,
the two methods LDA and sentiment analysis are used separately as valuable additions to
each other.
(a) (b)
Figure 1.
Figure 1. Porto’s
Porto’s registered
registered crime
crime occurrence
occurrencebetween
between2016
2016and
and2018:
2018: (a)
(a) by
by hour;
hour; (b)
(b) by
by month
month and
and
day (source: authors, based on data reports of Porto’s Public Safety Police).
day (source: authors, based on data reports of Porto’s Public Safety Police).
4.2. Spatial
4.2. Spatial and
and Temporal
TemporalPattern
Pattern
Figure 22 shows a KDE for
Figure for Porto,
Porto, based
basedon onthe
thevalues
valuesofofstreet
streetsegments.
segments.The The Law
Law of
Crime
of Crime Concentration
Concentration is isconfirmed,
confirmed,asasspecific
specificsegments
segmentsand andareas
areasofof the
the city are more
more
prone to
prone to criminal
criminal occurrences
occurrences than than others.
others. This
This happens
happens particularly
particularly inin the
the downtown
downtown
area
area (the greatest concentration)
concentration)in inand
andaround
aroundthe themain
main pedestrian/shopping
pedestrian/shopping street
street of
of the
the
city,city, Santa
Santa Catarina
Catarina Street,
Street, and
and themain
the mainsquare
squarewhere
wherethetheCity
City Hall
Hall is located (Aliados
(Aliados
Avenue),
Avenue),both bothclose
closeto
tothe
thecity’s
city’snighttime
nighttimedistrict.
district.Elsewhere,
Elsewhere,noticeable
noticeableconcentrations
concentrations
also
also occur on the northern edge of the city, where the largest university campus
occur on the northern edge of the city, where the largest university campus and and the
the
city’s
city’s main
ISPRS Int. J. Geo-Inf. 2022, 11, x FOR PEER REVIEWmain hospital are
hospital arelocated,
located,andandin other
in main
other mainavenues as
avenues Boavista
as Avenue
Boavista (to
Avenue the city’s
(to the
8 of 20
west), CampoCampo
city’s west), AlegreAlegre
Street (west
Streetof(west
the city center),
of the Constituição
city center), AvenueAvenue
Constituição (north of(north
the city
of
center),
the city Costa Cabral
center), CostaorCabral
Fernando Magalhães
or Fernando Street (toStreet
Magalhães the northeast).
(to the northeast).
Figure 2. Porto’s kernel density estimation of reported crimes from 2016 to 2018 by street segment
Figure 2. Porto’s kernel density estimation of reported crimes from 2016 to 2018 by street segment
(source: authors,
(source: authors, based
based onon data
data reportsofofPorto’s
reports Porto’sPublic
PublicSafety
SafetyPolice).
Police).
Figure 3. Emerging hotspot analysis for reported crimes (source: authors, based on data reports of
Figure 3. Emerging hotspot analysis for reported crimes (source: authors, based on data reports of
Porto’s Public Safety Police).
Porto’s Public Safety Police).
4.3. Forecasting
4.3. Forecasting
Using clustering, an unsupervised machine learning tool, it is possible to identify
Using clustering,
natural patterns an unsupervised
of clusters in the data.machine
To obtainlearning
spatialtool, it is possible
clusters of crime toin identify
regard to
natural patterns of clusters in the data. To obtain spatial clusters
census data, the latter was merged with crime data using a spatial join techniqueof crime in regard to a
(i.e.,
census data, the latter was merged with crime data using a spatial join
merged crime-census data is used as input into the clustering algorithm). Then DBSCAN technique (i.e., a
merged crime-census
clustering analysis wasdataperformed,
is used as input
where into the clustering
epsilon = 533 m algorithm). Then DBSCAN
(optimum radius for cluster
clustering
analysis) analysis
was definedwasby performed,
the “elbow” where
method epsilon
while=plotting
533 m (optimum radius
cluster distance for cluster
against a wide
analysis)
range ofwas defined
possible by the
epsilon “elbow” method while plotting cluster distance against a
values.
wide range
Then,oftopossible epsilon
forecast the crimevalues.
counts, random forest forecast tool within ArcGIS was used.
Then, to forecast the crime
Using the Breiman’s [81] extension counts,
of therandom
randomforest
forestforecast
algorithm,toolthe
within
modelArcGIS
forecastswas the
used.
valuesUsing the Breiman’s
of each space-time[81]cubeextension
location, of
in the
thisrandom forest algorithm,
case performed the model
on a cell size of 500m. fore-
The
forecasting
casts of crimes
the values of eachwas performed
space-time forlocation,
cube the twelve in months
this caseafter the dataset,
performed on afrom January
cell size of
2019 The
500m. to December
forecasting 2019. Figure 4was
of crimes demonstrates
performed forecasted crimemonths
for the twelve countsafter
on the
theunseen
dataset, test
dataJanuary
from set. The2019
forecasted crime counts
to December vary from
2019. Figure 0 to 746 per square,
4 demonstrates withcrime
forecasted the highest
countscrime
on
density
the unseenareas beingset.
test data in The
the center of the
forecasted city counts
crime and then along
vary from the main
0 to 746 axes as previously
per square, with
identified. A new hotspot location has also been indicated.
the highest crime density areas being in the center of the city and then along the main axes
as previously identified. A new hotspot location has also been indicated.
ISPRS Int.
ISPRS J. Geo-Inf.
Int. 2022,
J. Geo-Inf. 11,11,
2022, x FOR
400 PEER REVIEW 10 of9 of
2018
Figure 4. Crime forecast in Porto based on 2016 to 2018 data (source: authors, based on data reports
Figure 4. Crime forecast in Porto based on 2016 to 2018 data (source: authors, based on data reports
of Porto’s Public Safety Police).
of Porto’s Public Safety Police).
5. Machine Learning for Crime Prediction
5. Machine Learning for Crime Prediction
To apply machine learning methods for crime prediction, all datasets were spatially
To apply
joined: Crimemachine learning
data, census datamethods for crime prediction,
about buildings, all datasets were
dwellings, population, spatially
family and em-
joined: Crime data, census data about buildings, dwellings, population, family and
ployment data, urban and land-use data with points-of-interest, connectivity, road network em-
ployment data, urban and land-use data with points-of-interest,
and traffic signals, locations of police stations and CCTV cameras. connectivity, road net-
work and traffic signals, locations of police stations and CCTV cameras.
5.1. Feature Selection with Lasso Regression
5.1. Feature
LassoSelection withwas
regression Lasso Regression
applied to Porto’s crime data to select a subset of predictors that
areLasso regression
the most importantwasinapplied
terms of tocrime.
Porto’sHaving
crime data
fewertopredictors
select a subset of predictors
that have a stronger
that are the most important in terms of crime. Having fewer predictors that havetime
predictive power decreases the prediction error and minimizes the computational a
and resources,
stronger predictiveas well as prevents
power decreases thethe
prediction
predictionmodel
errorfrom
andoverfitting.
minimizesLasso regression
the computa-
usestime
tional L1 penalty that allows
and resources, as wellregression
as preventscoefficients for unimportant
the prediction model from and less important
overfitting. Lasso
predictorsuses
regression to shrink to zero.that
L1 penalty Theallows
proportion of the coefficients
regression training andfor testunimportant
sets used forandthe Lasso
less
regressionpredictors
important was 67% and 33% accordingly.
to shrink to zero. TheAproportion
positive regression coefficient
of the training andindicates
test sets that
usedas
the
for value
the of regression
Lasso the predictor was variables
67% and increases, the value A
33% accordingly. of positive
the response variable
regression also tends
coefficient
to increase. Whereas a negative regression coefficient suggests that as the
indicates that as the value of the predictor variables increases, the value of the response predictor variable
increases, the response variable tends to decrease. Variables “Population
variable also tends to increase. Whereas a negative regression coefficient suggests that with a low level
asof
schooling”
the predictorand “Percentage
variable increases, of youngsters”
the responsehave positive
variable tendscoefficients,
to decrease.and therefore,
Variables with
“Pop-
the increase
ulation with aoflowthese variables,
level crime and
of schooling” rates“Percentage
tend to increase. Whereas variables
of youngsters” “Population
have positive coef-
with a higher
ficients, education
and therefore, (university
with the increasedegree)”, “Institutional
of these families”,
variables, crime rates“Present
tend to population
increase.
Whereas variables “Population with a higher education (university degree)”, residential
(male)”, “Classic family dwellings of usual residence with 1 or 2 rooms”, “Mainly “Institu-
buildings”
tional and“Present
families”, the presence of CCTV
population have “Classic
(male)”, negativefamily
coefficients,
dwellingsandoftherefore, with the
usual residence
increase of these variables crime rates tend to decrease.
with 1 or 2 rooms”, “Mainly residential buildings” and the presence of CCTV have nega-
tive coefficients, and therefore, with the increase of these variables crime rates tend to
5.2. Classification
decrease.
Classification is a machine learning task that classifies records into classes by predicting
5.2. Classification them labels. There are many methods in the classification, in this study
and assigning
different classification algorithms were applied. For classification purposes, the target, i.e.,
Classification is a machine learning task that classifies records into classes by predict-
crime rate, is transformed into a binary variable, where 0 means “No Crime Will Occur”
ing and assigning them labels. There are many methods in the classification, in this study
and 1 means “At Least One Crime Will Occur”.
different classification algorithms were applied. For classification purposes, the target, i.e.,
ISPRS Int. J. Geo-Inf. 2022, 11, 400 10 of 18
First, logistic regression with L1 penalty was applied to identify variables that are
associated with crime as a binary target. To train and test the logistic regression model,
records in the data set were divided into 70% train and 30% test sets. Using the grid
search with cross-fold validation over a range of hyper-parameters allowed us to tune
the best alpha = 0.151 for L1 penalty that selected the most important variables for the
presence of reported crime. “Buildings with a wall structure in masonry with plate”,
“Buildings built before 1919”, “Present population (male)”, “Buildings built between 1946
and 1960”, “Buildings built between 2006 and 2011” and CCTV have negative coefficients
and, therefore, make crime less likely to occur. Whereas “Classic family dwellings of usual
residence with 1 or 2 rooms”, “Population with a low level of schooling”, “Buildings with 5
or more floors” have positive coefficients and, therefore, make crime more likely to occur.
To build the SVM classification model, the grid search with cross-fold validation
over a range of hyper-parameters allowed us to tune the best kernel = rbf, regularization
parameter C = 1 and gamma parameter = 0.1.
Crime prediction models were also built using decision tree and random forest by tuning
the hyper-parameters and using the grid search with cross-fold validation, as well as the support
vector machine. Decision tree and random forest identified the following important variables:
“Buildings (classic)”, “Residents with the 1st cycle of basic education” and “Present population
(male)”. The model comparison Table 1 advises that the random forest has the best model
performance accuracy = 0.832, recall = 0.99, precision = 0.79 and F1 score = 0.89. Random
forest also provides a set of important for crime variables. Thus, the logistic regression model
provides a detailed set of important for crime variables and impact (positive or negative) of
these variables on crime, although it underperforms based on the precision metric.
Figure 5. Spatial Distribution of tweets collected (source: authors, based on Twitter data).
Figure 5. Spatial Distribution of tweets collected (source: authors, based on Twitter data).
5.3.1. Topic Modeling (LDA)
5.3.1. Topic Modeling (LDA)
Topic modeling is a type of statistical modeling that identifies the “topics” that occur
in aTopic modeling
collection is a type of statistical
of documents. modeling allocation
Latent dirichlet that identifies the “topics”
(LDA) that occur
is the method of topic
inmodeling
a collection of documents. Latent dirichlet allocation (LDA) is the method
used in this research study. After cleaning the data (stemming, lemmatizationof topic mod-
eling used in this research study. After cleaning the data (stemming, lemmatization and
and vectorization) and tuning the hyper-parameters using grid search and cross-fold
vectorization) and tuning the hyper-parameters using grid search and cross-fold valida-
validation, the LDA model was run, and the value of Log likelihood −56,491 and perplexity
tion, the LDA model was run, and the value of Log likelihood −56,491 and perplexity
134.68 was computed. Topics with different weights of tweets were computed (Figure 6),
134.68 was computed. Topics with different weights of tweets were computed (Figure 6),
and from these topics, concerns of dwellers may be understood. The higher the weight,
and from these topics, concerns of dwellers may be understood. The higher the weight,
the bigger the word in the word cloud. As above seen, ordinary people may not directly
the bigger the word in the word cloud. As above seen, ordinary people may not directly
tweet about crime; newspapers seem mostly to do that in Porto. So, words such as theft,
tweet about crime; newspapers seem mostly to do that in Porto. So, words such as theft,
burglary, battery, violence are not very common in the topics. On the contrary, other words
burglary, battery, violence are not very common in the topics. On the contrary, other
moremore
words related to thetosense
related of insecurity,
the sense including
of insecurity, crime,
including police,
crime, police
police, arrest,
police prison,
arrest, murder,
prison,
influence, people or injury, have high weight in their respective topics
murder, influence, people or injury, have high weight in their respective topics (Some (Some non-topics
such as “thcmbzzbo”
non-topics or “mgruq” appear in this figure. This can be derived from incorrect
ISPRS Int. J. Geo-Inf. 2022, 11, x FOR PEER REVIEWsuch as “thcmbzzbo” or “mgruq” appear in this figure. This can be derived 13 of 20
from incorrect spellings orlanguage”
spellings or a “personal a “personal used in the tweets.
language” used inIfthe
a term does
tweets. If not make
a term sense
does notand is
not asense
make knownandabbreviation
is not a known or abbreviation
slang, it wasor removed
slang, it during text preprocessing).
was removed during text prepro-
cessing).
Figure 6. Five topics resulting from the LDA modeling (source: authors, based on Twitter data).
Figure 6. Five topics resulting from the LDA modeling (source: authors, based on Twitter data).
5.3.2.
5.3.2. Sentiment
Sentiment Analysis
Analysis
Sentiment
Sentiment analysis is
analysis is the
the mining
mining of of text
text which
which identifies
identifies and
and extracts
extracts subjective
subjective in-
in-
formation of sentiment/opinion that can be positive or negative. For this
formation of sentiment/opinion that can be positive or negative. For this analysis, analysis, the the
AFINN lexicon-based method
AFINN lexicon-based methodwas wasused.
used.AFINN
AFINNisisa alist
listofof words
words rated
rated forfor valence
valence with
with an
an integer between minus five (negative) and plus five (positive). Figure 7
integer between minus five (negative) and plus five (positive). Figure 7 presents the word presents the
word
cloudsclouds of positive
of positive and negative
and negative sentiments
sentiments found infound in the analysis.
the Tweeter Tweeter Tweets
analysis. Tweets
including
including
words such words such
as love, as love,
god, win, god,
bookwin, book or awesome
or awesome have highhave high frequency
frequency in the
in the most most
positive
positive sentiments,
sentiments, whereas whereas
tweets suchtweets such assentenced,
as prison, prison, sentenced,
killed and killed andmake
profane profanethemake
most
the most negative
negative sentiments.sentiments.
Figure 7.
Figure Word clouds
7. Word of the
clouds of the most
most positive
positive and
and most
most negative sentiments based
negative sentiments based on
on the
the sentiment
sentiment
analysis of
analysis of tweets
tweets (source:
(source: authors,
authors, based
based on
on Twitter
Twitter data).
data).
Figure 8 demonstrates that the tweets have mostly a negative sentiment (negative
Figure
values), 8 demonstrates
in line with what was that the tweets
discussed haveThe
above. mostly
mostanegative
negativesegments
sentimentare(negative
tweeted
values), in line with what was discussed above. The most negative segments are tweeted
actually a little outside the main registered crime hotspots of the city center, to the southeast
actually a little outside
(in the Fontainhas the main
and Campo 24registered
de Agostocrime hotspots ofand
neighborhoods) the to
city
thecenter, to the(around
northwest south-
east (in the Fontainhas and Campo 24 de Agosto neighborhoods) and to the
the main football stadium of the city). Negative sentiments are also seen in the middle northwest
(around
of Boavistathe Avenue,
main football
to thestadium
west, theof the
newcity). Negative
hotspot. sentiments
On the contrary,are also
the mostseen in the
positive
middle of Boavista Avenue, to the west, the new hotspot. On the contrary, the most areas, posi-
ISPRS Int. J. Geo-Inf. 2022, 11, x FOR PEER REVIEW (2 being the maximum found in the [−5; 5] scale) are located in non-crime
sentiments 14 of 20
tive sentiments (2 being the maximum found in the [−5; 5] scale) are located
such as Lordelo parish, the commercial/industrial area northwest and around the Orientalin non-crime
areas, suchatasthe
City Park, Lordelo
easternparish, the
edge of thecommercial/industrial
city. area northwest and around the
Oriental City Park, at the eastern edge of the city.
Figure 8. Spatial distribution of sentiment scores (source: authors, based on Twitter data).
Figure 8. Spatial distribution of sentiment scores (source: authors, based on Twitter data).
dwellings can appear as a catalyst for and against crime rates, depending on the method.
However, even though the random forest prediction model demonstrated the best perfor-
mance results (recall = 0.99 and precision = 0.79), we suggest applying results derived from
the logistic regression, as it provides a broader set of important for crime variables with a
direction of their effect on crime (positive or negative), as well as the size of that effect.
Overall, these results align with previous research. Higher density, walkable neighbor-
hoods, a higher education and being a male are associated with lower fear of crime, whereas
house characteristics do not display an unequivocal relationship [90]. Street population is
strongly and positively related to crime, particularly female, as is concentrated disadvan-
tage at the community level [89] and the presence of high-risk juveniles [91]. These studies
also call attention to variables of collective efficacy. This was not directly approached in
this research, but the topic modeling (LDA) of the Twitter data, although these data are
also restricted in terms of users, themes and size of information (and hence cannot be
deemed as an overall substitute for surveys, interviews and workshops with residents)
was able to provide an expedite way to make a first iteration of how inhabitants feel about
the city. As was to be expected, sentiments are mostly negative in discussing insecurity,
close to the areas with higher rates of reported crime (the city center and Boavista) but also
areas that are highly stigmatized and command media attention (such as the Cerco social
neighborhood). Words such as “police”, “murder”, “injury” or “killed” reveal negative
sentiments in these locations, while there is a close association of areas with low crime
rates, such as green parks, with positive sentiments and words.
Such findings clearly reveal the importance of explanatory and predictive models
in decision support and may steer the definition of place-specific policies but should
be approached with caution. The capacity for pattern analysis is insightful and should
definitely be a part of area diagnosis and monitoring. However, research should not end
there, and the dependency of Big Data also hides great “dangers”, if meaning is lost [26].
First because correlation does not mean causality, and second, because, as discussed above,
since micro-scale locations are complex urban and social systems, important variables
related to personal and perceptual issues (for example those related to collective efficacy or
defensible space) may be lost in computation or not computed at all. Universal algorithms
and methods should be replaced by a deeper modelling and spatial understanding, and
model outcomes should be the object of critique. After the identification of hotspots, a
second stage of analysis should delve deeper into urban space, looking for the tangible and
the intangible, understanding how quantifiable variables correlate at the micro-scale but
also investigating the not immediately quantifiable, as community policing or CPTED teams
have been doing for the recent decades. This way, spatial analysis and machine learning
methods can effectively be used to properly frame these interventions, and more research and
discussion in the scientific literature is required to raise awareness, increase know-how and
avoid the fallacy of the “model for the model” of the “model without meaning”.
References
1. Organisation for Economic Co-operation and Development. How’s Life? OECD Publishing: Paris, France, 2020.
2. My Region, My Europe, Our Future—Seventh Report on Economic, Social and Territorial Cohesion; European Commission:
Luxembourg, 2017.
3. Brantingham, P.L.; Brantingham, P.J. Situational crime prevention in practice. Can. J. Criminol. 1990, 32, 17. [CrossRef]
4. Andresen, M.A. Environmental Criminology: Evolution, Theory, and Practice; Routledge: New York, NY, USA, 2014.
5. Weisburd, D.; Eck, J.; Braga, A.; Telep, C.W.; Cave, B. Place Matters: Criminology for the Twenty-First Century; Cambridge University
Press: New York, NY, USA, 2016.
6. Wortley, R.; Townsley, M. Environmental Criminology and Crime Analysis; Routledge: New York, NY, USA, 2016.
7. Leitner, M. Crime Modeling and Mapping Using Geospatial Technologies; Springer Science & Business Media: Berlin, Germany, 2013;
Volume 8.
8. Chainey, S.; Ratcliffe, J. GIS and Crime Mapping; John Wiley & Sons: Hoboken, NJ, USA, 2013.
9. Kannan, M.; Singh, M. Geographical Information System and Crime Mapping; CRC Press: Boca Raton, FL, USA, 2020.
10. Braga, A.; Papachristos, A.; Hureau, D. Hot spots policing effects on crime. Campbell Syst. Rev. 2012, 8, 1–96. [CrossRef]
11. Weisburd, D.; Telep, C.W. Hot spots policing: What we know and what we need to know. J. Contemp. Crim. Justice 2014,
30, 200–220. [CrossRef]
12. Andresen, M.A.; Weisburd, D. Place-based policing: New directions, new challenges. Polic. Int. J. 2018, 41, 310–313. [CrossRef]
13. Elmes, G.A.; Roedl, G.; Conley, J. Forensic GIS: The Role of Geospatial Technologies for Investigating Crime and Providing Evidence;
Springer: Dordrecht, The Netherlands, 2014; Volume 11.
14. Coldren, J.R.; Huntoon, A.; Medaris, M. Introducing smart policing: Foundations, principles, and practice. Police Q. 2013,
16, 275–286. [CrossRef]
15. Attig, S. The Organic Pattern of Space: A Space Syntax Analysis of Natural Streets and Street Segments for Measuring Crime and
Traffic Accidents (Dissertation). 2019. Available online: http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-264938 (accessed on
1 April 2022).
16. Jordan, M.I.; Mitchell, T.M. Machine learning: Trends, perspectives, and prospects. Science 2015, 349, 255–260. [CrossRef]
[PubMed]
17. Zhao, X.; Tang, J. Modeling temporal-spatial correlations for crime prediction. In Proceedings of the 2017 ACM on Conference on
Information and Knowledge Management, Singapore, 6–10 November 2017; pp. 497–506.
18. Babakura, A.; Sulaiman, M.N.; Yusuf, M.A. Improved method of classification algorithms for crime prediction. In Proceedings of
the 2014 International Symposium on Biometrics and Security Technologies (ISBAST), Kuala Lumpur, Malaysia, 26 August 2014;
IEEE: Piscataway, NJ, USA; pp. 250–255.
19. Alves, L.G.; Ribeiro, H.V.; Rodrigues, F.A. Crime prediction through urban metrics and statistical learning. Phys. A Stat. Mech. Its
Appl. 2018, 505, 435–443. [CrossRef]
20. Ivan, N.; Ahishakiye, E.; Omulo, E.O.; Taremwa, D. Crime Prediction Using Decision Tree (J48) Classification Algorithm. Int. J.
Comput. Inf. Technol. 2017, 6, 188–195.
21. Nasridinov, A.; Ihm, S.Y.; Park, Y.H. A decision tree-based classification model for crime prediction. In Information Technology
Convergence; Springer: Dordrecht, The Netherlands, 2013; pp. 531–538.
22. Tayal, D.K.; Jain, A.; Arora, S.; Agarwal, S.; Gupta, T.; Tyagi, N. Crime detection and criminal identification in India using data
mining techniques. AI Soc. 2015, 30, 117–127. [CrossRef]
23. Sivaranjani, S.; Sivakumari, S.; Aasha, M. Crime prediction and forecasting in Tamilnadu using clustering approaches. In
Proceedings of the 2016 International Conference on Emerging Technological Trends (ICETT), Kollam, India, 21–22 October 2016;
IEEE: Piscataway, NJ, USA; pp. 1–6.
24. Kianmehr, K.; Alhajj, R. Effectiveness of support vector machine for crime hot-spots prediction. Appl. Artif. Intell. 2008,
22, 433–458. [CrossRef]
25. Memon, Q.A.; Mehboob, S. Crime investigation and analysis using neural nets. In Proceedings of the 7th International Multi
Topic Conference, 2003. INMIC 2003, Islamabad, Pakistan, 8–9 December 2003; IEEE: Piscataway, NJ, USA; pp. 346–350.
26. Bannister, J.; O’Sullivan, A.; Bates, E. Place and time in the Criminology of Place. Theor. Criminol. 2019, 23, 315–332. [CrossRef]
27. Saraiva, M.; Amante, A.; Marques, T.; Ferreira, M.; Maia, C. Perfis territoriais de criminalidade em Portugal (2009–2019). Finisterra
2021, 56, 49–73. [CrossRef]
28. Freilich, J.D.; Newman, G.R. Situational Crime Prevention Oxford Research Encyclopedia of Criminology and Criminal Justice; Oxford
University Press: Oxford, UK, 2017.
ISPRS Int. J. Geo-Inf. 2022, 11, 400 16 of 18
29. Individualized Education Program. Global Peace Index 2021: Measuring Peace in a Complex World. 2021. Available online:
https://www.visionofhumanity.org/wp-content/uploads/2021/06/GPI-2021-web-1.pdf (accessed on 1 April 2022).
30. Grangeia, H.; Cruz, O.; Teixeira, R.; Alves, P. Vulnerabilidades urbanas: O caso da criminalidade associada às ourivesarias na
cidade do Porto. Rev. Latit. 2013, 7, 69–89.
31. Country Security Report. 2020. Available online: https://www.osac.gov/Country/Portugal/Content/Detail/Report/3e50b674
-78b2-4997-8950-188df6d2cadf (accessed on 1 April 2022).
32. Tulumello, S. Segurança urbana: Tendências globais, contradições portuguesas e tempos de crise. Cid. Em Reconstrução. Leituras
Círitcas 2018, 2008–2018, 73–80.
33. Eurostat. Crime and Criminal Justice Statistics. 2016. Available online: http://ec.europa.eu/eurostat/statistics-explained/index.
php/MainPage (accessed on 1 April 2022).
34. Ferreira, J.; João, P.; Martins, J. GIS for crime analysis-geography for predictive models. Electron. J. Inf. Syst. Eval. 2012, 15, 36–49.
35. João, P. Modelo Preditivo de Criminalidade: Georeferenciação ao Concelho de Lisboa. Master’s Thesis, Universidade Nova de
Lisboa, Lisboa, Portugal, 2009.
36. Rodrigues, T.M.F.; Inácio, A.A.; Araújo, D.; Painho, M.; Henriques, R.; Cabral, P.d.C.B.; Oliveira, T.H.; Neto, M.d.C.
SIM4SECURITY. In V Congresso Português de Demografia; A forecast and spatial analysis model for homeland security. Portugal
2030; Fundação Calouste Gulbenkian: Lisbon, Portugal, 2016.
37. Innes, M.; Roberts, C.; Preece, A.; Rogers, D. Ten “Rs” of social reaction: Using social media to analyse the “post-event” impacts
of the murder of Lee Rigby. Terror. Political Violence 2018, 30, 454–474. [CrossRef]
38. Hu, S.; Gao, S.; Wu, L.; Xu, Y.; Zhang, Z.; Cui, H.; Gong, X. Urban function classification at road segment level using taxi trajectory
data: A graph convolutional neural network approach. Comput. Environ. Urban Syst. 2021, 87, 101619. [CrossRef]
39. Wu, H.; Lin, A.; Xing, X.; Song, D.; Li, Y. Identifying core driving factors of urban land use change from global land cover products
and POI data using the random forest method. Int. J. Appl. Earth Obs. Geoinf. 2021, 103, 102475. [CrossRef]
40. Abouheaf, M.; Qu, S.; Gueaieb, W.; Abielmona, R.; Harb, M. Responding to illegal activities along the Canadian coastlines using
reinforcement learning. In Proceedings of the IEEE Instrumentation & Measurement Magazine, Catania, Italy, 12 April 2021;
Volume 24, pp. 118–126. [CrossRef]
41. Petrossian, G.A. Preventing illegal, unreported and unregulated (IUU) fishing: A situational approach. Biol. Conserv. 2015,
189, 39–48. [CrossRef]
42. Lin, Y.L.; Chen, T.Y.; Yu, L.C. Using machine learning to assist crime prevention. In Proceedings of the 2017 6th IIAI Interna-
tional Congress on Advanced Applied Informatics (IIAI-AAI), Hamamatsu, Japan, 9–13 July 2017; IEEE: Piscataway, NJ, USA;
pp. 1029–1030.
43. Zhang, X.; Liu, L.; Xiao, L.; Ji, J. Comparison of machine learning algorithms for predicting crime hotspots. IEEE Access 2020,
8, 181302–181310. [CrossRef]
44. Matijosaitiene, I.; McDowald, A.; Juneja, V. Predicting safe parking spaces: A machine learning approach to geospatial urban and
crime data. Sustainability 2019, 11, 2848. [CrossRef]
45. Pinto, M.; Wei, H.; Konate, K.; Touray, I. Delving into factors influencing New York crime data with the tools of machine learning.
J. Comput. Sci. Coll. 2020, 36, 61–70.
46. Mittal, M.; Goyal, L.M.; Sethi, J.K.; Hemanth, D.J. Monitoring the impact of economic crisis on crime in India using machine
learning. Comput. Econ. 2019, 53, 1467–1485. [CrossRef]
47. Bogomolov, A.; Lepri, B.; Staiano, J.; Oliver, N.; Pianesi, F.; Pentland, A. Once upon a crime: Towards crime prediction from
demographics and mobile data. In Proceedings of the 16th International Conference on Multimodal Interaction, Istanbul, Türkiye,
12–16 November 2014; pp. 427–434.
48. Zhou, J.; Li, Z.; Ma, J.J.; Jiang, F. Exploration of the hidden influential factors on crime activities: A big data approach. IEEE Access
2020, 8, 141033–141045. [CrossRef]
49. Al Boni, M.; Gerber, M.S. Area-specific crime prediction models. In Proceedings of the 2016 15th IEEE International Conference
on Machine Learning and Applications (ICMLA), Anaheim, CA, USA, 18–20 December 2016; IEEE: Piscataway, NJ, USA;
pp. 671–676.
50. Weisburd, D. The law of crime concentration and the criminology of place. Criminology 2015, 53, 133–157. [CrossRef]
51. Zhang, Q.; Yuan, P.; Zhou, Q.; Yang, Z. Mixed spatial-temporal characteristics based crime hot spots prediction. In Proceedings of
the 2016 IEEE 20th International Conference on Computer Supported Cooperative Work in Design (CSCWD), Nanchang, China,
4–6 May 2016; IEEE: Piscataway, NJ, USA; pp. 97–101.
52. Bappee, F.K.; Junior, A.S.; Matwin, S. Predicting crime using spatial features. In Proceedings of the Canadian Conference on
Artificial Intelligence, Toronto, Canada, 8–11 May 2018; Springer: Cham, Switzerland; pp. 367–373.
53. Chen, Y. Crime Mapping Powered by Machine Learning and Web GIS. Ph.D. Thesis, California State University, Northridge, CA,
USA, 2019.
54. He, L.; Páez, A.; Jiao, J.; An, P.; Lu, C.; Mao, W.; Long, D. Ambient population and larceny-theft: A spatial analysis using mobile
phone data. ISPRS Int. J. Geo-Inf. 2020, 9, 342. [CrossRef]
55. Gerber, M. Predicting crime using Twitter and kernel density estimation. Decis. Support Syst. 2014, 61, 115–125. [CrossRef]
ISPRS Int. J. Geo-Inf. 2022, 11, 400 17 of 18
56. Vo, T.; Sharma, R.; Kumar, R.; Son, L.H.; Pham, B.T.; Tien Bui, D.; Priyadarshini, I.; Sarkar, M.; Le, T. Crime rate detection using
social media of different crime locations and Twitter part-of-speech tagger with Brown clustering. J. Intell. Fuzzy Syst. 2020,
38, 4287–4299, (Preprint). [CrossRef]
57. Wang, X.; Gerber, M.S.; Brown, D.E. Automatic crime prediction using events extracted from twitter posts. In Proceedings of
the International Conference on Social Computing, Behavioral-Cultural Modeling, and Prediction, College Park, MD, USA,
3–5 April 2012; Springer: Berlin, Heidelberg; pp. 231–238.
58. Siriaraya, P.; Zhang, Y.; Wang, Y.; Kawai, Y.; Mittal, M.; Jeszenszky, P.; Jatowt, A. Witnessing crime through Tweets: A crime
investigation tool based on social media. In Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in
Geographic Information Systems, Chicago, IL, USA, 5–8 November 2019; pp. 568–571.
59. El Hannach, H.; Benkhalifa, M. WordNet based implicit aspect sentiment analysis for crime identification from twitter. Int. J. Adv.
Comput. Sci. Appl. 2018, 9, 150–159. [CrossRef]
60. Pandey, R.; Mohler, G.O. Evaluation of crime topic models: Topic coherence vs. spatial crime concentration. In Proceedings of the
2018 IEEE International Conference on Intelligence and Security Informatics (ISI), Miami, FL, USA, 9–11 November 2018; IEEE:
Piscataway, NJ, USA; pp. 76–78.
61. Kuang, D.; Brantingham, P.J.; Bertozzi, A.L. Crime topic modeling. Crime Sci. 2017, 6, 12. [CrossRef]
62. Tompson, L.; Johnson, S.; Ashby, M.; Perkins, C.; Edwards, P. UK open source crime data: Accuracy and possibilities for research.
Cartogr. Geogr. Inf. Sci. 2015, 42, 97–111. [CrossRef]
63. Instituto Nacional de Estatistica. Main Indicators. Instituto Nacional de Estatistica (INE), Lisbon, Portugal. 2012. Available online:
http://www.ine.pt/xportal/xmain?xpid=INE&xpgid=inemain (accessed on 1 April 2022).
64. Saraiva, M.; Amante, A. Geografia do bem-estar: Insegurança: O caso dos crimes contra as pessoas no Grande Porto. In Geografia
do Porto; Fernandes, R., Ed.; Book Cover: Porto, Portugal, 2020; pp. 202–211. ISBN 9789898898517.
65. GitHub—JustAnotherArchivist/Snscrape: A Social Website. Available online: www.github.com/JustAnotherArchivist/snscrape
(accessed on 1 April 2022).
66. Chainey, S.; Tompson, L.; Uhlig, S. The utility of hotspot mapping for predicting spatial patterns of crime. Secur. J. 2008, 21, 4–28.
[CrossRef]
67. Kalinic, M.; Krisp, J.M. Kernel density estimation (KDE) vs. hot-spot analysis–detecting criminal hot spots in the city of San
Francisco. In Proceedings of the 21 Conference on Geo-Information Science, Lund, Sweden, 12–15 June 2018.
68. Eck, J.; Chainey, S.; Cameron, J.; Wilson, R. Mapping Crime: Understanding Hotspots; U.S. Department of Justice Office of Justice
Programs: Washington, DC, USA, 2005.
69. Jansenberger, E.M.; Staufer-Steinnocher, P. Dual kernel density estimation as a method for describing spatio-temporal changes
in the upper Austrian food retailing market. In Proceedings of the 7th AGILE Conference on Geographic Information Science,
Heraklion, Crete, Greece, 29 April – 1 May 2004.
70. Chainey, S.P. Examining the influence of cell size and bandwidth size on kernel density estimation crime hotspot maps for
predicting spatial patterns of crime. Bull. Geogr. Soc. Liege 2013, 60, 7–19.
71. Hu, Y.; Wang, F.; Guin, C.; Zhu, H. A spatio-temporal kernel density estimation framework for predictive crime hotspot mapping
and evaluation. Appl. Geogr. 2018, 99, 89–97. [CrossRef]
72. Meneses, B.M.; Reis, E.; Reis, R.; Vale, M.J. The effects of land use and land cover geoinformation raster generalization in the
analysis of LUCC in Portugal. ISPRS Int. J. Geo-Inf. 2018, 7, 390. [CrossRef]
73. Ord, J.K.; Getis, A. Local spatial autocorrelation statistics: Distribution issues and an application. Geogr. Anal. 1995, 27, 286–306.
[CrossRef]
74. Tibshirani, R. Regression shrinkage and selection via the lasso. J. R. Stat. Soc. Ser. B (Methodol.) 1996, 58, 267–288. [CrossRef]
75. Du, W.; Zhan, Z. Building Decision Tree Classifier on Private Data. Electrical Engineering and Computer Science. 2002. Available
online: https://surface.syr.edu/eecs/8 (accessed on 1 April 2022).
76. Ho, T.K. Random decision forests. In Proceedings of the 3rd International Conference on Document Analysis and Recognition,
Montreal, QC, Canada, 14–16 August 1995; IEEE: Piscataway, NJ, USA; Volume 1, pp. 278–282.
77. Ho, T.K. The random subpace method for constructing decision forests. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 832–844.
78. Wang, L. (Ed.) Support Vector Machines: Theory and Applications; Springer Science & Business Media: Berlin, Germany, 2005;
Volume 177.
79. Blei, D.M.; Ng, A.Y.; Jordan, M.I. Latent dirichlet allocation. J. Mach. Learn. Res. 2003, 3, 993–1022.
80. Liu, B. Sentiment analysis and subjectivity. Handb. Nat. Lang. Processing 2010, 2, 627–666.
81. Breiman, L. Bagging predictors. Mach. Learn. 1996, 24, 123–140. [CrossRef]
82. Lasierra, F.G. Detecting and tackling the different levels of subjective security1. In The Dimensions of Insecurity in Urban Areas;
Barabás, A.T., Ed.; National Institute of Budapest: Budapest, Hungary, 2018.
83. Solymosi, R.; Bowers, K.; Fujiyama, T. Mapping fear of crime as a context-dependent everyday experience that varies in space
and time. Leg. Criminol. Psychol. 2015, 20, 193–211. [CrossRef]
84. LeBeau, J.L.; Leitner, M. Introduction: Progress in research on the geography of crime. Prof. Geogr. 2011, 63, 161–173. [CrossRef]
85. Bunting, R.J.; Chang, O.Y.; Cowen, C.; Hankins, R.; Langston, S.; Warner, A.; Yang, X.; Louderback, E.R.; Roy, S.S. Spatial patterns
of larceny and aggravated assault in Miami–Dade County, 2007–2015. Prof. Geogr. 2018, 70, 34–46. [CrossRef]
ISPRS Int. J. Geo-Inf. 2022, 11, 400 18 of 18
86. Hunt, P.; Kilmer, B.; Rubin, J. Development of a European Crime Report: Improving Safety and Justice with Existing Crime and Criminal
Justice Data; RAND Europe: Cambridge, UK, 2011.
87. Partnership on Security in Public Spaces (PSPS). Action Plan Urban Agenda Partnership Security in Public Spaces. 2021. Available
online: https://ec.europa.eu/futurium/en/system/files/ged/final_action_plan_security_in_public_spaces.pdf (accessed on
1 April 2022).
88. Weisburd, D.; White, C.; Wooditch, A. Does collective efficacy matter at the micro geographic level?: Findings from a study of
street segments. Br. J. Criminol. 2020, 60, 873–891. [CrossRef] [PubMed]
89. Weisburd, D.; White, C.; Wire, S.; Wilson, D.B. Enhancing informal social controls to reduce crime: Evidence from a study of
crime hot spots. Prev. Sci. 2021, 22, 509–522. [CrossRef]
90. Foster, S.; Giles-Corti, B.; Knuiman, M. Neighbourhood design and fear of crime: A social-ecological examination of the correlates
of residents’ fear in new suburban housing developments. Health Place 2010, 16, 1156–1165. [CrossRef]
91. Weisburd, D.; Groff, E.R.; Yang, S.M. Understanding and controlling hot spots of crime: The importance of formal and informal
social controls. Prev. Sci. 2014, 15, 31–43. [CrossRef]