Ver en Español
Analysis of Crime Near Tourist Sites in Medellín
Jun 24, 2026
Updated: Jun 25, 2026

Analysis of Crime Near Tourist Sites in Medellín

Much has been said about the insecurity of a city, and even more so when the city has many tourist attractions. Could we then say that most criminal acts happen near or far from a city's tourist attractions? This article analyzes the behavior of crime near the tourist attractions of the city of Medellín using data analysis techniques.

Introduction

Crime is inherent to human conduct and has existed throughout the history of humanity. Countries today fight this phenomenon day after day, and it is classified into many types and modalities. Colombia is no exception, since it has a particularly high crime rate that we can associate with its contemporary history [1].

This problem has been reflected across the territory, especially in its main cities such as Bogotá, Cali, Barranquilla, and Medellín; the latter is the object of our study. During its recent history, Medellín reached rates of 400 homicides per 100,000 inhabitants, and even contributed 6,809 homicides in a single year between 1990 and 1993. But the city has recovered in recent years, significantly lowering these homicide rates: 34 in 2007, 52 in 2012, 38 in 2013, and fewer than 20 per 100,000 inhabitants in 2015. The city has managed to break the stigma before the world, achieving important advances in development, security, and infrastructure that earned it the Most Innovative City award in 2013 [2].

This important award had a high impact worldwide, driving a tourism boom. For this reason, it is common to see people of different nationalities on the city's streets, intrigued by its history.

