NON-COMMUNICABLE DISEASES IN NYC AND ITS EFFECTS ON ETHNIC GROUPS

It is an old dataset and the only shortcoming is that it is less likely to tell us the 2020 or 2021 reality The story here is about how Non-hispanic white have in recent years are increasingly being more impacted by the diseases of heart, while the death rate of the same among the black community has reduced. It would be interesting to find out the reason behind this flip. Like what is being done in the black community to bring down the rate And why the death rate is increasing in non-hispanic white.

import pandas as pd
import altair as alt
df = pd.read_csv('New_York_City_Leading_Causes_of_Death.csv')
df.head(2)
Year Leading Cause Sex Race Ethnicity Deaths Death Rate Age Adjusted Death Rate
0 2015 Malignant Neoplasms (Cancer: C00-C97) Female Asian and Pacific Islander 515 79.72666911 78.86538643
1 2015 Diseases of Heart (I00-I09, I11, I13, I20-I51) Female Asian and Pacific Islander 498 77.09491499 81.60513144

df.shape
(1516, 7)
alt.Chart(df.head(10)).mark_bar().encode(
    x = 'Death Rate:Q',
    y = 'Leading Cause:N',
    tooltip = 'Race Ethnicity',
)
#this is what I was hoping for, but it is tiny
alt.Chart(df.head(10)).mark_point( filled=True,
    size=100).encode(
    x = 'Death Rate:Q',
    y = 'Race Ethnicity:N',
    tooltip = 'Leading Cause',
)
df.head(2)
Year Leading Cause Sex Race Ethnicity Deaths Death Rate Age Adjusted Death Rate
0 2015 Malignant Neoplasms (Cancer: C00-C97) Female Asian and Pacific Islander 515 79.72666911 78.86538643
1 2015 Diseases of Heart (I00-I09, I11, I13, I20-I51) Female Asian and Pacific Islander 498 77.09491499 81.60513144

alt.Chart(df).mark_point().encode(
    x = 'Year:N',
    y = 'Death Rate:Q',
    tooltip = 'Leading Cause',
     color = 'Race Ethnicity'
)