Data Analysis on Healthy Behaviors

Posted on Feb 8, 2021
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Click here to see my app

An approach for Health Care organizations and professionals 

    Chronic diseases, such as heart disease and diabetes, are leading causes of death and disability in the USA. They are also a leading driver of healthcare costs (1). Data shows 90% of the $3.8 trillion annual health expenditure is devoted to people with chronic diseases and mental health conditions, according to the National Center for Chronic Disease Prevention and Health Promotion.

Most of these diseases have strong environmental components. That means we can prevent them by adjusting our behaviors to avoid risk factors and promote healthy lifestyles. This is why Health Organizations are shifting towards the development of care models that encourage disease prevention and health promotion (2). 

Here I analyze the prevalence of specific behaviors linked to leading causes of death with two goals:

  1.  Help prioritize which behaviors should be addressed with disease-prevention policies and interventions.
  2. Aid to better allocate the resources where they're needed most, by examining the prevalence of different behaviors in a location-specific, population-based manner.

    To achieve the goals listed above, I used two databases from the Center for Disease Control (CDC). The first one provides national and state-specific data on behaviors such as nutrition and physical activity, as well as weight status (3). The second one presents the death rates of the leading causes of death in the United States (4).

Data Analysis on Healthy Behaviors
Table 1. Summary representation of the two databases used in this project.

Relationship between behavior and cause of death

To prioritize which behaviors should be addressed with disease-prevention policies and interventions, I analyzed the relationship between such behaviors/risk factors and leading causes of death in the USA (Table 1). I calculated the correlation coefficient between the percentage of the population that presented particular behaviors and the death rates for each of the selected causes of death (Figure 1).

Data Analysis on Healthy Behaviors
Figure 1. Relationship between behavior and cause of death represented as a correlation coefficient.

The behaviors that we commonly consider as detrimental (e.g. obesity) had, for the most part, a positive correlation with the death rates for all of the selected causes of death. Conversely, the behaviors that we tend to think of as health-promoting had negative correlation coefficients (Figure 1). 

Remarkably, low fruit consumption had some of the strongest positive correlation coefficients.  States where people report eating less than one fruit a day tended to have higher death rates for the selected chronic diseases. 

An unexpected result is that the overweight risk factor had negative but very small correlation coefficients (the values ranged between -0.4 and 0). This result provides the perfect example of the need to be skeptical of weak correlation coefficients. Nevertheless, the relationships represented here by a correlation coefficient mostly conform with popular medical and scientific advice, proving to be useful indicators of which behaviors should be encouraged by disease-prevention programs.

Data on Prevalence of behaviors in each state

    After selecting the behavior, the next logical step is to focus on the location where the policy or disease-prevention programs are to be implemented. The US map shown in the Map tab (Figure 2) provides insights into which states might need the resources the most. In this section, the app enables the user to select one of the behaviors/risk factors and visualize the percentages of the population who reported presenting the selected behavior in each state.

Data Analysis on Healthy Behaviors
Figure 2. Prevalence of behaviors in each state.


    For example, the user decides to implement a program to promote fruit consumption. By selecting the low fruit consumption behavior, they would see that the state where the most people report not eating more than one fruit a day is Mississippi (Figure 2). Thus, the user can grasp the geographical distribution of the prevalence of the behavior at a glance within this map. In that way, this tool aids in making strategic decisions.

Data on Prevalence of behaviors by stratification groups

    To further focus the scope of the policies or programs to be implemented, I grouped the population into different stratification categories and depicted the prevalence of behaviors for each subgroup. The stratification categories included age, gender, sex assigned at birth, income, education, and race/ethnicity. The Stratification tab offers flexibility to select the behavior, state, and stratification category of interest (Figure 3). 

Data Analysis on Healthy Behaviors
Figure 3. Prevalence of behaviors by stratification groups.

    The State trends tab provides further insights into the data. This tab shows the frequency of the behaviors and the death rates of selected chronic diseases over the years (Figure 4).

Figure 4. State trends.

    In conclusion, the analysis of the prevalence of specific behaviors linked to leading causes of death achieved the goals of this project. However, a more robust analysis would take into account not only the mortality but also the morbidity rates. The morbidity rates represent the fraction of the population suffering from specific diseases. Future analyses that include the morbidity rates will prove useful to make strategic decisions regarding the logistics of location-specific and population-based strategies for disease prevention.


  1. Buttorff C, Ruder T, Bauman M. Multiple Chronic Conditions in the United States, Santa Monica, CA: Rand Corp.; 2017.

About Author

Gabriela Huelgas Morales

I am a Data Scientist with a Ph.D. in Biomedical Sciences. I enjoy the challenges of solving complex problems, finding meaningful relationships within the data, and providing actionable recommendations and insights. Before joining NYCDSA, I was a scientist...
View all posts by Gabriela Huelgas Morales >

Related Articles

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI