โœ… Solutions to the W04 Formative Exercise

2024/25 Autumn Term

Author
Published

30 October 2024

    Image created with the AI embedded in MS Designer using the prompt 'abstract salmon pink light blue icon depicting the metaphysical experience of cleaning up, reshaping, pivoting, and manipulating data in search of the purest insights in data science.'

This page contains comments and solutions to the tasks in the ๐Ÿ“ W04 Formative Exercise.

Model solutions

Here I highlight three solutions to the W04 Formative Exercise that I found particularly interesting. Here you will find a link to forks of their original repositories, along with some of my comments on their work. All authors have agreed to have their solutions shared here โ€“ thanks a lot for that!

Solution 1: Sabaa Pasha

Sabaa created an excellent GitHub logo GitHub repository (a fork is available here) with a clear directory structure, Jupyter notebooks that are well-organised and meaningful, and a README file that is clean an super effective.

โ˜‘๏ธ See feedback

Here comes the feedback on your W04-Formative Submission.

Marker: @jonjoncardoso

The good stuff!

  • Everything! Thereโ€™s essentially nothing to complain about here. You used relative paths in your README.md, you managed to render your image correctly and your folders & files are very neat, concise and organised ๐ŸŽ‰
  • You can ignore the experimental automatic checks that said your notebooks did not have proper formatting or the code didnโ€™t run. I can confirm that when I loaded your notebooks on VS Code, everything runs smoothly.

Things to improve

  1. Try to use this repository as the central place to store your notes. Keep adding notebooks as you navigate the learning required in this course.
  2. If you follow the advice above, you can rename this repository to a name that is more suitable, like ds105a-2024-personal-notes.

How to react to this feedback

You can either 1) simply read, absorb the feedback and implement the changes to the next summative or 2) make changes to this repository as you learn about a new feature of GitHub, called GitHub Issues to document progress with your project.

If youโ€™re going with option 2, check the boxes below as you make progress:

Solution 2: Joshua Jooste

Joshua also produced a very neat and well-organised GitHub logo GitHub repository (a fork is available here). The README file is effective, and the notebooks are well-organised, consise yet useful.

โ˜‘๏ธ See feedback

Here comes the feedback on your W04-Formative Submission.

Marker: @jonjoncardoso

The good stuff!

  • It ticks all the boxes! There was nothing wrong or incomplete about your repository.
  • I like how you split the files into topics โ€” many others preferred to do it by Week.
  • The notebooks are short, yet I can see how they can be very effective as a good reference point for yourself in the future, should you wish to revisit how to do something in Python/terminal/pandas. Ultimately, it does feel like those are useful notes to yourself.

Things to improve

  1. Try to use this repository as the central place to store your notes. Keep adding notebooks as you navigate the learning required in this course.
  2. If you follow the advice above, you can rename this repository to a name that is more suitable, like ds105a-2024-personal-notes.

How to react to this feedback

You can either 1) simply read, absorb the feedback and implement the changes to the next summative or 2) make changes to this repository as you learn about a new feature of GitHub, called GitHub Issues to document progress with your project.

If youโ€™re going with option 2, check the boxes below as you make progress:

Solution 3: Rhys Morgan

Rhys has created a GitHub logo GitHub repository with a clear structure, and a README that is simple yet effective - a fork is available here. Most importantly, Rhys managed to link an image to the README file using relative paths. This is a task that many students found challenging, so itโ€™s great to see it done correctly.

โ˜‘๏ธ See feedback

Here comes the feedback on your W04-Formative Submission.

Marker: @jonjoncardoso

The good stuff!

  • You managed to link your image correctly into your README file! Many people found that very difficult. In the end, it was a matter of using the Markdown syntax for images, which is ![ ]( ). This required looking up how to do things with Markdown and/or checking how I added links to the Jupyter Notebooks showed in class, but it also required remembering the notion of relative paths from the ๐Ÿ“ W01 Formative Exercise.

    Your Markdown image addition was perfectly created:

    ![This is a photo of me eating a pie!!!](figures/my-image.jpeg)

    You correctly pointed to the image that was in the figures/ folder.

    The text within the square brackets [ ] represents the title (legend of the image) and the bit within parenthesis ( ) is the relative path or absolute path to where the image is. Since the README is at the top of the repository, sitting alongside the figures/ an code/ and data folders, another way you could specify the path would be with the . :

    ![This is a photo of me eating a pie!!!](./figures/my-image.jpeg)
  • You chose to break down your notes per week of the course, and each one of the notebooks under code/ was perfectly organised, with good headings, use of Markdown quotes (with the > symbol).

    • I found W02-Summary.ipynb notebook particularly great! It was good fun to see use of real data (Harry Potter books) to demonstrate the concepts of Python. I could have thought of that when teaching Python! (next time)
  • You had very good meaningful Git commit messages! Your commits will give you an insight into how you were learning and discovering new things as you were taking the notes.

Things to improve

There are only a few minor things you could have changed to impress us even a bit more:

  1. Your Python-Commands.py script should not be in the data/ folder. This is a python script, it makes more sense for it to be inside code/.
  2. Your README did not link to the notebooks โ†’ it would have been a nice addition and would be good to show us that you know your relative paths.
  3. Your bullet points didnโ€™t work on GitHub. The reason is the extra space you have on the left-hand side of those lines.

It would have worked if instead of:

## About Me!

    - I am studying BSc Economics in my first year at LSE
    - I have chosen data science as a way be able to learn how to code as well as learn what data science is  all about 

You had written:

## About Me!

- I am studying BSc Economics in my first year at LSE
- I have chosen data science as a way be able to learn how to code as well as learn what data science is  all about 

Pro-tip: Different text editors render Markdown differently. It could be that on VS Code, you were seeing the bullet points just fine.

  1. I like how you used from pprint import pprint in your W03 notebook. pprint(dictionary) makes it a lot easier to understand the keys and values of a dictionary as opposed to print(dictionary).

    However, the notebook ended up with a lot of very long lines, and it requires a lot of scrolling down. This is absolutely fine when you are prototyping and exploring the data but it makes it difficult to read the content of the notebook when it is shared as more like a report.

How to react to this feedback

You can either 1) simply read, absorb the feedback and implement the changes to the next summative or 2) make changes to this repository as you learn about a new feature of GitHub, called GitHub Issues to document progress with your project.

If youโ€™re going with option 2, check the boxes below as you make progress: