U.S. Cancer Research & R Shiny Application
The skills we demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Introduction
My career aspiration is to connect medical risk and treatment information from research facilities with individuals at risk and medical professionals. With that in mind, I wanted to build on my WebMD analysis with a more engaging form of research and insights for the medical community. I decided to extract general cancer diagnoses incidents in the United States from 1999 to 2015.
When I began researching, I was disappointed to find very few dynamic and visually friendly resources pertaining to demographics and regions for such a widespread condition. I realized there is a real need for a dynamic application that could be used by medical researchers, hospital management, and potential cancer patients to make informed decisions around this terrible disease and hopefully aid the resource and information allocation for the public and treatment organizations. That's why I decided to build one for this project.
Purpose
I wanted to create an application that can easily identify trends associated with cancer diagnoses in the U.S. pertaining to demographic and geographic attributes. Are there patterns in Cancer diagnoses in gender, race, or age? Are there certain states that have proportionally more diagnoses than others? Is the rate at which cancer patients are being diagnosed increasing against the population growth of the U.S.?
Cancer research centers (i.e. Susan G Komen Foundation, the CDC, etc.), hospitals, and people at risk for cancer should have information that will enable them to make important decisions about where to allocate resources, locate vital help or information, or understand their disposition of risk for getting cancer. Unfortunately federal programs make information available with only limited access or with low resolution and diversity of graphical representation, making it difficult for these stakeholders to readily find the information they seek.
Cancer Statistics in the U.S.
Cancer is the second leading cause of death in the U.S. (to Heart Disease), with more than 1.7 million diagnoses in 2018 and over 600k deaths (Source: Cancer.gov). The Centers for Disease Control and Prevention (CDC) has collected data on incidents of cancer diagnoses in the U.S. uniformly since 1999. The United States Cancer Statistics (USCS) are the official federal registries for cancer incidents collected, maintained, and distributed by the CDC. Data is collected and shown herein as the variables listed below. For more information on the CDC and USCS, or to inspect/extract additional information, click here.
Features:
- State
- Year
- Age Group
- Gender
- Race
- Cancer Diagnosis Count
*Note: Although there are more than 100 types of cancer known and available in the USCS, this application features only the generalized cancer counts. I intend to optimize this application to include all specific forms of cancer in future work.
R Shiny Dashboard
I used the Shiny Dashboard library in R to build my application. As the data could only be extracted from a low-capacity online reporting tool, I first had to extract numerous .txt files; clean, parse, and convert types in the raw data; and merge into one uniform, cleaned dataset in .csv format. I then read this data into RStudio, began exploring and visualizing in aggregate, and lastly built dynamic and filterable tabs in a ui.R, server.R, and global.R to showcase many spatial and demographic distributions of cancer diagnoses.
I used Google’s gVis library for geographical mapping, ggplot2 for gender, race, age, and gender distributions, and the VCD library for a mosaic plot across most features. The application design is meant to be highly interactive with as many filterable capabilities as possible; again, with the goal of serving a wealth of vital information to hospitals and research centers for resource allocation. To see the app for yourself, click here!
Analysis & Insights
- QUESTION 1: At what age are people most likely to be diagnosed with Cancer?
- ANSWER 1: Most people are diagnosed with cancer between ages 50 and 85. The peak age group for diagnosis is age 65.
- QUESTION 2: Are there any races that are diagnosed more than others?
- ANSWER 2: Roughly 90% of people in the U.S. diagnosed with Cancer are caucasian, followed by roughly 8% African-American. This is compared to the roughly 77% population of caucasians and 13% of African-Americans living in the U.S.
- QUESTION 3: Are cancer diagnoses increasing year-over-year?
- ANSWER 3: Diagnoses of cancer are rising by roughly 2% each year from 1999 to 2015. The average annual increase in population in the same period is 0.9%.
- QUESTION 4: Is one gender diagnosed more than the other? Any difference in ages most commonly diagnosed between genders?
- ANSWER 4: There appears to be no difference in diagnosis by gender, nor by distribution of age diagnosed against gender.
- QUESTION 5: Which States have more/less cancer diagnoses?
- ANSWER 5: The amount of cancer diagnoses per state generally tends to follow the amount of population living in that state. The one notable exception is Texas where there are proportionately fewer diagnoses than population compared to other states.
- QUESTION 6: Are there differences in the age different races are diagnosed?
- ANSWER 6: Caucasian and African-American, while roughly comprising of 98% of diagnosed people in the U.S., tend to be diagnosed at an older age (median age 55) as compared to Asian/Pacific (median age 35), Other (median age 35), and Native Americans (median age 25).
Future Work
- Optimize Shiny App by reducing duplication in code and consolidating to global.R.
- Create more interaction between Home page, allowing users to link directly to visualizations from the main page outside of the left menu.
- Extract statistical inference and statistical hypothesis testing to the Race and Age demographics to validate the significance in Race and Age groups observed in the Analysis section.
- Expand the scope of the application to include all specific types of Cancer, other conditions and diseases publicly available (via CDC), and all territories globally.
- Adjust axis labels on Mosaic chart for less clutter. Test accuracy of groupings. Among findings I'd like to check is that the 90% caucasian. From other analysis does not appear consistent with this chart.
- Create Reactive Functions that disable filters without underlying data associated to appear.
- Research and validate accuracy of source (CDC) Data. Coordinate collaborations with CDC to add a visual layer to their medical condition records.
Thank you for reading! If you'd like to see this project on my github, feel free to have a look here. To see the actual R Shiny app, click here.