NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Python > Diabetes Associations

Diabetes Associations

Vallari Shah
Posted on Sep 3, 2022

Introduction

Diabetes is among the most prevalent diseases, impacting millions of Americans each year. It is a serious chronic disease in which individuals lose the ability to effectively regulate levels of glucose in the blood. Complications, such as heart disease, vision loss, lower-limb amputation, kidney disease and infections are associated with  high levels of sugar remaining in the bloodstream for those with diabetes.

Adult-onset diabetes is caused by both genetic and lifestyle factors. Strategies like losing weight, eating healthily, being physically active, and receiving medical treatments can mitigate the harms of this disease in many patients. Patients with pre-diabetes or diabetes early in the disease process may be able to reverse the process of insulin resistance through lifestyle measures. Early diagnosis is, therefore, key to prompting lifestyle changes and more effective treatment, making predictive models for diabetes risk important tools for public and public health officials.

The significance and scale of this problem is also important to recognize. The Centers for Disease Control and Prevention (CDC) has indicated that as of 2018, 34.2 million Americans have diabetes and 88 million have prediabetes. Furthermore, the CDC estimates that 1 in 5 diabetics, and roughly 8 in 10 prediabetics are unaware of their risk. Adult-onset (Type 2) diabetes is the most common form and its prevalence varies by age, education, income, location, race, and other social determinants of health. Much of the burden of the disease falls on those of lower socioeconomic status as well. Diabetes also places a massive burden on the economy; diagnosed diabetes costs of roughly $327 billion dollars annually (1).

Tools Used

Python

Visiaulisation - Pandas, Matplotlib, Seaborn

About the data set

Every year, the CDC carries out a Behaviour Risk Factor Surveillance System (BRFSS), telephone survey of around 400,000 Americans on health related behaviorss, chronic health conditions and the use of preventative services. For this project, the dataset available for the year 2015 was used, with 21 variables and 253,680 survey results from the telephone survey analyzed for their association with pre-diabetes and diabetes.

Overview & Interesting Facts

The dataset examines the following variables

  • Whether the individual has diabetes, pre-diabetes or no diabetes
  • Information on their health conditions such as high blood pressure, high cholesterol, a raised body mass index (BMI), stroke or heart disease history
  • Lifestyle factors such as their level of physical activity and whether they eat fruit, whether they smoke or drink alcohol
  • The state of their general health, mental health, physical helath and difficulty in walking
  • Demographic factors such as gender, age, education and income

The questionaire  yielded 253,680 responses that I examined to determine how many had diabetes or pre-diabetes. This demonstrated that 13.9% of respondents were diabetic with a further 1.8% being pre-diabetic. However, the diagnosis of pre-diabetes is dependent on the level of testing carried out within healthcare. It is likely to be unrecognized in a large proportion of the population because it is entirely asymptomatic. Consequently, those that are tested are likely to be a self-selected, which raises the problem of a  potentially biased population sample and further analysis on whether this is reflective of the true incidence of pre-diabetes within the population would need to be performed to ensure the validity of these survey results.

Next I examined the distribution of each variable using histograms. This demonstrated that most variables had been converted into catagorical types โ€“ with the exception of BMI. This is likely to lead to over-simplification of modelling of the data  for predicting diabetes. Several of these variables would have yieleded more granular data if they had been kept as continuous variables such as age, income, blood pressure, cholesterol. Similarly the status of whether an individual eats fruits or vegetables has been made binary when the amount they eat is also likely to have significance on the risk of developing diabetes. This visualization enables an assessor to gauge the limitations of the data set and also potentially identify outliers in the data. There was no missing data within the dataset. 

 Correlation between the variables

As several of these variables are interrelated, I first sought to determine the correlation between the variables provided in the dataset. This was performed through a Pearson correlation plot that demonstrated a positive correlation between general health, physical health, mental health and difficulty walking. A high correlation was also demonstrated between higher education level and income. There was also a strong negative correlation between general/physical health, as well as education and general health.

Next I examined the relationship between these factors and whether an individual has diabetes, pre-diabetes or neither of those condition.. This demonstrates a positive correlation of diabetes with general health, hypertension, difficulty walking and raised BMI. There was also correlation with heart disease, increasing age and poor physical health. There was a negative correlation with increasing educational attainment and income.

Body mass index and diabetes

I examined the relationship of BMI with diabetes. Initially, I examined this using a boxplot. Although this demonstrated a step-wise increase in BMI in pre-diabetics and diabetics,  due to outliers, it did not allow granular detail to be analyzed.  Therefore, I went on to examine the association of diabetes with BMI with a stacked bar-graph. This demonstrates a clear relationship between increasing BMI until a BMI of around 70. After this, the relationship is not demonstrated, likely as a result of very few patients within these cateagories (data now shown).

Age and diabetes

Next, I examined the relationsip of age and diabetes. In the stacked bar-graph below, you can clearly see a relationship between both pre-diabetes and diabetes with increasing age bands.

Diet and diabetes

Next I examined lifestyle factors, such as diet and smoking, and their association with diabetes. This demonstrates no association with smoking. However, an association was observed with lower incidence of eating fruit/vegetables and lower physical activity and the development of diabetes as well as with drinking excess alcohol.

Income, Education and Diabetes

As shown in the pearsons correlation above, socioeconomic factors such as higher income and higher educational attainment were negatively associated with diabetes. As these associations are likely to be lifestyle related, I went on to examine the relationship between income and lifestyle factors such as physical activity, excess alcohol consumption and diet within these groups to understand the relationship further. Higher income was associated with higher vegetable and fruit consumption as well as increased activity. Alcohol was not as strongly correlated with higher income although a weak association was seen. Better general and physical health were also positively correlated with higher income. These lifestyle factors may partially explain reduced rates of diabetes within the higher income group population.

Key Takeaways

  • Modifiable risk factors: Modifiable risk factors, such as an increased diet of vegetables/fruits, increased physical activity and reduced weight, appear to be negatively correlated with diabetes. Public health measures aimed at increasing availability of fruits and vegetables and measures to reduce weight within the population may improve rates of diabetes.
  • Non modifiable risk factors: There were several non-modifiable factors associated with diabetes within this analysis, such as age, income levels and educational attainment. However, understanding why increasing income and education are associated with reduced rates of diabetes is also important for public health interventions targetted at particular populations. For example, I have demonstrated the relationship between lower physical activity and lower rates of eating vegetables and fruits in the population with lower income.

Conclusions

I have shown a clear correlation between increasing body mass index and diabetes. While it may be easy to draw conclusions in terms of correlation and causation, the clear inter-relationship between several of these factors makes the interpretation of this data more challenging. It is important to remember that correlation does not equate to causation and that further analysis using other methods outside of telephone surveys would be required in order to use data in public health measures to improve rates of diabetes or its identification in the general population.

Resources for the data

https://www.kaggle.com/datasets/alexteboul/diabetes-health-indicators-dataset?resource=download&select=diabetes_012_health_indicators_BRFSS2015.csv

References

(1) https://www.cdc.gov/chronicdisease/resources/publications/aag/diabetes.htm

About Author

Vallari Shah

View all posts by Vallari Shah >

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

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 ChatGPT 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 football 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 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

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application