The final report can be generated using the contents of this directory:
- The
Makefilecontains rules for generating targets that culminate in the Final Report. - The
Dockerfilecontains commands for building a container with the appropriate software and packages needed to run this analysis. - The
Codefolder contains various R scripts for different aspects of the analysis. - The
Outputfolder contains various results from different analyses that will be included when building the final report. - The
Datafolder contains the raw data that will be used in the analysis.
To build the image locally on your computer:
- Clone the contents of this repository onto your local machine.
- Ensure you are in the correct working directory (project directory with appropriate project files).
- In the terminal, run
make project_imageto build the image that will have the necessary software and packages to run the analyses for this final report.
There are 2 options for generating the final report. You can either pull or download the image from DockerHub and then use that image to run the container to automatically generate the final report. Alternatively, you can use the included Dockerfile found in this GitHub repository to build the image on your local machine before using that image to run the container and automatically generate the final report.
If you are using a Mac or Linux operating system:
- Clone the contents of this repository onto your local machine.
- Ensure you are in the appropriate working directory (project directory with appropriate project files).
- In the terminal, run
make pull_project_imageto pull the image from DockerHub that has the necessary software and packages to run the analysis. This is an optional step and is not necessary. - In the terminal, run
make mac_docker_image/report.htmlto run the container and automatically generate the final report. You will find the final report .html file inside the "report" folder in the working directory on your local machine.
If you are using a Windows operating system:
- Clone the contents of this repository onto your local machine.
- Ensure you are in the appropriate working directory (project directory with appropriate project files).
- In the terminal, run
make pull_project_imageto pull the image from DockerHub that has the necessary software and packages to run the analysis. This is an optional step and is not necessary. - In the terminal, run
make windows_docker_image/report.htmlto run the container and automatically generate the final report. You will find the final report .html file inside the "report" folder in the working directory on your local machine.
If you are using a Mac or Linux operating system:
- Clone the contents of this repository onto your local machine.
- Ensure you are in the correct working directory (project directory with appropriate project files).
- In the terminal, run
make project_imageto build the image that will have the necessary software and packages to run the analyses. - In the terminal, run
make mac_report/report.htmlto run the container and automatically generate the final report. You will find the final report .html file inside the "report" folder in the project directory on your local machine.
If you are using a Windows operating system:
- Clone the contents of this repository onto your local machine.
- Ensure you are in the correct working directory (project directory with appropriate project files).
- In the terminal, run
make project_imageto build the container that will have the necessary software and packages to run the analyses. - In the terminal, run
make windows_report/report.htmlto run the container and automatically generate the final report. You will find the final report .html file inside the "report" folder in the project directory on your local machine.
- Ensure you are in the correct working directory.
- Ensure you have the renv package installed on your computer.
- In the terminal, run
make installto install necessary packages. As of April 29, this rule has been commented out of the Makefile to ease local image building. This rule will no longer work as of April 29. - In the terminal, run
make report.htmlto create the final report.
Code/01_Calculate_Obesity_Prevalence.R
- Calculates the prevalence of obesity among Local Pediatric Primary Care Clinic patients for each year (2016-2023).
- Saves prevalence information as an
.rdsobject in theOutput/folder. - Calculated prevalence information is later used to create Figure 1.
Code/02_Make_Table1.R
- Creates Table 1 which displays weight status of various sociodemographic groups in the Local Pediatric Primary Care Clinic patient population in 2023. The table displays the number (and row percents) of patients in each weight status category in various groups.
- Saves table information as an
.rdsobject in theOutput/folder.
Code/03_Make_Figure1.R
- Creates Figure 1 which displays prevalence of obesity in the Local Pediatric Primary Care Clinic for each year 2016-2023.
- Saves figure information as an
.rdsobject in theOutput/folder.
Code/04_Render_Report.R
- Creates the Final Report which includes introductory information and the results (Table 1 and Figure 1).
- Rendered report is saved as an
.htmlfile in the main folder.