6 Backwards Engineering Report
This chapter gives an overview the first assessment, the backwards engineering report along with the files you will need and some helpful hints. If you are enrolled on Applied Data Skills, please ensure you have read the Assessment Information Sheet in full before proceeding further.
6.1 Details and files
To get started, download this zip file which contains the data files and the finished html report that you need to backwards engineer from the data.
There are multiple ways to achieve the same outcome when coding. You do not have to use the same solutions that we did; what matters is that the output is the same and that it is reproducible.
Your code should contain comments so that it is clear what you have done and why.
All plots and tables in the report should be fully reproducible, in addition, all numbers and text that are bold and underlined should also be reproducible, i.e., you should use inline coding rather than just writing out the numbers in the text.
For any visuals, you should get as close to the example report as possible, for example, use of headings, theme, table of contents, although we recognise that it may be difficult to know the exact theme or colours used without seeing the code. Close enough will do.
For the “Analysis and interpretation” section, the important thing here isn’t necessarily that you can reproduce this - it’s just text so it’s fairly simple. The important thing is that you see that what is written here isn’t explicitly contained in the data, this is our interpretation - we’ve added meaning to it. You can reproduce this text or you can change it if you have a different interpretation or if you think there is anything else that the data shows that is important to highlight.
-
In order to replicate the report you will need the following skills:
- Quarto text formatting (e.g., bold, italics, headings)
- Adding images from online sources
- Joining datasets together
- Filtering and selecting data
- Data visualisation
- Summarising data in tables
- Inline coding
Most of what you need to do generate this report will have been covered at least once in the workbook, but you should also expect to need to Google some things. Being able to search for alternative solutions is such a key skill for programming and it will also increase your self-efficacy and sense of autonomy to be able to apply your skills to a novel task.
6.2 Support
This assessment will require you to use the skills you have learned from Chapter 1 (Intro to R and R Studio) up to and including Chapter 5 (Data Relations) of the Applied Data Skills workbook. You can also ask for help on Teams, although because this is a summative activity, the help we give will be constrained.
Google and Stack Overflow will help you a lot. Remember to include the names of packages and functions to help ensure the results are closer to what you’re trying to do.
Do not use AI for this task. We’re going to use AI to write the code again in Week 7 in the lab so if you use AI for your first attempt, the lab will be pointless and you will learn nothing. Trust us. We’re not anti-AI, we’re just pro-learning.
6.3 Helpful hints
A few hints to help you on your way:
- You have no other work to do this week for ADS aside from AITutoR - this replaces the workshops, reading, AND quizzes so expect to spend quite a few hours on the report. It won’t be something you’re likely to do in one sitting.
- Your first step should be to open the data files and figure out what each variable is and whether there are any common variables across the datasets, you may need to rename some of them.
- For one of the datasets, we’re going to give you a few lines of code to load in the data as it needs a little bit of wrangling we haven’t yet taught you.
- The Output Area is formatted as a “block quote”.
- Getting the percentages grouped by the right thing will do your head in. You will need to become familiar and comfortable with
group_by()andungroup(). Good luck. - For Table 2 and 3, we haven’t taught you how to do this the “proper” way yet, which is to use a function named
pivot_wider(). You can look up this function or you could filter the data to create two separate Tables for each identity and then join them together, which we have taught you. - Figure 3 requires you to do the same wrangling and summarisation as Table 2, just by constituency not region.
- Hint:
theme_economist() - Hint:
scale_fill_brewer(palette = "Blues") - Hint:
scales::label_wrap() - Hint:
annotate()
6.4 Why am I being assessed like this?
This report serves as a practice for the full report, which will be due at the end of the semester. The backwards engineering report gives you the intended output so that you can focus on your coding skills, rather than deciding how to summarise and present the data. You will need to make these decisions yourself for the full report.
The peer review exercise will support you to evaluate code. It will provide a useful demonstration of how there are always mulitple approaches to the same problem and reading other people’s code will reinforce why reproducibility and clear comments are useful.
The mark for participation and attendance component rewards consistent engagement with the course. Programming is not a skill that can be developed through cramming, it requires steady practice and we want to reward those of you who engage in this way.
Whilst most of the skills required for this report have been explicitly taught, there are minor bits of the coding that will require you to look up solutions independently. This will be good practice for the final report and for applying your coding skills to new and novel problems.