Author: Zixuan Hao
Date: November 2025
This project conducts an exploratory analysis of data from the CDC’s Behavioral Risk Factor Surveillance System (BRFSS), focusing on obesity prevalence by race/ethnicity in Georgia (2011).
The workflow demonstrates reproducible data science principles:
- Organized file structure
- Reproducible scripts using
here - Automation with a
Makefile - Modular analysis (analysis scripts, saved outputs, and report rendering)
- Data Import & Cleaning
- Descriptive Statistics
- Obesity Prevalence by Race/Ethnicity
- Visualization of Key Findings
- Summary & Interpretation
- FinalProject_R_ZixuanHao.html is located in the
/final_project_Rfolder. - use
make installto install the project environment - use
make allto run the full analysis pipeline - use
make cleanto clean generated files
code/code_analysis.R
- Reads the BRFSS dataset (
data/brfss_obesity.csv) - Cleans and recodes variables
- Creates summary statistics and graphics
- Saves outputs to
output/table1.rdsandoutput/figure1.rds
code/render_report.R
- Uses
rmarkdown::render()to knit the main R Markdown file - Produces the final HTML report
- Saves output to
output/FinalProject_R_ZixuanHao.html
final_project_R
-
code/
code_analysis.R— Processes raw BRFSS data and generates cleaned outputs (tables + figures)render_report.R— Knits the final R Markdown report usingrmarkdown::render()
-
data/
brfss_obesity.csv— Raw input dataset used in the analysis
-
output/
table1.rds— Saved summary table for use in the final reportfigure1.rds— Saved ggplot figure (obesity by race/ethnicity)- May also contain the rendered HTML report, depending on the workflow
-
renv/
- Folder automatically created by
renvto store isolated package libraries - Contains:
activate.R— Bootstraps renv when opening the projectsettings.json— Project-level renv configurationlibrary/— Local package installations (usually excluded from GitHub)
- Folder automatically created by
-
renv.lock
- Lockfile recording the exact R package versions used in this project for full reproducibility
-
Makefile
- Automates the workflow: environment restoration (
make install), running analysis scripts, cleaning outputs, and rendering the final report
- Automates the workflow: environment restoration (
-
final_project_R.Rproj
- RStudio project file that defines the working environment
-
FinalProject_R_ZixuanHao.Rmd
- Main R Markdown file that imports saved outputs and generates the final HTML report
-
FinalProject_R_ZixuanHao.html
- Rendered HTML report created from the R Markdown file
-
README.md
- Documentation describing the purpose, structure, and reproducibility instructions of the project
This project uses the renv package to ensure full reproducibility across systems.
make install
This runs:
renv::restore()