/spanish_crimes_per_nacionality

Analysis of crime in Spain by origin to debunk immigration fake news in the country

Primary LanguageJupyter Notebook

CRIME ANALYSIS BY ORIGIN IN SPAIN

Crime Analysis

About the Project 🚔

Europe is experiencing the rise of far-right movements that constantly fuel fear of the foreign population through false data that create non-existent social alarms.

In Spain, for example, these groups spread baseless figures that accuse people of foreign origin (mainly African) and directly link them to the increase in crime in the country.

That is why this data exploration aims to disprove these alarming claims that assert that 40% of crimes committed in Spain are perpetrated by foreigners.

In the face of the impunity of lies spread solely to gain political advantage, data analysis emerges as an indispensable tool to curb this type of injustice.

Objective:

In this project, I compare real data gathered by official institutions to prove my hypotesis: alt-righ fake news are lying to people and creating an awful idea about the inmigration in Spain. My point is to dismiss this false info that overloads our media and some policical speechs.

Methodology:

  1. Data Gathering: Download a specific dataset from INE (Instituto Nacional de Estadística) to analyze the real data about crime in Spain by condemned's origin.
  2. Data Preprocessing and EDA: Adjusting and fixing the data gathered for a deep exploration. Studying through EDA the stadistics crime by crime for, after that, make a general analysis of the total crimes and the relation with the origins.
  3. Conclusions in Slides: Develop a detailed explanation for the final results in slides and the final confirmation of the hypotesis.
  4. Power BI Dashboard: Create a dashboard for the total crimes to see an interactive way to understand the evolution through the years.

Points to consider ▶️

Some points to keep in mind to understand the analysis:

  • The crimes analyzed consist of a specific selection: homicides, injuries, thefts, robberies, damages, crimes against collective security and crimes against public order. These crimes have been selected due to the relation that the alt-right finds with immigration.
  • The data collected's period is between 2013 and 2023, grouped by origin: Spanish, African, American and European. We have discarted the origins from Asia and Oceania as their incidence is 0.6% of the total data.
  • The EDA consists on crime count, total percentage, evolution during the period and annual growth percentage (both overall and per crime). In addition to the correlation between crime and origin.

Project Structure 📂

This project is developed through one python notebook, one slides document and one power bi dashboard.

  1. DATASET PREPROCESSING & EDA (ENGLISH)
  2. SLIDES DOCUMENT (ESPAÑOL)
  3. POWER BI DASHBOARD (ESPAÑOL)

Final Conclusions 🧑‍⚖️

Hypotesis confirmation

After analyzing the crimes, we have been able to verify that the origin of individuals is not a determining factor in the results during the observed period.

Neither the historical evolution nor the annual growth percentage studied, both in individual crimes and in the total, reveal any trend that indicates origin as an important factor. Nor does it influence the observed patterns.

Observations

  1. Percentage of Crimes by Origin: 25.61% of the total crimes are committed by foreigners. The average percentage of crimes committed by foreigners per crime category is 24.91%. Foreigners commit up to 1/4 of the crimes in Spain.
  2. Critical Years: In some crimes, we observed that between 2015 and 2016, the number of incidents grew exponentially (other contextual factors should be analyzed to understand this). The systematic decline in 2020 in all crimes is due to the lockdown.
  3. Similarity in Patterns: The similarity in the evolution patterns and the high correlation between origins rule out the importance of origin in evaluating data behavior. However, in 4 out of the 7 crimes, we see a substantial increase. We conclude that regardless of origin, more crimes are being committed than 10 years ago.