Given all of the above, this article addresses the following hypothesis: "most criminal acts happen near tourist sites" (where "near" is defined as a distance between 0 and 2 km from the tourist site's location). Using the collected data, we will demonstrate whether this hypothesis holds, and then draw conclusions about crime in the city and how it is reflected in the most important sites, which also attract high foot traffic from both foreign and local visitors.

Definitions

  • Homicide: According to the United Nations Office on Drugs and Crime (UNODC), "intentional homicide is the crime par excellence. Its unquestionable physical consequences, manifested in a dead body, also make it the most categorical and measurable" [3].
  • Theft: "The act of taking a movable thing belonging to another for profit" [4].
  • Tourist site: "Tourism is understood as the set of activities that people carry out during their trips and stays in places other than their usual environment, for a consecutive period of less than a year, for leisure, business, and other tourism purposes, as long as it is not to carry out a paid activity in the place visited" [5].

Development

### Selecting the data sets

The first step was to find data sets useful for building the data warehouse that would allow us to analyze the information and make decisions to confirm or reject the hypothesis. On the Open Data Medellín site [7] we took the data set relating the city's tourist sites, classified as must see and non must see, with their respective location (latitude and longitude) and the name of the comuna. To evaluate the hypothesis, we took the must see tourist attractions.

We also looked for another data set to visualize the different crimes that occurred in Medellín. On medata.gov.co we found the historical record of thefts and homicides, since these are the most common crimes related to our hypothesis. Joining the two data sets left many records (more than 90,000) but many empty cells, so all records without information were removed, which meant dropping victim fields such as occupation, witness, disability, and education level, among others. Only the cases from January to October 2019 were kept, since there was no data for the end of the year, but that still left 33,900 records from which good conclusions could be drawn.

The resulting crime data set for Medellín also had latitude and longitude fields, but, unlike the tourist sites data set, its data was grouped by neighborhood rather than by comuna. We therefore looked up which neighborhood each tourist site was located in, to share a common "neighborhood" field and more precisely compute the distance between the crime and the tourist site's location, and thus evaluate whether crimes occurred near or far.

### Joining the data sets

To join the two data sets, a manual process was used, since attempts with Python and BigQuery were unsuccessful. We needed a new file where, for each crime, it reported whether the neighborhood of its location had a tourist site or, otherwise, the text "not applicable". In BigQuery the database had to be "normalized", that is, a single crime and tourist site per neighborhood, but our source had several records per neighborhood, so a "VLOOKUP" was performed on the "Neighborhoods" field.

To find the distance between two points, we used Python with the Haversine formula, an equation used to compute the distance between two geographic points from their longitudes and latitudes. This method gives more accurate distances because it accounts for the angle between a given location's line and the equatorial plane [8].

Here R is the radius of the Earth (6373 km), lon1/lat1 are the longitude and latitude of the first point, and lon2/lat2 those of the second. The Python code, now corrected so it runs, is the following:

import csv
from math import sin, cos, sqrt, atan2, radians

R = 6373.0  # radius of the Earth in kilometers

with open("criminalidad_medellin.csv") as csv_file:
    reader = csv.reader(csv_file)
    next(reader, None)  # skip the header
    for row in reader:
        # Adjust these indexes to your CSV's real columns
        lat1 = radians(float(row[0]))  # crime latitude
        lon1 = radians(float(row[1]))  # crime longitude
        lat2 = radians(float(row[2]))  # tourist site latitude
        lon2 = radians(float(row[3]))  # tourist site longitude

        dlon = lon2 - lon1
        dlat = lat2 - lat1

        a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
        c = 2 * atan2(sqrt(a), sqrt(1 - a))

        # R is already in km, so R * c is the distance in km (no dividing by 1000)
        distance = R * c

        print(f"{distance:.2f}")

Note on the fixes to the original code: the import said coss (it should be cos); the for loop was missing its colon and body indentation; the latitude and longitude variables were not read from each row; the result was wrongly divided by 1000 (with R in km, R * c is already in km); and the print used an invalid format string.

With this, the analysis was done to understand at what distance from the tourist attraction each crime was committed. A sample of the results:

  • Theft: 1.06 km, Calazans neighborhood.
  • Homicide: 2.06 km, Manrique neighborhood.

### Modeling the data warehouse

As a first step, different diagrams were drawn to model the data warehouse, such as the Cube and the Star Schema.

Note: the cube was built with the dimensions of time, tourist site, and type of weapon used in the crime, to represent the total crimes that occurred near the Museum of Modern Art, Plaza Botero, and the UD Atanasio Girardot in the first three quarters of 2019, where a firearm, scopolamine, or no weapon was used to attack the victim.

To refute or confirm the study's hypothesis, questions were posed that would guide us not only toward solving the hypothesis but toward contextualizing the current state of this problem:

In the city, during 2019, there were 33,900 crimes, where 99% of the cases were thefts from people, with 33,572 cases.

Following the above finding, we investigated the most frequent crime modality, with three standing out in particular: mugging, with 16,500 cases, and a minimal difference between second and third place (carelessness and pickpocketing). The other modalities are not as significant as the first three.

Knowing the most common modalities, we determined the time of day with the most cases, in order to contextualize when the greatest risk occurs. Although there is a slight difference, we can consider the city to be more dangerous at night.

Given the above, we consulted the most used instrument by crime type. This finding is surprising: most thefts are carried out without any weapon (17,063 cases), while homicides mostly do use weapons (250 cases).

Medellín has different means of transport, notably its mass transit metro system, so we consulted how victims were traveling at the time of the crime. We found that more than 25,000 cases occurred on public roads while people moved around on their own, which raises questions about the security provided on the city's streets and sidewalks.

With a general perception of crime behavior in the city, we investigated crimes in the locations where tourist sites are found. A total of 7,604 crimes were recorded, where the neighborhood with the most is La Candelaria, with 3,648 cases, followed by El Poblado with 755 and then San Benito with 633. La Candelaria concentrates 48% of all crimes, and its closest follower is El Poblado with 9.9%. It is worth mentioning that La Candelaria is located in the city center, where there is unfortunately a lot of marginalization and homelessness that make this area potentially dangerous at any time of day.

With this information, we looked into the modalities most common near tourist sites (recalling that "near" refers to a distance between 0 and 2 km), since visitors, while traveling between their lodging and a tourist site or vice versa, can become victims. The data confirm that the most used modality was mugging, with 3,010 cases; it is followed by pickpocketing and carelessness, with 2,192 cases each. Pickpocketing makes sense, since the crowding of people in those places can be exploited by criminals.

Knowing the distribution of cases near tourist sites and the modalities used, we analyzed the most affected gender. We found that women suffer this type of situation a bit more, with 3,723 cases (50.4%), while men account for 3,670 cases (49.6%). It is not a very significant difference, indicating that criminals take advantage of the slightest lapse without discriminating by gender.

These tourist sites operate 7 days a week, save for minimal exceptions, so we examined crime behavior by day of the week. The results show that most cases occur on Fridays (1,323 cases) and Saturdays (1,476 cases). The day with the fewest cases was Sunday, with 658.

We also reviewed the number of crimes that occurred in neighborhoods without tourist sites versus those with them: 26,296 cases (77%) occurred in neighborhoods without tourist sites, compared to 7,604 cases in neighborhoods with tourist sites.

Finally, we analyzed the distance between the tourist sites and the occurrence of crimes. First we examined crimes that occurred at a distance of 3 to 8 km (211 cases in total) and then those between 0 and 2 km (near the tourist site), which yielded 7,393 cases for the latter category.

To present the analysis and results of the hypothesis graphically, an interactive report was created.

Note: the original report was published on Google Data Studio, a tool renamed to Looker Studio in October 2022. If you republish this article, verify that the report link is still active on Looker Studio and update it, since the old datastudio.google.com URL may no longer resolve.

Conclusions

This exercise demonstrates the importance of the data generated at every instant in any area of daily life. For this reason, organizations, governments, and society in general should make use of it and thus build data warehouses. This procedure, although it can be costly, slow, and require different query and data cleaning steps, can become a powerful tool for understanding the dynamics and changes of the environment and reaching efficient decisions for the well being of society.

It was shown that theft is the most significant problem, far exceeding homicides, something unexpected given the stigma Colombia carries internationally. In 2019, 99% of cases were thefts, carried out mostly through mugging, pickpocketing, and carelessness, without the use of a weapon.

After the analyses, it was found that, of the 33,900 crime cases in 2019, only 7,604 occurred in the neighborhoods where the "must see" tourist sites are located, representing 22%. This allows us to conclude that most criminal acts did not occur near tourist sites. However, after classifying by proximity, most of those cases occurred at a distance between 0 and 2 km (what we call "near" in this article), with 7,393 cases, versus 211 that occurred between 3 and 8 km.

It was found that, in neighborhoods with tourist sites, most crimes occurred at short distances, and the reason is that most of these attractions are near the city center ("Comuna 10, La Candelaria"), a potentially dangerous place due to the high incidence of homelessness.

Acknowledgements

This article was made together with students Edward Alexander Pérez Betancur and Sara Yelen Valencia Vélez, of the master's and specialization program in predictive analytics at the Universidad Nacional, Medellín campus, in the Massive Database Systems course, 2020-I.

References

  1. A. Montenegro and C. Posada. "Criminalidad en Colombia". Borradores de Economía, no. 4, 1994. Available at: Fedesarrollo repository
  2. L. Dávila. "Violencia urbana, conflicto y crimen en Medellín: una revisión de las publicaciones académicas al respecto". Revista Criminalidad, vol. 58, no. 2, pp. 107-121, 2016.
  3. Instituto Nacional de Estadística e Informática (INEI). "Importancia de la medición de los homicidios dolosos". Peru. Available at: inei.gob.pe
  4. E. González. "El delito de hurto y su evolución histórica". Caribeña de Ciencias Sociales, 2019. Available at: hacienda.go.cr
  5. INDEC. "Turismo, conceptos y definiciones", 2020. Available at: indec.gob.ar
  6. Medata. Alcaldía de Medellín, 2020. Available at: medata.gov.co
  7. OpenData. Alcaldía de Medellín, 2020. Available at: geomedellin opendata
  8. E. Pérez. "Diseño y desarrollo de una aplicación para la planeación de rutas con condiciones de flota capacitada y ventanas de tiempo por medio de algoritmos heurísticos y metaheurísticos", 2018.

That's all. I hope this post is useful to you. If you have any questions, don't hesitate to leave a comment below. And remember, if you liked it, you can also share it using the social links below.

Sebastian Gomez

Sebastian Gomez

Creador de contenido principalmente acerca de tecnología.

Leave a Reply

0 Comments

Advertisements

Related Posts

Categorias