12  Assessment 2

A project demonstrating data visualisation and summary skills

12.1 Instructions

Your task is to replicate this html report using this dataset and code, and to generate an appropriate visualisation for the final plot. The submission must contain the following:

12.2 Hints and Tips

  • The html theme used by the demo report is flatly
  • The ggplot theme is theme_bw()
  • Make Tables 1-2 using markdown
  • You will need to use filter() to create the data for Tables 3-4; do not just type the numbers from the demo table
  • Display Tables 3-4 using flextable()
  • You shouldn’t need any packages apart from tidyverse and flextable
  • The colours are “dodgerblue3”, “darkgreen”, “goldenrod”, “darkorange2”, and “firebrick”
  • The bibtex for the WHO reference is:
@techreport{who_unicef_2024,
  author      = {{WHO/UNICEF Joint Monitoring Programme for Water Supply,
                  Sanitation and Hygiene}},
  title       = {Progress on Drinking Water, 
                 Sanitation and Hygiene in Schools 2015--2023},
  institution = {UNICEF and World Health Organization},
  address     = {New York},
  year        = {2024}
}

12.3 Submission

  • Covers: chapters 1-4, emphasising 3 and 4
  • Worth: 20%
  • Do not put your name in your report; use your student ID as the author.
  • Please submit a zip file containing:
    1. the .rproj file
    2. your reproducible script, named report2_studentID.qmd
    3. any additional files necessary to reproduce your report (e.g., images or bibliography files),
    4. the rendered html report, named report2_studentID.html.

12.4 Marking Rubric

You will receive green/amber/red lights for each of the elements below, and a generic feedback document explaining common issues. Each rubric element is weighted equally.

  • Green: Perfect or nearly perfect
  • Amber: Needs some improvement
  • Red: Incorrect or absent
Elements Green Amber Red
Reproducible project
Document replicated
Captions/references
Data import
Figures replicated
Tables replicated
Figure 4 appropriate
Consistent visualisations
Clear code
Efficient code
Reflection

Total: 0/22

12.4.1 Reproducible project

The project contains all of the necessary files and can be rendered by the marker.

12.4.2 Document replicated

The non-code elements of the document are replicated, such as table of contents, text paragraphs, and Tables 1-2.

12.4.3 Captions/references

The figure and table captions are created correctly and quarto cross referencing (not manual linking) is used for figures, tables, and bibliographic references. The figures have descriptive alt-text for accessibility.

12.4.4 Data import

You imported the data with correct data types, including putting factors in sensible order for later plots or tables.

12.4.5 Tables replicated

Tables 3-4 are created by filtering the data using code, and have all of the features of the example table, such as the same rounding and coloured labels.

12.4.6 Figures replicated

Figures 1-3 are created using code, and have all of the features of the example plots, such as label, axis or colour customisation.

12.4.7 Figure 4 appropriate

You chose an appropriate geom (or set of geoms) for the relationship being demonstrated.

12.4.8 Consistent visualisations

Figure 4 has consistent features with Figures 1-3, such as the same labels or same colours for the same levels (or different colours if you use colour to highlight different levels).

12.4.9 Clear code

Your code is organised in the quarto script cleanly and clearly, using separate code chunks to intersperse text and relevant code. Your code chunks contain comments that clarify the purpose of the code, but not overly-explaining each step. The names you use for objects are clear, consistent, and concise.

For example, if the marker wants to assess the code that creates a specific table, they should be easily able to identify that object in the environment from the name, and easily able to find the code that creates it.

12.4.10 Efficient code

While there are many ways to do the same things in R, some ways are more efficient than others. These avoid unnecessary code (e.g., do not load packages you do not use) and redundancy (e.g., do not load or process the data the same way in several places).

If you find yourself re-typing something repeatedly, see if you can define an object early in the script and use that instead.

You will not be asked to do anything “tricky” in this assessment, so if you find yourself needing 20 lines of code just to customise the labels in a plot, try looking for more efficient alternatives.

12.4.11 Reflection

You summarise what you learned in the course of doing this assessment.