code description

code/01_make_table1.R

  • generates summary_vaccine_table, a summary table of number of vaccine that has been delivered
  • generates Top6_table. This table shows the top six number of deliveray date in Georgia ordered by four mainstream Covid-19 vaccine suppliers: Janssen, Moderna, Pfizer, and Novavax.
  • saves tables as a .rds objects in output/ folder

code/02_make_plot.R

  • generates Deliver_plot. The plot shows the deliver trend of four types of vaccine.
  • saves plot as a .png object in output/ folder

code/03_render_report.R

  • renders report.Rmd

report.Rmd

  • reads tables generated by code/01_make_table1.R
  • reads plot generated by code/02_make_plot.R
  • show Top6_table, summary_vaccine_table, Deliver_plot

Dockerfile

  • DOCKER BUILD: Instructions for building the image:

    1. Pull r-ubuntu from Docker hub
    2. Create project directory and send it to working directory
    3. CREATE an ENV variable set environment variables in image to fit windows systems and Mac/Linux-OS-specific target
    4. Create code output directories in container
    5. Copy necessary files to the container directories
    6. Install needed packages by renv snapshot
    7. Install needed packages manually
    8. Install all the packages in the container
    9. Move report.html from container to local report directory
  • DOCKER PULL

    1. pull the image directly from the DOCKER public repository link to the image on DockerHub: https://hub.docker.com/layers/yyan655/project_image/latest/images/sha256:86de9fa3b90e0d25fadf05531a192739aa87dc7c74c227aa3e1e0a4a514b62fe
  • DOCKER RUN: Instructions for running the automated version of the image:

    1. make project_image
      Using make rule to build docker image
    2. make pull_image
      First choose: run docker pull yyan655/project_image to pull built image from Docker Hub
    3. make report/report.html
      By including all the files needed to update the docker both renv file and code and data files, in the container, run all the code and generate report.html. Using make rule to mount project/report with local report directory. And showing report.html in the local report directory.

Makefile

  • report.html
  • output/table.rds
  • output/plot.png
  • install
  • project_image
  • pull_image
  • report/report.html
  • clean