SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
victima_suicidio
October 24, 2022
[1]: import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import xlrd
import openpyxl
pd.__version__
[1]: '1.5.0'
Fuente: Sistema Nacional de Información criminal-Sistema de Alerta temprana.Pertenecientes al
Ministerio de Seguridad de la Nación
[2]: #cargar datos
df_data=pd.read_excel('Integrado_SS_base_usuaria_2017-2020 (1).xlsx')
[3]: #se muestra el dataframe
df_data
[3]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 
0 8529 No 42 LA PAMPA Norte (General Pico)
1 8530 No 42 LA PAMPA Sur (General Acha)
2 8569 No 78 SANTA CRUZ Güer Aike
3 8705 No 58 NEUQUEN Confluencia
4 8706 No 58 NEUQUEN Confluencia
… … … … … …
13805 28234 No 6 BUENOS AIRES General Alvear
13806 28235 No 6 BUENOS AIRES Laprida
13807 28236 No 6 BUENOS AIRES Bahía Blanca
13808 28237 No 6 BUENOS AIRES Marcos Paz
13809 28238 No 6 BUENOS AIRES Lobos
codigo_agrupacion codigo_departamento Cod_INDEC departamento 
0 2 2 42002 Norte (General Pico)
1 3 3 42003 Sur (General Acha)
2 21 21 78021 Güer Aike
3 35 35 58035 Confluencia
4 35 35 58035 Confluencia
1
… … … … …
13805 287 287 6287 General Alvear
13806 448 448 6448 Laprida
13807 56 56 6056 Bahía Blanca
13808 525 525 6525 Marcos Paz
13809 483 483 6483 Lobos
localidad … otro_tipo_lugar modalidad 
0 General Pico … NaN Ahorcamiento
1 Guatraché … NaN Arma de fuego
2 28 de Noviembre … NaN Ahorcamiento
3 Neuquén … Hospedaje temporario Arma de fuego
4 Plottier … NaN Ahorcamiento
… … … … …
13805 General Alvear … NaN Ahorcamiento
13806 Laprida … NaN Ahorcamiento
13807 Bahía Blanca … NaN Ahorcamiento
13808 Marcos Paz … NaN Ahorcamiento
13809 Lobos … NaN Ahorcamiento
modalidad_ampliado otro_modalidad motivo_origen_registro 
0 Ahorcamiento NaN Intervención policial
1 Arma de fuego NaN Intervención policial
2 Ahorcamiento NaN Denuncia particular
3 Arma de fuego NaN Intervención policial
4 Ahorcamiento NaN Intervención policial
… … … …
13805 Ahorcamiento NaN Intervención policial
13806 Ahorcamiento NaN Intervención policial
13807 Ahorcamiento NaN Denuncia particular
13808 Ahorcamiento NaN Intervención policial
13809 Ahorcamiento NaN Intervención policial
otro_motivo_origen_registro sexo_suicida tr_edad_suicida 
0 NaN Masculino 20-24
1 NaN Masculino 55-59
2 NaN Masculino 15-19
3 NaN Masculino 20-24
4 NaN Masculino 20-24
… … … …
13805 NaN Masculino 70-74
13806 NaN Masculino 70-74
13807 NaN Masculino 25-29
13808 NaN Masculino 15-19
13809 NaN Masculino 20-24
identidad_genero_suicida otro_identidad_genero_suicida
2
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
… … …
13805 NaN NaN
13806 NaN NaN
13807 NaN NaN
13808 NaN NaN
13809 NaN NaN
[13810 rows x 30 columns]
[4]: df_data.shape
[4]: (13810, 30)
[5]: df_data.isnull().sum()
[5]: id_hecho 0
federal 0
Cod_INDEC_Prov 0
provincia 0
agrupacion 0
codigo_agrupacion 0
codigo_departamento 0
Cod_INDEC 0
departamento 0
localidad 0
codigo_localidad 0
seccional 0
codigo_seccional 0
anio 0
mes 0
numero_sumario 0
fecha_hecho 0
hora_hecho 0
tipo_lugar 0
tipo_lugar_ampliado 0
otro_tipo_lugar 12984
modalidad 0
modalidad_ampliado 0
otro_modalidad 13756
motivo_origen_registro 0
otro_motivo_origen_registro 13801
sexo_suicida 0
3
tr_edad_suicida 0
identidad_genero_suicida 13810
otro_identidad_genero_suicida 13810
dtype: int64
[6]: df=df_data['otro_modalidad'].sum
[8]: df_sin_nan=df_data.fillna({'otro_modalidad': 0,'otro_tipo_lugar':0␣
,
→,'identidad_genero_suicida otro_tipo_lugar':0,'identidad_genero_suicida ':0␣
,
→})
[9]: df_sin_nan
[9]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 
0 8529 No 42 LA PAMPA Norte (General Pico)
1 8530 No 42 LA PAMPA Sur (General Acha)
2 8569 No 78 SANTA CRUZ Güer Aike
3 8705 No 58 NEUQUEN Confluencia
4 8706 No 58 NEUQUEN Confluencia
… … … … … …
13805 28234 No 6 BUENOS AIRES General Alvear
13806 28235 No 6 BUENOS AIRES Laprida
13807 28236 No 6 BUENOS AIRES Bahía Blanca
13808 28237 No 6 BUENOS AIRES Marcos Paz
13809 28238 No 6 BUENOS AIRES Lobos
codigo_agrupacion codigo_departamento Cod_INDEC departamento 
0 2 2 42002 Norte (General Pico)
1 3 3 42003 Sur (General Acha)
2 21 21 78021 Güer Aike
3 35 35 58035 Confluencia
4 35 35 58035 Confluencia
… … … … …
13805 287 287 6287 General Alvear
13806 448 448 6448 Laprida
13807 56 56 6056 Bahía Blanca
13808 525 525 6525 Marcos Paz
13809 483 483 6483 Lobos
localidad … otro_tipo_lugar modalidad 
0 General Pico … 0 Ahorcamiento
1 Guatraché … 0 Arma de fuego
2 28 de Noviembre … 0 Ahorcamiento
3 Neuquén … Hospedaje temporario Arma de fuego
4 Plottier … 0 Ahorcamiento
… … … … …
13805 General Alvear … 0 Ahorcamiento
4
13806 Laprida … 0 Ahorcamiento
13807 Bahía Blanca … 0 Ahorcamiento
13808 Marcos Paz … 0 Ahorcamiento
13809 Lobos … 0 Ahorcamiento
modalidad_ampliado otro_modalidad motivo_origen_registro 
0 Ahorcamiento 0 Intervención policial
1 Arma de fuego 0 Intervención policial
2 Ahorcamiento 0 Denuncia particular
3 Arma de fuego 0 Intervención policial
4 Ahorcamiento 0 Intervención policial
… … … …
13805 Ahorcamiento 0 Intervención policial
13806 Ahorcamiento 0 Intervención policial
13807 Ahorcamiento 0 Denuncia particular
13808 Ahorcamiento 0 Intervención policial
13809 Ahorcamiento 0 Intervención policial
otro_motivo_origen_registro sexo_suicida tr_edad_suicida 
0 NaN Masculino 20-24
1 NaN Masculino 55-59
2 NaN Masculino 15-19
3 NaN Masculino 20-24
4 NaN Masculino 20-24
… … … …
13805 NaN Masculino 70-74
13806 NaN Masculino 70-74
13807 NaN Masculino 25-29
13808 NaN Masculino 15-19
13809 NaN Masculino 20-24
identidad_genero_suicida otro_identidad_genero_suicida
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
… … …
13805 NaN NaN
13806 NaN NaN
13807 NaN NaN
13808 NaN NaN
13809 NaN NaN
[13810 rows x 30 columns]
[10]: df1=pd.DataFrame(df_sin_nan)
5
[11]: df1.isnull().sum()
[11]: id_hecho 0
federal 0
Cod_INDEC_Prov 0
provincia 0
agrupacion 0
codigo_agrupacion 0
codigo_departamento 0
Cod_INDEC 0
departamento 0
localidad 0
codigo_localidad 0
seccional 0
codigo_seccional 0
anio 0
mes 0
numero_sumario 0
fecha_hecho 0
hora_hecho 0
tipo_lugar 0
tipo_lugar_ampliado 0
otro_tipo_lugar 0
modalidad 0
modalidad_ampliado 0
otro_modalidad 0
motivo_origen_registro 0
otro_motivo_origen_registro 13801
sexo_suicida 0
tr_edad_suicida 0
identidad_genero_suicida 13810
otro_identidad_genero_suicida 13810
dtype: int64
[12]: df1.head()
[12]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 
0 8529 No 42 LA PAMPA Norte (General Pico)
1 8530 No 42 LA PAMPA Sur (General Acha)
2 8569 No 78 SANTA CRUZ Güer Aike
3 8705 No 58 NEUQUEN Confluencia
4 8706 No 58 NEUQUEN Confluencia
codigo_agrupacion codigo_departamento Cod_INDEC departamento 
0 2 2 42002 Norte (General Pico)
1 3 3 42003 Sur (General Acha)
2 21 21 78021 Güer Aike
6
3 35 35 58035 Confluencia
4 35 35 58035 Confluencia
localidad … otro_tipo_lugar modalidad 
0 General Pico … 0 Ahorcamiento
1 Guatraché … 0 Arma de fuego
2 28 de Noviembre … 0 Ahorcamiento
3 Neuquén … Hospedaje temporario Arma de fuego
4 Plottier … 0 Ahorcamiento
modalidad_ampliado otro_modalidad motivo_origen_registro 
0 Ahorcamiento 0 Intervención policial
1 Arma de fuego 0 Intervención policial
2 Ahorcamiento 0 Denuncia particular
3 Arma de fuego 0 Intervención policial
4 Ahorcamiento 0 Intervención policial
otro_motivo_origen_registro sexo_suicida tr_edad_suicida 
0 NaN Masculino 20-24
1 NaN Masculino 55-59
2 NaN Masculino 15-19
3 NaN Masculino 20-24
4 NaN Masculino 20-24
identidad_genero_suicida otro_identidad_genero_suicida
0 NaN NaN
1 NaN NaN
2 NaN NaN
3 NaN NaN
4 NaN NaN
[5 rows x 30 columns]
Cantidad y Porcentaje de victimas por año. Años 2017,2018,2019,2020
[13]: cantidad_victimas=df1.anio.value_counts()
[15]: cantidad_victimas
[15]: 2018 3788
2019 3567
2017 3284
2020 3171
Name: anio, dtype: int64
[16]: explode=[0.05, 0.05,0.05,0.05]
7
df1.anio.value_counts().plot(kind='pie',explode=explode,shadow=True,autopct='%.
,
→0f%%',title="porcentaje de victimas por año")
fig = plt.gcf()
plt.show()
fig.savefig('porcentaje de victimas por año.png')
**Información de variables utilizadas Glosario
[17]: df_data.columns
[17]: Index(['id_hecho', 'federal', 'Cod_INDEC_Prov', 'provincia', 'agrupacion',
'codigo_agrupacion', 'codigo_departamento', 'Cod_INDEC', 'departamento',
'localidad', 'codigo_localidad', 'seccional', 'codigo_seccional',
'anio', 'mes', 'numero_sumario', 'fecha_hecho', 'hora_hecho',
'tipo_lugar', 'tipo_lugar_ampliado', 'otro_tipo_lugar', 'modalidad',
'modalidad_ampliado', 'otro_modalidad', 'motivo_origen_registro',
'otro_motivo_origen_registro', 'sexo_suicida', 'tr_edad_suicida',
'identidad_genero_suicida', 'otro_identidad_genero_suicida'],
dtype='object')
8
[ ]: null_columns=df1.columns[df_data.isnull().any()]
df_data[null_columns].isnull().sum()
Cantidad de suicidios segun sexo y franja etaria.
[18]: type(df_data['identidad_genero_suicida'])
[18]: pandas.core.series.Series
[19]: df_data.
,
→drop(columns=['identidad_genero_suicida','otro_identidad_genero_suicida'])
[19]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 
0 8529 No 42 LA PAMPA Norte (General Pico)
1 8530 No 42 LA PAMPA Sur (General Acha)
2 8569 No 78 SANTA CRUZ Güer Aike
3 8705 No 58 NEUQUEN Confluencia
4 8706 No 58 NEUQUEN Confluencia
… … … … … …
13805 28234 No 6 BUENOS AIRES General Alvear
13806 28235 No 6 BUENOS AIRES Laprida
13807 28236 No 6 BUENOS AIRES Bahía Blanca
13808 28237 No 6 BUENOS AIRES Marcos Paz
13809 28238 No 6 BUENOS AIRES Lobos
codigo_agrupacion codigo_departamento Cod_INDEC departamento 
0 2 2 42002 Norte (General Pico)
1 3 3 42003 Sur (General Acha)
2 21 21 78021 Güer Aike
3 35 35 58035 Confluencia
4 35 35 58035 Confluencia
… … … … …
13805 287 287 6287 General Alvear
13806 448 448 6448 Laprida
13807 56 56 6056 Bahía Blanca
13808 525 525 6525 Marcos Paz
13809 483 483 6483 Lobos
localidad … tipo_lugar 
0 General Pico … Vía pública
1 Guatraché … Domicilio particular
2 28 de Noviembre … Vía pública
3 Neuquén … Otro Lugar ( Especificar )
4 Plottier … Domicilio particular
… … … …
13805 General Alvear … Domicilio particular
13806 Laprida … Domicilio particular
9
13807 Bahía Blanca … Domicilio particular
13808 Marcos Paz … Domicilio particular
13809 Lobos … Sin determinar
tipo_lugar_ampliado otro_tipo_lugar modalidad 
0 Vía pública NaN Ahorcamiento
1 Domicilio particular NaN Arma de fuego
2 Vía pública NaN Ahorcamiento
3 Otro Lugar ( Especificar ) Hospedaje temporario Arma de fuego
4 Domicilio particular NaN Ahorcamiento
… … … …
13805 Domicilio particular NaN Ahorcamiento
13806 Domicilio particular NaN Ahorcamiento
13807 Domicilio particular NaN Ahorcamiento
13808 Domicilio particular NaN Ahorcamiento
13809 Sin determinar NaN Ahorcamiento
modalidad_ampliado otro_modalidad motivo_origen_registro 
0 Ahorcamiento NaN Intervención policial
1 Arma de fuego NaN Intervención policial
2 Ahorcamiento NaN Denuncia particular
3 Arma de fuego NaN Intervención policial
4 Ahorcamiento NaN Intervención policial
… … … …
13805 Ahorcamiento NaN Intervención policial
13806 Ahorcamiento NaN Intervención policial
13807 Ahorcamiento NaN Denuncia particular
13808 Ahorcamiento NaN Intervención policial
13809 Ahorcamiento NaN Intervención policial
otro_motivo_origen_registro sexo_suicida tr_edad_suicida
0 NaN Masculino 20-24
1 NaN Masculino 55-59
2 NaN Masculino 15-19
3 NaN Masculino 20-24
4 NaN Masculino 20-24
… … … …
13805 NaN Masculino 70-74
13806 NaN Masculino 70-74
13807 NaN Masculino 25-29
13808 NaN Masculino 15-19
13809 NaN Masculino 20-24
[13810 rows x 28 columns]
[20]: s_edad_año=df1.groupby(['tr_edad_suicida','anio']).size()
10
[21]: df1.groupby(['tr_edad_suicida','anio']).size().unstack().
,
→plot(kind='bar',stacked=True,)
plt.show()
plt.savefig("victimas segun rango etareo.Ano2017-2020.png")
<Figure size 640x480 with 0 Axes>
[23]: f_group=df1.dropna()
f_group = df_data.groupby(['sexo_suicida'])['anio'].count().reset_index()
f_group.columns=['sexo_suicida','anio']
[24]: f_group.columns
[24]: Index(['sexo_suicida', 'anio'], dtype='object')
11
[25]:
plt.bar(f_group['sexo_suicida'], f_group['anio'])
plt.xticks(rotation=70)
plt.xlabel('Sexo')
plt.ylabel('Nº. de victimas')
plt.title('Nº de victimas por sexo')
plt.savefig('n_victimas_sexo.png')
plt.show()
[26]: df1.groupby(['sexo_suicida','tipo_lugar_ampliado',] ).size()
[26]: sexo_suicida tipo_lugar_ampliado
Femenino Campo/descampado/zona rural 29
Cárcel o comisaría 10
Domicilio particular 2265
12
Establecimiento de salud 20
Geriátrico/Hogar ancianos 4
Hotel/Motel 8
Otro Lugar ( Especificar ) 47
Río/canal/arroyo/mar/dique 22
Sin determinar 83
Vía pública 234
Vías del FF.CC. 48
Masculino Campo/descampado/zona rural 218
Cárcel o comisaría 146
Domicilio particular 8320
Establecimiento de salud 34
Geriátrico/Hogar ancianos 15
Hotel/Motel 25
Otro Lugar ( Especificar ) 352
Río/canal/arroyo/mar/dique 47
Sin determinar 376
Vía pública 1319
Vías del FF.CC. 134
Sin determinar Domicilio particular 34
Establecimiento de salud 1
Sin determinar 10
Vía pública 7
Vías del FF.CC. 2
dtype: int64
[27]: df1.groupby(['sexo_suicida','tipo_lugar'] ).size().unstack().
,
→plot(kind="bar",stacked=False)
plt.title('Nº de victimas por sexo segun lugar de ocurrencia')
plt.show()
plt.savefig("cantidad de victimas segun luguar de ocurrencia.png")
13
<Figure size 640x480 with 0 Axes>
[28]: cant_provincia=df1.pivot_table(index='provincia',␣
,
→columns='anio',values='id_hecho',aggfunc='count')
[29]: cant_provincia
[29]: anio 2017 2018 2019 2020
provincia
BUENOS AIRES 1032 1393 999 850
CATAMARCA 38 44 32 48
CHACO 100 108 90 102
CHUBUT 53 69 56 71
CIUDAD DE BUENOS AIRES 157 123 150 123
14
CORDOBA 231 255 263 197
CORRIENTES 48 83 119 36
ENTRE RIOS 159 234 252 198
FORMOSA 60 65 64 66
JUJUY 38 28 77 65
LA PAMPA 31 40 34 43
LA RIOJA 13 47 49 45
MENDOZA 194 198 197 194
MISIONES 80 70 84 120
NEUQUEN 67 70 63 52
RIO NEGRO 47 43 60 35
SALTA 192 160 168 195
SAN JUAN 56 51 65 54
SAN LUIS 38 52 75 62
SANTA CRUZ 41 39 39 33
SANTA FE 390 368 360 328
SANTIAGO DEL ESTERO 113 118 136 119
TIERRA DEL FUEGO 13 14 15 9
TUCUMÁN 93 116 120 126
Distribución territorial
[30]: sns.heatmap(cant_provincia,center=0,annot=True,fmt="d", cmap='inferno')
[30]: <AxesSubplot: xlabel='anio', ylabel='provincia'>
15
Nro de victimas correspondientes al año 2020 según franja etaria
[31]: df1_año20202=df1[df1.anio==2020]
[32]: df1_año20202
[32]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 
8624 20284 No 18 CORRIENTES Capital
8625 20285 No 18 CORRIENTES Paso de los Libres
8626 20286 No 18 CORRIENTES Mercedes
8627 20287 No 18 CORRIENTES Capital
8628 20288 No 18 CORRIENTES Santo Tomé
… … … … … …
13805 28234 No 6 BUENOS AIRES General Alvear
13806 28235 No 6 BUENOS AIRES Laprida
13807 28236 No 6 BUENOS AIRES Bahía Blanca
13808 28237 No 6 BUENOS AIRES Marcos Paz
13809 28238 No 6 BUENOS AIRES Lobos
codigo_agrupacion codigo_departamento Cod_INDEC departamento 
8624 21 21 18021 Capital
8625 119 119 18119 Paso de los Libres
8626 105 105 18105 Mercedes
8627 21 21 18021 Capital
8628 168 168 18168 Santo Tomé
… … … … …
13805 287 287 6287 General Alvear
13806 448 448 6448 Laprida
13807 56 56 6056 Bahía Blanca
13808 525 525 6525 Marcos Paz
13809 483 483 6483 Lobos
localidad … otro_tipo_lugar 
8624 Corrientes … 0
8625 Paso de los Libres … Campo/descampado/zona rural
8626 Mercedes … 0
8627 Corrientes … Interior de rodado
8628 Santo Tomé … 0
… … … …
13805 General Alvear … 0
13806 Laprida … 0
13807 Bahía Blanca … 0
13808 Marcos Paz … 0
13809 Lobos … 0
modalidad modalidad_ampliado otro_modalidad 
8624 Se arroja al vacío Se arroja al vacío 0
16
8625 Ahorcamiento Ahorcamiento 0
8626 Arma de fuego Arma de fuego 0
8627 Arma de fuego Arma de fuego 0
8628 Arma de fuego Arma de fuego 0
… … … …
13805 Ahorcamiento Ahorcamiento 0
13806 Ahorcamiento Ahorcamiento 0
13807 Ahorcamiento Ahorcamiento 0
13808 Ahorcamiento Ahorcamiento 0
13809 Ahorcamiento Ahorcamiento 0
motivo_origen_registro otro_motivo_origen_registro sexo_suicida 
8624 Intervención policial NaN Masculino
8625 Intervención policial NaN Masculino
8626 Intervención policial NaN Masculino
8627 Intervención policial NaN Masculino
8628 Intervención policial NaN Masculino
… … … …
13805 Intervención policial NaN Masculino
13806 Intervención policial NaN Masculino
13807 Denuncia particular NaN Masculino
13808 Intervención policial NaN Masculino
13809 Intervención policial NaN Masculino
tr_edad_suicida identidad_genero_suicida otro_identidad_genero_suicida
8624 30-34 NaN NaN
8625 55-59 NaN NaN
8626 35-39 NaN NaN
8627 50-54 NaN NaN
8628 50-54 NaN NaN
… … … …
13805 70-74 NaN NaN
13806 70-74 NaN NaN
13807 25-29 NaN NaN
13808 15-19 NaN NaN
13809 20-24 NaN NaN
[3171 rows x 30 columns]
[33]: df1_año20202.tr_edad_suicida.value_counts()
[33]: 20-24 408
25-29 373
15-19 370
30-34 276
35-39 262
40-44 229
17
45-49 171
60-64 158
55-59 147
50-54 139
65-69 130
Sin determinar 121
70-74 110
75-79 99
80-84 71
10-14 49
85-89 38
90 y más 17
5-9 3
Name: tr_edad_suicida, dtype: int64
[34]: df1_año20202.tr_edad_suicida.value_counts().plot(kind='bar')
plt.title('Nº de victimas año 2020 según franja etaria')
plt.show()
plt.savefig("Nº de victimas año 2020 según franja etaria.png")
18
<Figure size 640x480 with 0 Axes>
Esta grafica muestra que en el año 2020 la mayor cantidad de victimas se encontraban en la franja
etaria edad de 20 a 24 años, luego van disminuyendo.
[35]: df1_año20202.modalidad_ampliado.value_counts()
[35]: Ahorcamiento 2307
Arma de fuego 452
Sin determinar 103
Envenenamiento 86
Se arroja al vacío 85
Arma blanca / elemento cortante 34
Sumersión en piscina / mar / río 32
Se arroja a las vías de FF.CC. 32
Se incinera 23
19
Otra modalidad 6
Se arroja bajo rodado (camion/automóvil/colectivo) 6
Asfixia 5
Name: modalidad_ampliado, dtype: int64
[ ]: desfase=(0,0,0,0,0,0.7,0.5,0.5,0.5,0.5,0.5,0.5)
df1_año20202.modalidad_ampliado.value_counts().
,
→plot(kind='pie',explode=desfase,autopct='%.1f%%',title="porcentaje y␣
,
→modalidad año 2020")
plt.tight_layout
plt.show()
fig.savefig('Mecanismo_utilizado _por _victimas _2020.png')
[36]: df1.pivot_table(index='tr_edad_suicida',␣
,
→columns='sexo_suicida',values='id_hecho',aggfunc='count',fill_value=0)
[36]: sexo_suicida Femenino Masculino Sin determinar
tr_edad_suicida
10-14 104 141 0
15-19 430 1134 4
20-24 363 1552 2
25-29 270 1321 1
30-34 213 1015 2
35-39 208 850 0
40-44 225 709 0
45-49 156 578 0
5-9 3 4 0
50-54 166 547 0
55-59 147 529 1
60-64 94 544 0
65-69 103 457 0
70-74 76 393 0
75-79 51 349 0
80-84 40 247 0
85-89 23 146 0
90 y más 10 63 0
Sin determinar 88 407 44
[37]: df1.pivot_table(index='tr_edad_suicida',␣
,
→columns='sexo_suicida',values='id_hecho',aggfunc='count',fill_value=0).
,
→plot(kind='barh',stacked=True)
plt.title('Nº de victimas por sexo y edad correspondientes a datos␣
,
→2017,2018,2019,2020')
plt.show()
plt.savefig("cantidad_sexo_edad.png")
20
<Figure size 640x480 with 0 Axes>
Se muestra que la cantidad de victimas de personas de sexo masculino es mayor que la del femenino.
En mujeres la mayor cantidad se registra en la franja de 15 a 19 años, continuando de 20 a29, y el
sexo masculino presenta una franja mayor en la franja de 20 a 24. Tener en cuenta que estos datos
son solos los que maneja el SINC-SAT.
21

Contenu connexe

Dernier

Alfredo Gabriel Rodriguez Yajure Tarea#1
Alfredo Gabriel Rodriguez Yajure Tarea#1Alfredo Gabriel Rodriguez Yajure Tarea#1
Alfredo Gabriel Rodriguez Yajure Tarea#1alfredo130306
 
variables-estadisticas. Presentación powerpoint
variables-estadisticas. Presentación powerpointvariables-estadisticas. Presentación powerpoint
variables-estadisticas. Presentación powerpointaria66611782972
 
aine-2014.pdf/tipos de aines-clasificación
aine-2014.pdf/tipos de aines-clasificaciónaine-2014.pdf/tipos de aines-clasificación
aine-2014.pdf/tipos de aines-clasificaciónJhon Jimenez
 
Las familias más ricas de África en el año (2024).pdf
Las familias más ricas de África en el año (2024).pdfLas familias más ricas de África en el año (2024).pdf
Las familias más ricas de África en el año (2024).pdfJC Díaz Herrera
 
Conversacion.pptx en guarani boliviano latino
Conversacion.pptx en guarani boliviano latinoConversacion.pptx en guarani boliviano latino
Conversacion.pptx en guarani boliviano latinoBESTTech1
 
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024IrapuatoCmovamos
 
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docx
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docxAMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docx
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docxlm8322074
 
ROMA Y EL IMPERIO, CIUDADES ANTIGUA ROMANAS
ROMA Y EL  IMPERIO, CIUDADES  ANTIGUA ROMANASROMA Y EL  IMPERIO, CIUDADES  ANTIGUA ROMANAS
ROMA Y EL IMPERIO, CIUDADES ANTIGUA ROMANASanyahelmont
 
REGISTRO CONTABLE DE CONTABILIDAD 2022..
REGISTRO CONTABLE DE CONTABILIDAD 2022..REGISTRO CONTABLE DE CONTABILIDAD 2022..
REGISTRO CONTABLE DE CONTABILIDAD 2022..KerlynRuizPinedo
 
Reporte de incidencia delictiva Silao marzo 2024
Reporte de incidencia delictiva Silao marzo 2024Reporte de incidencia delictiva Silao marzo 2024
Reporte de incidencia delictiva Silao marzo 2024OBSERVATORIOREGIONAL
 
data lista de ingresantes de la universidad de ucayali 2024.pdf
data lista de ingresantes de la universidad de ucayali 2024.pdfdata lista de ingresantes de la universidad de ucayali 2024.pdf
data lista de ingresantes de la universidad de ucayali 2024.pdfLizRamirez182254
 
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024analiticaydatos
 
procedimiento paran la planificación en los centros educativos tipo v(multig...
procedimiento  paran la planificación en los centros educativos tipo v(multig...procedimiento  paran la planificación en los centros educativos tipo v(multig...
procedimiento paran la planificación en los centros educativos tipo v(multig...claudioluna1121
 
Principales Retos Demográficos de Puerto Rico
Principales Retos Demográficos de Puerto RicoPrincipales Retos Demográficos de Puerto Rico
Principales Retos Demográficos de Puerto RicoRaúl Figueroa
 
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...JC Díaz Herrera
 
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀LALVAREZD
 
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptx
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptxCUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptx
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptxfatimacamilainjantem
 
El Manierismo. El Manierismo
El Manierismo.              El ManierismoEl Manierismo.              El Manierismo
El Manierismo. El Manierismofariannys5
 
EPIDEMIO CANCER PULMON resumen nnn.pptx
EPIDEMIO CANCER PULMON  resumen nnn.pptxEPIDEMIO CANCER PULMON  resumen nnn.pptx
EPIDEMIO CANCER PULMON resumen nnn.pptxJEFFERSONMEDRANOCHAV
 
max-weber-principales-aportes de la sociologia (2).pptx
max-weber-principales-aportes de la sociologia (2).pptxmax-weber-principales-aportes de la sociologia (2).pptx
max-weber-principales-aportes de la sociologia (2).pptxMarioKing10
 

Dernier (20)

Alfredo Gabriel Rodriguez Yajure Tarea#1
Alfredo Gabriel Rodriguez Yajure Tarea#1Alfredo Gabriel Rodriguez Yajure Tarea#1
Alfredo Gabriel Rodriguez Yajure Tarea#1
 
variables-estadisticas. Presentación powerpoint
variables-estadisticas. Presentación powerpointvariables-estadisticas. Presentación powerpoint
variables-estadisticas. Presentación powerpoint
 
aine-2014.pdf/tipos de aines-clasificación
aine-2014.pdf/tipos de aines-clasificaciónaine-2014.pdf/tipos de aines-clasificación
aine-2014.pdf/tipos de aines-clasificación
 
Las familias más ricas de África en el año (2024).pdf
Las familias más ricas de África en el año (2024).pdfLas familias más ricas de África en el año (2024).pdf
Las familias más ricas de África en el año (2024).pdf
 
Conversacion.pptx en guarani boliviano latino
Conversacion.pptx en guarani boliviano latinoConversacion.pptx en guarani boliviano latino
Conversacion.pptx en guarani boliviano latino
 
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024
REPORTE DE HOMICIDIO DOLOSO IRAPUATO ABRIL 2024
 
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docx
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docxAMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docx
AMNIOS Y CORDON UMBILICAL en el 3 embarazo (1).docx
 
ROMA Y EL IMPERIO, CIUDADES ANTIGUA ROMANAS
ROMA Y EL  IMPERIO, CIUDADES  ANTIGUA ROMANASROMA Y EL  IMPERIO, CIUDADES  ANTIGUA ROMANAS
ROMA Y EL IMPERIO, CIUDADES ANTIGUA ROMANAS
 
REGISTRO CONTABLE DE CONTABILIDAD 2022..
REGISTRO CONTABLE DE CONTABILIDAD 2022..REGISTRO CONTABLE DE CONTABILIDAD 2022..
REGISTRO CONTABLE DE CONTABILIDAD 2022..
 
Reporte de incidencia delictiva Silao marzo 2024
Reporte de incidencia delictiva Silao marzo 2024Reporte de incidencia delictiva Silao marzo 2024
Reporte de incidencia delictiva Silao marzo 2024
 
data lista de ingresantes de la universidad de ucayali 2024.pdf
data lista de ingresantes de la universidad de ucayali 2024.pdfdata lista de ingresantes de la universidad de ucayali 2024.pdf
data lista de ingresantes de la universidad de ucayali 2024.pdf
 
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024
Imágenes-de La-Inteligencia-Artificial-AnaliticayDatos-Beatriz-Garcia-Abril2024
 
procedimiento paran la planificación en los centros educativos tipo v(multig...
procedimiento  paran la planificación en los centros educativos tipo v(multig...procedimiento  paran la planificación en los centros educativos tipo v(multig...
procedimiento paran la planificación en los centros educativos tipo v(multig...
 
Principales Retos Demográficos de Puerto Rico
Principales Retos Demográficos de Puerto RicoPrincipales Retos Demográficos de Puerto Rico
Principales Retos Demográficos de Puerto Rico
 
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...
Crecimiento del PIB real revisado sexenios neoliberales y nueva era del sober...
 
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀
PRESENTACION SOBRE LA HOJA DE CALCULO ⠀⠀
 
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptx
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptxCUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptx
CUADRO COMPARATIVO DE ARCHIVOS Y CARPETAS.pptx
 
El Manierismo. El Manierismo
El Manierismo.              El ManierismoEl Manierismo.              El Manierismo
El Manierismo. El Manierismo
 
EPIDEMIO CANCER PULMON resumen nnn.pptx
EPIDEMIO CANCER PULMON  resumen nnn.pptxEPIDEMIO CANCER PULMON  resumen nnn.pptx
EPIDEMIO CANCER PULMON resumen nnn.pptx
 
max-weber-principales-aportes de la sociologia (2).pptx
max-weber-principales-aportes de la sociologia (2).pptxmax-weber-principales-aportes de la sociologia (2).pptx
max-weber-principales-aportes de la sociologia (2).pptx
 

En vedette

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

En vedette (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

victima_suicidio.pdf

  • 1. victima_suicidio October 24, 2022 [1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import xlrd import openpyxl pd.__version__ [1]: '1.5.0' Fuente: Sistema Nacional de Información criminal-Sistema de Alerta temprana.Pertenecientes al Ministerio de Seguridad de la Nación [2]: #cargar datos df_data=pd.read_excel('Integrado_SS_base_usuaria_2017-2020 (1).xlsx') [3]: #se muestra el dataframe df_data [3]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 0 8529 No 42 LA PAMPA Norte (General Pico) 1 8530 No 42 LA PAMPA Sur (General Acha) 2 8569 No 78 SANTA CRUZ Güer Aike 3 8705 No 58 NEUQUEN Confluencia 4 8706 No 58 NEUQUEN Confluencia … … … … … … 13805 28234 No 6 BUENOS AIRES General Alvear 13806 28235 No 6 BUENOS AIRES Laprida 13807 28236 No 6 BUENOS AIRES Bahía Blanca 13808 28237 No 6 BUENOS AIRES Marcos Paz 13809 28238 No 6 BUENOS AIRES Lobos codigo_agrupacion codigo_departamento Cod_INDEC departamento 0 2 2 42002 Norte (General Pico) 1 3 3 42003 Sur (General Acha) 2 21 21 78021 Güer Aike 3 35 35 58035 Confluencia 4 35 35 58035 Confluencia 1
  • 2. … … … … … 13805 287 287 6287 General Alvear 13806 448 448 6448 Laprida 13807 56 56 6056 Bahía Blanca 13808 525 525 6525 Marcos Paz 13809 483 483 6483 Lobos localidad … otro_tipo_lugar modalidad 0 General Pico … NaN Ahorcamiento 1 Guatraché … NaN Arma de fuego 2 28 de Noviembre … NaN Ahorcamiento 3 Neuquén … Hospedaje temporario Arma de fuego 4 Plottier … NaN Ahorcamiento … … … … … 13805 General Alvear … NaN Ahorcamiento 13806 Laprida … NaN Ahorcamiento 13807 Bahía Blanca … NaN Ahorcamiento 13808 Marcos Paz … NaN Ahorcamiento 13809 Lobos … NaN Ahorcamiento modalidad_ampliado otro_modalidad motivo_origen_registro 0 Ahorcamiento NaN Intervención policial 1 Arma de fuego NaN Intervención policial 2 Ahorcamiento NaN Denuncia particular 3 Arma de fuego NaN Intervención policial 4 Ahorcamiento NaN Intervención policial … … … … 13805 Ahorcamiento NaN Intervención policial 13806 Ahorcamiento NaN Intervención policial 13807 Ahorcamiento NaN Denuncia particular 13808 Ahorcamiento NaN Intervención policial 13809 Ahorcamiento NaN Intervención policial otro_motivo_origen_registro sexo_suicida tr_edad_suicida 0 NaN Masculino 20-24 1 NaN Masculino 55-59 2 NaN Masculino 15-19 3 NaN Masculino 20-24 4 NaN Masculino 20-24 … … … … 13805 NaN Masculino 70-74 13806 NaN Masculino 70-74 13807 NaN Masculino 25-29 13808 NaN Masculino 15-19 13809 NaN Masculino 20-24 identidad_genero_suicida otro_identidad_genero_suicida 2
  • 3. 0 NaN NaN 1 NaN NaN 2 NaN NaN 3 NaN NaN 4 NaN NaN … … … 13805 NaN NaN 13806 NaN NaN 13807 NaN NaN 13808 NaN NaN 13809 NaN NaN [13810 rows x 30 columns] [4]: df_data.shape [4]: (13810, 30) [5]: df_data.isnull().sum() [5]: id_hecho 0 federal 0 Cod_INDEC_Prov 0 provincia 0 agrupacion 0 codigo_agrupacion 0 codigo_departamento 0 Cod_INDEC 0 departamento 0 localidad 0 codigo_localidad 0 seccional 0 codigo_seccional 0 anio 0 mes 0 numero_sumario 0 fecha_hecho 0 hora_hecho 0 tipo_lugar 0 tipo_lugar_ampliado 0 otro_tipo_lugar 12984 modalidad 0 modalidad_ampliado 0 otro_modalidad 13756 motivo_origen_registro 0 otro_motivo_origen_registro 13801 sexo_suicida 0 3
  • 4. tr_edad_suicida 0 identidad_genero_suicida 13810 otro_identidad_genero_suicida 13810 dtype: int64 [6]: df=df_data['otro_modalidad'].sum [8]: df_sin_nan=df_data.fillna({'otro_modalidad': 0,'otro_tipo_lugar':0␣ , →,'identidad_genero_suicida otro_tipo_lugar':0,'identidad_genero_suicida ':0␣ , →}) [9]: df_sin_nan [9]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 0 8529 No 42 LA PAMPA Norte (General Pico) 1 8530 No 42 LA PAMPA Sur (General Acha) 2 8569 No 78 SANTA CRUZ Güer Aike 3 8705 No 58 NEUQUEN Confluencia 4 8706 No 58 NEUQUEN Confluencia … … … … … … 13805 28234 No 6 BUENOS AIRES General Alvear 13806 28235 No 6 BUENOS AIRES Laprida 13807 28236 No 6 BUENOS AIRES Bahía Blanca 13808 28237 No 6 BUENOS AIRES Marcos Paz 13809 28238 No 6 BUENOS AIRES Lobos codigo_agrupacion codigo_departamento Cod_INDEC departamento 0 2 2 42002 Norte (General Pico) 1 3 3 42003 Sur (General Acha) 2 21 21 78021 Güer Aike 3 35 35 58035 Confluencia 4 35 35 58035 Confluencia … … … … … 13805 287 287 6287 General Alvear 13806 448 448 6448 Laprida 13807 56 56 6056 Bahía Blanca 13808 525 525 6525 Marcos Paz 13809 483 483 6483 Lobos localidad … otro_tipo_lugar modalidad 0 General Pico … 0 Ahorcamiento 1 Guatraché … 0 Arma de fuego 2 28 de Noviembre … 0 Ahorcamiento 3 Neuquén … Hospedaje temporario Arma de fuego 4 Plottier … 0 Ahorcamiento … … … … … 13805 General Alvear … 0 Ahorcamiento 4
  • 5. 13806 Laprida … 0 Ahorcamiento 13807 Bahía Blanca … 0 Ahorcamiento 13808 Marcos Paz … 0 Ahorcamiento 13809 Lobos … 0 Ahorcamiento modalidad_ampliado otro_modalidad motivo_origen_registro 0 Ahorcamiento 0 Intervención policial 1 Arma de fuego 0 Intervención policial 2 Ahorcamiento 0 Denuncia particular 3 Arma de fuego 0 Intervención policial 4 Ahorcamiento 0 Intervención policial … … … … 13805 Ahorcamiento 0 Intervención policial 13806 Ahorcamiento 0 Intervención policial 13807 Ahorcamiento 0 Denuncia particular 13808 Ahorcamiento 0 Intervención policial 13809 Ahorcamiento 0 Intervención policial otro_motivo_origen_registro sexo_suicida tr_edad_suicida 0 NaN Masculino 20-24 1 NaN Masculino 55-59 2 NaN Masculino 15-19 3 NaN Masculino 20-24 4 NaN Masculino 20-24 … … … … 13805 NaN Masculino 70-74 13806 NaN Masculino 70-74 13807 NaN Masculino 25-29 13808 NaN Masculino 15-19 13809 NaN Masculino 20-24 identidad_genero_suicida otro_identidad_genero_suicida 0 NaN NaN 1 NaN NaN 2 NaN NaN 3 NaN NaN 4 NaN NaN … … … 13805 NaN NaN 13806 NaN NaN 13807 NaN NaN 13808 NaN NaN 13809 NaN NaN [13810 rows x 30 columns] [10]: df1=pd.DataFrame(df_sin_nan) 5
  • 6. [11]: df1.isnull().sum() [11]: id_hecho 0 federal 0 Cod_INDEC_Prov 0 provincia 0 agrupacion 0 codigo_agrupacion 0 codigo_departamento 0 Cod_INDEC 0 departamento 0 localidad 0 codigo_localidad 0 seccional 0 codigo_seccional 0 anio 0 mes 0 numero_sumario 0 fecha_hecho 0 hora_hecho 0 tipo_lugar 0 tipo_lugar_ampliado 0 otro_tipo_lugar 0 modalidad 0 modalidad_ampliado 0 otro_modalidad 0 motivo_origen_registro 0 otro_motivo_origen_registro 13801 sexo_suicida 0 tr_edad_suicida 0 identidad_genero_suicida 13810 otro_identidad_genero_suicida 13810 dtype: int64 [12]: df1.head() [12]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 0 8529 No 42 LA PAMPA Norte (General Pico) 1 8530 No 42 LA PAMPA Sur (General Acha) 2 8569 No 78 SANTA CRUZ Güer Aike 3 8705 No 58 NEUQUEN Confluencia 4 8706 No 58 NEUQUEN Confluencia codigo_agrupacion codigo_departamento Cod_INDEC departamento 0 2 2 42002 Norte (General Pico) 1 3 3 42003 Sur (General Acha) 2 21 21 78021 Güer Aike 6
  • 7. 3 35 35 58035 Confluencia 4 35 35 58035 Confluencia localidad … otro_tipo_lugar modalidad 0 General Pico … 0 Ahorcamiento 1 Guatraché … 0 Arma de fuego 2 28 de Noviembre … 0 Ahorcamiento 3 Neuquén … Hospedaje temporario Arma de fuego 4 Plottier … 0 Ahorcamiento modalidad_ampliado otro_modalidad motivo_origen_registro 0 Ahorcamiento 0 Intervención policial 1 Arma de fuego 0 Intervención policial 2 Ahorcamiento 0 Denuncia particular 3 Arma de fuego 0 Intervención policial 4 Ahorcamiento 0 Intervención policial otro_motivo_origen_registro sexo_suicida tr_edad_suicida 0 NaN Masculino 20-24 1 NaN Masculino 55-59 2 NaN Masculino 15-19 3 NaN Masculino 20-24 4 NaN Masculino 20-24 identidad_genero_suicida otro_identidad_genero_suicida 0 NaN NaN 1 NaN NaN 2 NaN NaN 3 NaN NaN 4 NaN NaN [5 rows x 30 columns] Cantidad y Porcentaje de victimas por año. Años 2017,2018,2019,2020 [13]: cantidad_victimas=df1.anio.value_counts() [15]: cantidad_victimas [15]: 2018 3788 2019 3567 2017 3284 2020 3171 Name: anio, dtype: int64 [16]: explode=[0.05, 0.05,0.05,0.05] 7
  • 8. df1.anio.value_counts().plot(kind='pie',explode=explode,shadow=True,autopct='%. , →0f%%',title="porcentaje de victimas por año") fig = plt.gcf() plt.show() fig.savefig('porcentaje de victimas por año.png') **Información de variables utilizadas Glosario [17]: df_data.columns [17]: Index(['id_hecho', 'federal', 'Cod_INDEC_Prov', 'provincia', 'agrupacion', 'codigo_agrupacion', 'codigo_departamento', 'Cod_INDEC', 'departamento', 'localidad', 'codigo_localidad', 'seccional', 'codigo_seccional', 'anio', 'mes', 'numero_sumario', 'fecha_hecho', 'hora_hecho', 'tipo_lugar', 'tipo_lugar_ampliado', 'otro_tipo_lugar', 'modalidad', 'modalidad_ampliado', 'otro_modalidad', 'motivo_origen_registro', 'otro_motivo_origen_registro', 'sexo_suicida', 'tr_edad_suicida', 'identidad_genero_suicida', 'otro_identidad_genero_suicida'], dtype='object') 8
  • 9. [ ]: null_columns=df1.columns[df_data.isnull().any()] df_data[null_columns].isnull().sum() Cantidad de suicidios segun sexo y franja etaria. [18]: type(df_data['identidad_genero_suicida']) [18]: pandas.core.series.Series [19]: df_data. , →drop(columns=['identidad_genero_suicida','otro_identidad_genero_suicida']) [19]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 0 8529 No 42 LA PAMPA Norte (General Pico) 1 8530 No 42 LA PAMPA Sur (General Acha) 2 8569 No 78 SANTA CRUZ Güer Aike 3 8705 No 58 NEUQUEN Confluencia 4 8706 No 58 NEUQUEN Confluencia … … … … … … 13805 28234 No 6 BUENOS AIRES General Alvear 13806 28235 No 6 BUENOS AIRES Laprida 13807 28236 No 6 BUENOS AIRES Bahía Blanca 13808 28237 No 6 BUENOS AIRES Marcos Paz 13809 28238 No 6 BUENOS AIRES Lobos codigo_agrupacion codigo_departamento Cod_INDEC departamento 0 2 2 42002 Norte (General Pico) 1 3 3 42003 Sur (General Acha) 2 21 21 78021 Güer Aike 3 35 35 58035 Confluencia 4 35 35 58035 Confluencia … … … … … 13805 287 287 6287 General Alvear 13806 448 448 6448 Laprida 13807 56 56 6056 Bahía Blanca 13808 525 525 6525 Marcos Paz 13809 483 483 6483 Lobos localidad … tipo_lugar 0 General Pico … Vía pública 1 Guatraché … Domicilio particular 2 28 de Noviembre … Vía pública 3 Neuquén … Otro Lugar ( Especificar ) 4 Plottier … Domicilio particular … … … … 13805 General Alvear … Domicilio particular 13806 Laprida … Domicilio particular 9
  • 10. 13807 Bahía Blanca … Domicilio particular 13808 Marcos Paz … Domicilio particular 13809 Lobos … Sin determinar tipo_lugar_ampliado otro_tipo_lugar modalidad 0 Vía pública NaN Ahorcamiento 1 Domicilio particular NaN Arma de fuego 2 Vía pública NaN Ahorcamiento 3 Otro Lugar ( Especificar ) Hospedaje temporario Arma de fuego 4 Domicilio particular NaN Ahorcamiento … … … … 13805 Domicilio particular NaN Ahorcamiento 13806 Domicilio particular NaN Ahorcamiento 13807 Domicilio particular NaN Ahorcamiento 13808 Domicilio particular NaN Ahorcamiento 13809 Sin determinar NaN Ahorcamiento modalidad_ampliado otro_modalidad motivo_origen_registro 0 Ahorcamiento NaN Intervención policial 1 Arma de fuego NaN Intervención policial 2 Ahorcamiento NaN Denuncia particular 3 Arma de fuego NaN Intervención policial 4 Ahorcamiento NaN Intervención policial … … … … 13805 Ahorcamiento NaN Intervención policial 13806 Ahorcamiento NaN Intervención policial 13807 Ahorcamiento NaN Denuncia particular 13808 Ahorcamiento NaN Intervención policial 13809 Ahorcamiento NaN Intervención policial otro_motivo_origen_registro sexo_suicida tr_edad_suicida 0 NaN Masculino 20-24 1 NaN Masculino 55-59 2 NaN Masculino 15-19 3 NaN Masculino 20-24 4 NaN Masculino 20-24 … … … … 13805 NaN Masculino 70-74 13806 NaN Masculino 70-74 13807 NaN Masculino 25-29 13808 NaN Masculino 15-19 13809 NaN Masculino 20-24 [13810 rows x 28 columns] [20]: s_edad_año=df1.groupby(['tr_edad_suicida','anio']).size() 10
  • 11. [21]: df1.groupby(['tr_edad_suicida','anio']).size().unstack(). , →plot(kind='bar',stacked=True,) plt.show() plt.savefig("victimas segun rango etareo.Ano2017-2020.png") <Figure size 640x480 with 0 Axes> [23]: f_group=df1.dropna() f_group = df_data.groupby(['sexo_suicida'])['anio'].count().reset_index() f_group.columns=['sexo_suicida','anio'] [24]: f_group.columns [24]: Index(['sexo_suicida', 'anio'], dtype='object') 11
  • 12. [25]: plt.bar(f_group['sexo_suicida'], f_group['anio']) plt.xticks(rotation=70) plt.xlabel('Sexo') plt.ylabel('Nº. de victimas') plt.title('Nº de victimas por sexo') plt.savefig('n_victimas_sexo.png') plt.show() [26]: df1.groupby(['sexo_suicida','tipo_lugar_ampliado',] ).size() [26]: sexo_suicida tipo_lugar_ampliado Femenino Campo/descampado/zona rural 29 Cárcel o comisaría 10 Domicilio particular 2265 12
  • 13. Establecimiento de salud 20 Geriátrico/Hogar ancianos 4 Hotel/Motel 8 Otro Lugar ( Especificar ) 47 Río/canal/arroyo/mar/dique 22 Sin determinar 83 Vía pública 234 Vías del FF.CC. 48 Masculino Campo/descampado/zona rural 218 Cárcel o comisaría 146 Domicilio particular 8320 Establecimiento de salud 34 Geriátrico/Hogar ancianos 15 Hotel/Motel 25 Otro Lugar ( Especificar ) 352 Río/canal/arroyo/mar/dique 47 Sin determinar 376 Vía pública 1319 Vías del FF.CC. 134 Sin determinar Domicilio particular 34 Establecimiento de salud 1 Sin determinar 10 Vía pública 7 Vías del FF.CC. 2 dtype: int64 [27]: df1.groupby(['sexo_suicida','tipo_lugar'] ).size().unstack(). , →plot(kind="bar",stacked=False) plt.title('Nº de victimas por sexo segun lugar de ocurrencia') plt.show() plt.savefig("cantidad de victimas segun luguar de ocurrencia.png") 13
  • 14. <Figure size 640x480 with 0 Axes> [28]: cant_provincia=df1.pivot_table(index='provincia',␣ , →columns='anio',values='id_hecho',aggfunc='count') [29]: cant_provincia [29]: anio 2017 2018 2019 2020 provincia BUENOS AIRES 1032 1393 999 850 CATAMARCA 38 44 32 48 CHACO 100 108 90 102 CHUBUT 53 69 56 71 CIUDAD DE BUENOS AIRES 157 123 150 123 14
  • 15. CORDOBA 231 255 263 197 CORRIENTES 48 83 119 36 ENTRE RIOS 159 234 252 198 FORMOSA 60 65 64 66 JUJUY 38 28 77 65 LA PAMPA 31 40 34 43 LA RIOJA 13 47 49 45 MENDOZA 194 198 197 194 MISIONES 80 70 84 120 NEUQUEN 67 70 63 52 RIO NEGRO 47 43 60 35 SALTA 192 160 168 195 SAN JUAN 56 51 65 54 SAN LUIS 38 52 75 62 SANTA CRUZ 41 39 39 33 SANTA FE 390 368 360 328 SANTIAGO DEL ESTERO 113 118 136 119 TIERRA DEL FUEGO 13 14 15 9 TUCUMÁN 93 116 120 126 Distribución territorial [30]: sns.heatmap(cant_provincia,center=0,annot=True,fmt="d", cmap='inferno') [30]: <AxesSubplot: xlabel='anio', ylabel='provincia'> 15
  • 16. Nro de victimas correspondientes al año 2020 según franja etaria [31]: df1_año20202=df1[df1.anio==2020] [32]: df1_año20202 [32]: id_hecho federal Cod_INDEC_Prov provincia agrupacion 8624 20284 No 18 CORRIENTES Capital 8625 20285 No 18 CORRIENTES Paso de los Libres 8626 20286 No 18 CORRIENTES Mercedes 8627 20287 No 18 CORRIENTES Capital 8628 20288 No 18 CORRIENTES Santo Tomé … … … … … … 13805 28234 No 6 BUENOS AIRES General Alvear 13806 28235 No 6 BUENOS AIRES Laprida 13807 28236 No 6 BUENOS AIRES Bahía Blanca 13808 28237 No 6 BUENOS AIRES Marcos Paz 13809 28238 No 6 BUENOS AIRES Lobos codigo_agrupacion codigo_departamento Cod_INDEC departamento 8624 21 21 18021 Capital 8625 119 119 18119 Paso de los Libres 8626 105 105 18105 Mercedes 8627 21 21 18021 Capital 8628 168 168 18168 Santo Tomé … … … … … 13805 287 287 6287 General Alvear 13806 448 448 6448 Laprida 13807 56 56 6056 Bahía Blanca 13808 525 525 6525 Marcos Paz 13809 483 483 6483 Lobos localidad … otro_tipo_lugar 8624 Corrientes … 0 8625 Paso de los Libres … Campo/descampado/zona rural 8626 Mercedes … 0 8627 Corrientes … Interior de rodado 8628 Santo Tomé … 0 … … … … 13805 General Alvear … 0 13806 Laprida … 0 13807 Bahía Blanca … 0 13808 Marcos Paz … 0 13809 Lobos … 0 modalidad modalidad_ampliado otro_modalidad 8624 Se arroja al vacío Se arroja al vacío 0 16
  • 17. 8625 Ahorcamiento Ahorcamiento 0 8626 Arma de fuego Arma de fuego 0 8627 Arma de fuego Arma de fuego 0 8628 Arma de fuego Arma de fuego 0 … … … … 13805 Ahorcamiento Ahorcamiento 0 13806 Ahorcamiento Ahorcamiento 0 13807 Ahorcamiento Ahorcamiento 0 13808 Ahorcamiento Ahorcamiento 0 13809 Ahorcamiento Ahorcamiento 0 motivo_origen_registro otro_motivo_origen_registro sexo_suicida 8624 Intervención policial NaN Masculino 8625 Intervención policial NaN Masculino 8626 Intervención policial NaN Masculino 8627 Intervención policial NaN Masculino 8628 Intervención policial NaN Masculino … … … … 13805 Intervención policial NaN Masculino 13806 Intervención policial NaN Masculino 13807 Denuncia particular NaN Masculino 13808 Intervención policial NaN Masculino 13809 Intervención policial NaN Masculino tr_edad_suicida identidad_genero_suicida otro_identidad_genero_suicida 8624 30-34 NaN NaN 8625 55-59 NaN NaN 8626 35-39 NaN NaN 8627 50-54 NaN NaN 8628 50-54 NaN NaN … … … … 13805 70-74 NaN NaN 13806 70-74 NaN NaN 13807 25-29 NaN NaN 13808 15-19 NaN NaN 13809 20-24 NaN NaN [3171 rows x 30 columns] [33]: df1_año20202.tr_edad_suicida.value_counts() [33]: 20-24 408 25-29 373 15-19 370 30-34 276 35-39 262 40-44 229 17
  • 18. 45-49 171 60-64 158 55-59 147 50-54 139 65-69 130 Sin determinar 121 70-74 110 75-79 99 80-84 71 10-14 49 85-89 38 90 y más 17 5-9 3 Name: tr_edad_suicida, dtype: int64 [34]: df1_año20202.tr_edad_suicida.value_counts().plot(kind='bar') plt.title('Nº de victimas año 2020 según franja etaria') plt.show() plt.savefig("Nº de victimas año 2020 según franja etaria.png") 18
  • 19. <Figure size 640x480 with 0 Axes> Esta grafica muestra que en el año 2020 la mayor cantidad de victimas se encontraban en la franja etaria edad de 20 a 24 años, luego van disminuyendo. [35]: df1_año20202.modalidad_ampliado.value_counts() [35]: Ahorcamiento 2307 Arma de fuego 452 Sin determinar 103 Envenenamiento 86 Se arroja al vacío 85 Arma blanca / elemento cortante 34 Sumersión en piscina / mar / río 32 Se arroja a las vías de FF.CC. 32 Se incinera 23 19
  • 20. Otra modalidad 6 Se arroja bajo rodado (camion/automóvil/colectivo) 6 Asfixia 5 Name: modalidad_ampliado, dtype: int64 [ ]: desfase=(0,0,0,0,0,0.7,0.5,0.5,0.5,0.5,0.5,0.5) df1_año20202.modalidad_ampliado.value_counts(). , →plot(kind='pie',explode=desfase,autopct='%.1f%%',title="porcentaje y␣ , →modalidad año 2020") plt.tight_layout plt.show() fig.savefig('Mecanismo_utilizado _por _victimas _2020.png') [36]: df1.pivot_table(index='tr_edad_suicida',␣ , →columns='sexo_suicida',values='id_hecho',aggfunc='count',fill_value=0) [36]: sexo_suicida Femenino Masculino Sin determinar tr_edad_suicida 10-14 104 141 0 15-19 430 1134 4 20-24 363 1552 2 25-29 270 1321 1 30-34 213 1015 2 35-39 208 850 0 40-44 225 709 0 45-49 156 578 0 5-9 3 4 0 50-54 166 547 0 55-59 147 529 1 60-64 94 544 0 65-69 103 457 0 70-74 76 393 0 75-79 51 349 0 80-84 40 247 0 85-89 23 146 0 90 y más 10 63 0 Sin determinar 88 407 44 [37]: df1.pivot_table(index='tr_edad_suicida',␣ , →columns='sexo_suicida',values='id_hecho',aggfunc='count',fill_value=0). , →plot(kind='barh',stacked=True) plt.title('Nº de victimas por sexo y edad correspondientes a datos␣ , →2017,2018,2019,2020') plt.show() plt.savefig("cantidad_sexo_edad.png") 20
  • 21. <Figure size 640x480 with 0 Axes> Se muestra que la cantidad de victimas de personas de sexo masculino es mayor que la del femenino. En mujeres la mayor cantidad se registra en la franja de 15 a 19 años, continuando de 20 a29, y el sexo masculino presenta una franja mayor en la franja de 20 a 24. Tener en cuenta que estos datos son solos los que maneja el SINC-SAT. 21