NYC Leading Causes of Death
Contributed by Joseph Mata. He currently in the NYC Data Science Academy Remote Bootcamp program taking place between September 18 to April 1st, 2018. This is based on his first project- Shiny(due on the 4th week of the program).
Being a yoga teacher, I am a firm believer that health is determined by a person’s individual behaviors. However, factors like ethnicity and sex are cannot be chosen and impact the probability of death from a certain cause.
The goal of the project was to determine what trends exist in the leading causes of death when looked through the lens of ethnicity and sex. I decided to focus on the four major ethnicities (White, Hispanic, Black, and Asian) that reside in my hometown, New York City. To conduct my research, I used data New York City Leading Causes of Death which consisted of 708 observations and 7 variables.
Using dplyr, I deleted any information pertaining to ethnicities that were not clearly defined by race ("Other Race/ Ethnicity", and "Not Stated/Unknown"). I then renamed the factors under Ethnicity and Sex to more simpler terms. Afterward, the number of deaths and death rates were transformed from character strings to numeric values.
In the seven-year span, 418,760 people died. Of the total, 49.3% of them were White, 26.5% were Black, 17.9% were Hispanic and 6.29% were Asian. In regards to sex, 51.2% of deaths were women. Interestingly, more White women died than all Asian, Black, and Hispanic women combined.
I decided to use a box plot to determine the leading cause of death regardless of sex or race. The plot shows it is heart disease followed by cancer which makes up for 59.7% of deaths. Also, here we notice three outliers in heart disease which represent White female deaths from 2007-2009.
Diving deeper, the data suggest that on average more White men and women die from cancer and heart disease than any other race.
Globally we can see that the amount of deaths ascribed to heart disease has been declining while that of cancer relatively remained the same.
However, that is not the case when we look at specific races. For example, for Hispanics, heart disease does also decline from year to year. However, conversely, cancer increases besides having a dip in 2010.
There are many ways to analyze the data. To highlight trends both globally and categorically I used R. Shiny, an interactive web application in which the user can create live analysis. Here one is able to input ethnicity, gender and year to create a side-by-side comparison between two types of people.
The leading cause of death regardless of race, sex or year is heart disease followed by cancer. Though death by heart disease has steadily been decreasing in NYC general, for some ethnicities it is the exact opposite. For example, from 2007-2009, most Asians regardless of sex has died from heart disease. However, in 2010, cancer took the lead and remained the number one cause of death for the next 4 years.