SEIC x DSA Python for Macroeconomics Workshop 2024

Welcome!

This site serves as a repository for the slides and codes developed for the ‘Macroeconomics with Python Workshop’ for SEIC x DSA club members at SMU.

Instructor: Bella Ratmelia, Research & Data Services, SMU Libraries

Teaching Assistants:

  • Rein Alfri (SOE)
  • Anya Dharsan (SCIS)
  • Somesh Balamurugan (SOE)
  • Tay Mui Yen (SMU Libraries)
  • Tee Lip Hwee (SMU Libraries)

Schedule

Slides will be progressively made available below.

Date and Time Venue Topic & Slides Quiz
Sat, 7 Sep 2024, 10 AM - 12 PM YPHSL Seminar Room 3-12 Python basics Quiz 1
Sat, 14 Sep 2024, 10 AM - 12 PM SOSS/CIS Seminar Room 3-1 Introduction to Numpy and Matplotlib Quiz 2
Sat, 28 Sep 2024, 10 AM - 12 PM SOSS/CIS Seminar Room 3-1 Data wrangling and timeseries with Dataframe Quiz 3
Sat, 5 Oct 2024, 10 AM - 12 PM SOSS/CIS Seminar Room 3-1 Retrieve data with APIs and analyze with statsmodels -
Important - Please bring your laptop & charger to the workshop

As this is a hands-on workshop, please do bring your laptop. Tablets like Surface or iPad will not be sufficient as they could not run Visual Studio Code.

Pre-workshop activities

This workshop will use Visual Studio Code, or VS Code. It is a free, versatile code editor that supports many programming languages, including Python. It offers a user-friendly interface for writing and running Python code, and with the right extensions, it can also handle Jupyter notebooks!

Please install the following things in your laptop before the workshop:

  1. Download and install the latest python3 for your machine (should be version 3.12 or thereabouts).

    • If you are on Windows, at the start of the installation, tick the “Add Python 3.12 to PATH”.
  2. Download and install Visual Studio Code. Check out the setup instructions for Windows and macOS

  3. Once you’ve installed Visual Studio code, start it up. Open the Extension tab on the left sidebar (Ctrl + Shift + X on Windows or Cmd + Shift + X on macOS) and install the Python and Jupyter extension. (The extension creator should be Microsoft)

  1. Fill up the pre-workshop survey! Please fill this up before the beginning of session 1.

Datasets

What is a CSV?

A CSV (Comma-Separated Values) file is a type of file that stores data in a plain text format. Each line in the file represents a row of data, and within each row, individual pieces of data (like numbers or words) are separated by commas.

This format is commonly used for storing and transferring data, especially in spreadsheets and databases. Because it is literally just plain text, it is an ideal format if you have large amount of data.

You can open CSV files in Excel, Google Sheets, or even Notepad!

Dataset 1: sg-gdp.csv

For session 2 of this workshop, we will be using small dataset stored in a CSV file called sg-gdp.csv.

Click here to open sg-gdp.csv, and then Ctrl + S / Cmd + S to save it locally into your data folder

Dataset 2: unemployment-age.csv

For session 3 of this workshop, we will be using small dataset stored in a CSV file called unemployment-age.csv. This is a time series data that tracks unemployment rate for various age groups in United States, retrieved from Federal Reserve Economic Data (FRED).

Click here to open unemployment-age.csv, and then Ctrl + S / Cmd + S to save it locally into your data folder