๐Ÿ’ป Week 02 - Class Roadmap (90 min)

2024/25 Autumn Term

Author

The DS101A Team

Published

11 October 2024

Important

Youโ€™ll find the script that was demonstrated from Step 2 onwards here!

Welcome to the second seminar/lab class of DS101A!

In the week 02 lecture, we introduced you to the most common data types and file formats.

In this lab, we get to practice the same concepts with a limited amount of code.

You can keep referencing these readings on the common data types and file formats throughout:

โ€œGetting Started with Python Lists and Dictionaries. Scaleway Documentation.โ€ 2024. October 8, 2024. https://www.scaleway.com/en/docs/tutorials/python-lists-dicts/.
Shah, Chirag. 2020. A Hands-on Introduction to Data Science. Cambridge, United Kingdom ; New York, NY, USA: Cambridge University Press. https://librarysearch.lse.ac.uk/permalink/f/1n2k4al/TN_cdi_askewsholts_vlebooks_9781108673907.
Sturz, John. 2023. โ€œBasic Data Types in Python.โ€ Real Python. https://realpython.com/python-data-types/.

Step 01 - Common discussion on data and datatypes (15 min)

  1. Letโ€™s have a look at a few datasets with economic data:

    1. World Bank Group
    2. MP Donations - Consolidate
    • What sorts of access do these sites provide?
    • What are all the ways you can think of to obtain data?
    • What are some good sources for social, economic and political data?
    • Do you recognize any data types we saw on Monday?
  2. Have a look at the readings listed at the beginning of the roadmap ((Sturz 2023) and (Shah 2020) and (โ€œGetting Started with Python Lists and Dictionaries. Scaleway Documentationโ€ 2024)) and answer the following questions:

    • What is a Boolean data type in Python?
    • What is a list?
    • What is a dictionary?

Step 02 โ€“ Common formats (15 min)

  1. Download the following dataset:

  1. Your class teacher will share a Google Colab notebook on Slack with you. Work through the notebook and follow instructions there.

Step 03 โ€“ Observations and storytelling (15 min)

  1. What sort of observations can you make from the data from step 02?

Step 04 โ€“ Bonus: Re-tructure your data (15 min)

  1. Explore the JSON generated at JSON Crack
  2. Try and change the structure of the JSON you made.