The purpose of this assignment is to ensure that everyone gains hands-on practice creating reproducible reports using Quarto.
Throughout the pre-requisites for DSCI 310, you have become familiar with using Jupyter Notebooks to interweave narration and runnable code into a single document. This allowed you to pass your analysis over to a co-worker or reviewer, who could reproduce your work by running your notebook from top to bottom.
But are Jupyter Notebooks all there is to creating reproducible reports? Not entirely… For example, Jupyter Notebooks struggle with organization and configuration. Imagine you have an extremely long and complicated report packed into a single Jupyter Notebook. Writing out a table of contents, formatting a bibliography, and adding labels to figures can become extremely cumbersome, especially as they evolve with your analysis during the review process.
Imagine you have 25 figures and tables labelled 1 to 25 and you decide to add a new figure at the very start of your report; figure 1 now needs to be renamed to figure 2, table 2 now needs to be renamed to table 3, figure 3 now needs to be renamed to figure 4…
This is where Quarto (and related tools) can come in handy. Although they have their own set of disadvantages, they are certainly an improvement over plain Jupyter Notebooks. They allow for the automatic creation and formatting of a table of contents, a bibliography, and those pesky figure labels, among many other features. During this individual assignment, you will start to familiarize yourself with Quarto reports, start to understand their advantages and disadvantages, and begin to recognize their similarities and differences from basic Jupyter notebooks.
We suggest you read through the instructions first before doing them in sequence.
Goal: Create a copy from the template repository.
Notes:
Goal: Get familiar with the repository
Inside the the R template repository or the Python template repository, there are several directories and files. Here is a quick rundown of each:
data
: contains data used in the analysis (do not edit)reports
: contains the Quarto report file (ends in qmd_example.qmd
) that contains the narrative of the analysis report and the code to display the analysis artifacts (tables and figures) (incomplete - you will need to edit this), and the BibTeX references file (references.bib
) for the report (do not edit)Makefile
: declares commands used to build the Quarto report (do not edit)
results
: output of the script in source
source/generate_figures.R
or source/generate_figures.py
: a script that performs the analysis and outputs
various plots and a table that are to be used in the report (do not edit)Goal: Familiarize yourself with the Makefile
targets
Makefile
has all the targets needed to render the final Quarto report.qmd
target to do this.Notes:
docs/qmd_example.html
docs/qmd_example.pdf
Makefile
commands will help youGoal: Create the example report so that it is a polished academic manuscript.
Edit reports/qmd_example.rmd
(using either R or Python Quarto syntax, the choice is yours)
so that:
???
in the Quarto report narrative text
with inline Quarto code,
so that the text will be automatically updated with the correct value
(docs on how to do this)docs
directory
so that the report is viewable on the web.You will submit a PDF to Gradescope for individual assignment 3 that includes:
A link to the GitHub.com repository that you create for this assignment.
(optional) link to the HTML report served on GitHub pages.
This assignment will be graded for completion as follows:
Grade | Description |
---|---|
110% | All 6 of the required edits to the .qmd document above were met and the HTML version of the report was served up on GitHub pages |
100% | All 6 of the required edits to the .qmd document above were met and the report generates a working PDF and HTML file via the Makefile . |
85% | 5/6 of the required edits to the .qmd document listed above were met. |
70% | 4/6 of the required edits to the .qmd document listed above were met. |
55% | 3/6 of the required edits to the .qmd document listed above were met. |
40% | 2/6 of the required edits to the .qmd document listed above were met. |
25% | 1/6 of the required edits to the .qmd document listed above were met. |
0% | The assignment was not attempted. |