Exploratory analysis on suicide data
By: Luis Meazzini
Tags: Exploratory Data Analysis, Dataviz, Suicide, Data Analysis, Data Science

Introduction

It seems that with each passing year, suicides are becoming more common. Myself, who is only 25 years old, I had an acquaintance who during college committed suicide. During the week, I was hanging out by Kaggle, and found a set of data on suicides. At the time I thought about doing a little analysis and try to understand the subject better. So now, in this article, I present this brief review.

If someone also wants to “play” with this data set just get the kaggle over the link.

I will not put all the code I used to do the visualizations (it’s in GitHub) and ask questions that the data set might answer. But before trying to understand the data, I will briefly explain what is in these data.

Data description

Each data in the data set represents a year, a country, a certain age range, and a gender. For example, in the country Brazil in the year 1985, over 75 years, committed suicide 129 men.

The data set has 10 attributes. These being:

Country: country of record data;

Year: year of record data;

Sex: Sex (male or female);

Age: Suicide age range, ages divided into six categories;

Suicides_no: number of suicides;

Population: population of this sex, in this age range, in this country and in this year;

Suicides / 100k pop: Reason between the number of suicides and the population / 100k;

GDP_for_year: GDP of the country in the year who issue;

GDP_per_capita: ratio between the country’s GDP and its population;

Generation: Generation of the suicides in question, being possible 6 different categories.

Possible age categories and generations are:

df['age'].unique() array(['15-24 years', '35-54 years', '75+ years', '25-34 years',

'55-74 years', '5-14 years'], dtype=object)

And the possible generations are:

df['generation'].unique() array(['Generation X', 'Silent', 'G.I. Generation', 'Boomers',

'Millenials', 'Generation Z'], dtype=object)

Originally, the data set presented the countries HDI, but the vast majority of the values were null. As I want to analyze whether the influence of a country’s development on the amount of suicides, so I added a column in the data. I went to the site, and I took the name of all countries considered first and second world, I classified the data of our dataset using this information in three categories. First, second and third world.

Frist_world = ['United States', 'Germany', 'Japan', 'Turkey', 'United Kingdom', 'France', 'Italy', 'South Korea',

'Spain', 'Canada', 'Australia', 'Netherlands', 'Belgium', 'Greece', 'Portugal',

'Sweden', 'Austria', 'Switzerland', 'Israel', 'Singapore', 'Denmark', 'Finland', 'Norway', 'Ireland',

'New Zeland', 'Slovenia', 'Estonia', 'Cyprus', 'Luxembourg', 'Iceland'] Second_world = ['Russian Federation', 'Ukraine', 'Poland', 'Uzbekistan', 'Romania', 'Kazakhstan', 'Azerbaijan', 'Czech Republic',

'Hungary', 'Belarus', 'Tajikistan', 'Serbia', 'Bulgaria', 'Slovakia', 'Croatia', 'Maldova', 'Georgia',

'Bosnia And Herzegovina', 'Albania', 'Armenia', 'Lithuania', 'Latvia', 'Brazil', 'Chile', 'Argentina',

'China', 'India', 'Bolivia', 'Romenia'] country_world = []

for i in range(len(df)):



if df['country'][i] in Frist_world:

country_world.append(1)

elif df['country'][i] in Second_world:

country_world.append(2)

else:

country_world.append(3) df['country_world'] = country_world

Now, finally, let’s go exploratory.

Exploring the Data

I will try to ask questions, and answer them quantitatively, through graphics. Every analysis done in this part refers to the whole world.

Over the years, has the number of suicides increased?

As the data goes until 2016, this chart suggests that when the data was collected, 2016 was in the beginning. And also, we can see that from 1988 to 1990 the number of suicides increased greatly. Moreover, the amount seems to have grown in a expected and slightly declining way in recent years, perhaps due to the most diverse suicide prevention campaigns.

Who tend to commit suicide more? Teens? Adults? elders?

Well, it seems like adults definitely commit suicide more, but what IS the point of it? From the data, we have no information to answer. But I imagine it’s a common age for depression and the like.

What about sex? Who commits more suicide, men or women?