top of page
Search

Continuing to explore the Data

In my previous post i showed throgh the graphs the number of suicides in different generations and also in gender. The number of suicides which remains an important data may also be misleading as when compairing groups. As the figure below shows where we compare the suicides numbers in different years, INstead of just looking at the number of suicide, we should look at the rates,that is the number of suicide per 100000 people.


Considering this we realised that the sudden spike that is seen in the between the years 1985,1986 and 1999,2000 may not be a very important observation as the figure of suicide rates shows that the difference is not that important if we consider the growth of the popupation from 1985 to 2000.


The video digs deeper to start understanding the drop in suicides number between the year 1999 and 2016 by observing the gross domestic product per capital as explained in the following video. https://youtu.be/udnfDUzV47o


R Code of exercise


suicide<-read.csv('https://gist.githubusercontent.com/Kemtim/fa98877cfa0ad4ad73bf7bbde4a84825/raw/4666c2676434e1fdaa8b08b033bdc20acc1da57f/suicide.csv' ,sep = ',') suicide$rate<-(suicide$suicides_no/suicide$population)*100000


suic_1.01 = alt$Chart(suicide)$ mark_rect()$ encode( y = "suicides_no:Q", x = "year:N" )$ properties( height=300, width=200 ) suic_1.21 = alt$Chart(suicide)$ mark_rect()$ encode( y = "rate:Q", x = "age:N" )$ properties( height=300, width=200 ) suic_1.1 = alt$Chart(suicide)$ mark_rect()$ encode( y = "suicides_no:Q", x = "age:N", color='age', tooltip=c('gdp_per_capita:Q') )$ properties( height=300, width=200 )$ transform_filter( alt$FieldEqualPredicate(field = "year", equal = "2016") ) suic_1.10 = alt$Chart(suicide)$ mark_rect()$ encode( y = "suicides_no:Q", x = "age:N", color='age', tooltip=c('gdp_per_capita:Q') )$ properties( height=300, width=200 )$ transform_filter( alt$FieldEqualPredicate(field = "year", equal = "1999") ) suic_11 = (suic_1.01|suic_1.12) suic_11 suic_1.1 suic_1.10

11 views0 comments
bottom of page