Skip to content

Data analysis of lung cancer responses using custom built hash table

Notifications You must be signed in to change notification settings

yingzhou0212/SurveyDataAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

// # Project 2: Survey Data Analysis:

CSC 172 - Project 2: Survey Data Analysis**

Team Members

Overview: This project analyzes survey data from lung cancer patients to extract insights about their quality of life. The data includes both demographic and medical information. We built a custom hash table to store and analyze the responses, and implemented several methods to compute distributions and life quality statistics.

How to Run the Project:

  1. Make sure the following files are in the same directory:
    Response.java, CustomHashTable.java, ReadFile.java, SurveyDataAnalyzer.java, Tests.java, and responses.txt

  2. To run the analysis, execute: SurveyDataAnalyzer.java

  3. To run the test suite, execute: Tests.java

File Format: The program expects the responses.txt file to contain tab-separated values (TSV), not comma-separated, with the following fields:

ID, Gender, Age, Residence, Education, IncomeSource, MaritalStatus, Smoker, Year, 
Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q20, Q21, Q22, 
Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q30

Each row should have 31 values. The gender field is expected to be a letter: "F", "M", "O" (Other), or "-" (Unknown). You can adjust the data preprocessing if the dataset uses numeric codes instead.

Implemented Features: We implemented the following 20 analysis methods in SurveyDataAnalyzer.java:

  1. genderDistribution()
  2. ageGroupDistribution()
  3. residenceDistribution()
  4. educationDistribution()
  5. incomeDistribution()
  6. maritalDistribution()
  7. smokerDistribution()
  8. lifeQualityGeneral()
  9. lifeQualityGenderBased()
  10. lifeQualityAgeBased()
  11. lifeQualityResidenceBased()
  12. lifeQualityEducationBased()
  13. lifeQualityIncomeBased()
  14. lifeQualityMaritalBased()
  15. lifeQualitySmokerBased()
  16. mostCommonTreatment()
  17. mostCommonSymptoms()
  18. mostCommonLifeAspects()
  19. lifeQualityMixConditionsBased()
  20. lifeQualityResponseBased()

Each method has been tested using sample expected outputs in the Tests.java file.

About

Data analysis of lung cancer responses using custom built hash table

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages