Assignment 2 Data science application project (individual assignment)
Assignment 2 Data science application project (individual assignment)
Students will work independently to perform the entire data science pipeline on a given real-world dementia dataset using R. You will be required to describe the entire project in a detailed report and submit the code.
The data set used in this study was obtained from a mobile health care service offered in collaboration with non-governmental organizations that run elderly care centers. This service was provided to elderly people residing in various districts of Hong Kong for free from 2008 to 2018. The data set consists of 2299 cases, each of which includes eleven variables. These variables include age, body height, body weight, education level, financial support, geriatric depression scale score, out-of-pocket financial source (whether they were independent or dependent on family), marital status, Mini Nutritional Assessment part A score, Mini Nutritional Assessment part B score. The outcome labels were based on the categories of the Mini Mental State Exam.
Assignment guidelines:
Each student is required to submit one project report in a Word document, and R files which are reproducible to generate all the results in the report.
R is the only accepted programming language for this assignment. You must use R to complete all tasks and analyses.
Project report guidelines:
Do not include any form of code snippets directly into the report. All code should be included solely in the R files submitted.
Word limit: 800 words (can be within a +/- 10% range of this word limit), excluding references, figures, and tables. The report should be formatted in Times New Roman 12 font with normal margins selected (from the Word 'Layout' menu, choose 'Normal').
Note that 800 words can be a relatively short length for a project report, so it's important to focus on being clear and concise in your writing, and make the maximum use of well-designed visualization to help convey information in a more efficient and impactful way. The following outline should be followed:
Introduction: Introduce the topic of the data science project, including the problem statement and the goals that the project aims to achieve.
Dataset description: Provide background information on the dataset used in the project, including its source and any relevant characteristics. Include summary statistics to give readers an overview of the data.
Data pre-processing: Explain any pre-processing steps that were necessary for the dataset and justify why they were performed. This section should consider steps such as cleaning, transforming or encoding the data.
Exploratory data analysis: Perform preliminary investigations on the dataset using summary statistics and visualizations. This section should provide insights into the dataset and help identify any potential patterns or trends.
Prediction modelling: Select two prediction models and applied them on the given dataset. This section should also include some brief information on the selected models, explain why the chosen models were appropriate for the dataset. Also evaluate the performance of the two models and compare their results using the appropriate performance metrics.
Results and discussion: Analyze the results and discuss the findings in a clear and engaging manner. This section should include visualizations and any insights gleaned from the data.
Conclusion: summarize the project to give a concise overview of the project and useful insights and conclusions.
In addition to the project report, we also require the submission of an R file that includes the complete code performed from data loading to prediction modeling. The code should be well-organized, easy to follow, and produce the same outcomes as presented in the project report.
R file guidelines:
In your submitted code file, include comments to explain the purpose and functionality of each section of code.
Organize the code into clear sections, such as data cleaning, exploratory data analysis and prediction model implementation.
Use white space and indentation to enhance readability.
Avoid using overly complicated code, and instead focus on writing clear, concise code.
Bonus task:
Create an R Shiny app that allows users to interact with the data science pipeline you developed in the project.
Note that
1) This task is a bonus, which means you will not lose any mark if it is not completed. However, if you completed, you would earn extra marks (up to extra 15 points on the total mark of the assignment, with the cap of reaching 100).
2) The bonus task will not be supervised by the teaching staff. Some useful online links are provided to guide creating the R Shiny app. Therefore, students who are interested need to rely on their self-learning and exploration to complete the task.
Specification: The R Shiny app should 1) be user-friendly, with clear instructions and intuitive navigation. 2) Users should be able to upload the dataset, perform exploration data analysis via generating different visualizations, select prediction models, and view performance metrics. To develop the app, the student will need to integrate the code used in the previous tasks into the Shiny framework. Additional features, such as interactive visualizations, can also be added to enhance the user experience.
Submission for the bonus task requires the Shiny app R scripts and a separate simple user guide Word document (1-2 pages) that explains the app's functionality and provides instructions on how to use it. Students can include screenshots and code snippets to showcase the app's features and functionality.
Useful links for Bonus task R shiny task
How to Build a Data Analysis App in R Shiny
https://towardsdatascience.com/how-to-build-a-data-analysis-app-in-r-shiny-143bee9338f7R shiny quick tutorial
https://shiny.rstudio.com/tutorial/written-tutorial/lesson7/
ICT583 2023
Data Background
The data set used was obtained through mobile health care services offered in collaboration with elderly care centres run by local nongovernmental organizations. The health care services were provided for community-dwelling elderly people living in various districts of Hong Kong for free during the period from 2008 to 2018.
'data.frame':2299 obs. of 12 variables:
$ Age : int 86 92 81 79 86 80 84 85 91 99 ...
$ Gender : int 0 1 0 0 0 0 0 0 0 0 ...
$ Body_Height : num 148 156 146 152 157 ...
$ Body_Weight : num 61.1 61.5 47 65.3 57.3 51.1 45.8 61.6 59.6 48.3 ...
$ Education_ID : int 1 NA NA NA 1 1 2 NA NA NA ...
$ Financial_status : int 8 4 2 2 2 2 1 5 1 2 ...
$ GDS : int 5 2 3 3 2 2 2 4 1 1 ...
$ Independent_or_depend_on_family: int 0 0 0 0 0 0 1 1 1 0 ...
$ Marital_status_ID : int 3 2 3 1 3 3 2 2 3 3 ...
$ MNAa_total : int 12 14 13 14 13 14 12 12 13 10 ...
$ MNAb_total : num 10.5 15 15 16 13.5 15 13 13.5 NA 8.5 ...
$ MMSE_class_binary : int 0 0 0 0 0 1 0 0 1 1 ...
It contains 2299 cases (observations), and 12 variables (features).
The features are :
age, sex, body height, body weight, education level, financial support, geriatric depression scale score, out-of-pocket financial source (being independent or depending on family), marital status, Mini Nutritional Assessment part A score, Mini Nutritional Assessment part B score.
The mini mental state exam categories are the outcome labels.
Gender Gender 0 Female
1 Male
Education_ID education 1 no edu
2 primary school
3 secondary school
4 tertiary
Financial_status Financial Status 1 Independent or depend on family
2 Comprehensive Social Security Assistance
3 Disability Allowance
4 Old Age Allowance
5 Independent or depend on family with Old Age Allowance
6 Independent or depend on family with Disability Allowance
7 Independent or depend on family with CSSA
Marital_status_ID Marital Status 1 Single
2 Married
3 Widowed
4 Separate
5 Divorced
6 Married but not live with spouse
GDS https://en.wikipedia.org/wiki/Geriatric_Depression_Scale
MNAa_tot https://pubmed.ncbi.nlm.nih.gov/9990575/https://pubmed.ncbi.nlm.nih.gov/24866345/MNAb_tot https://pubmed.ncbi.nlm.nih.gov/9990575/https://pubmed.ncbi.nlm.nih.gov/24866345/MMSE_class_binary mini mental state exam outcome 0 Negative indicate no dementia risk
1 Positive indicate possible dementia risk