BEcon 4222 - Introduction to Programming
Course Materials and Resources
Welcome to BEcon 4222 - Introduction to Programming

This course introduces you to programming fundamentals using Python, with applications in economics and data science.
Course Structure
The course runs over 12 weeks. Each week includes a 2-hour lecture and a 2-hour exercise session supported by teaching assistants. Week 12 is the final exam (digital, BYOD, 60 minutes). The course is assessed through a group project (70%) and the final exam (30%).
Course Content
π Week 1: Getting Started
Lectures: - Lecture 1a: Introduction - Lecture 1b: Getting Started
Exercises: - Exercise 1: Getting Started - Recap Quiz 1 (non-graded)
Resources: - Common Terminal Commands
π Week 2: Version Control with Git
Lectures: - Lecture 2a: Recap Week 1 - Lecture 2b: Version Control
Exercises: - Exercise 2: First Commands in Git
Resources: - Git Cheat Sheet (PDF)
Setup: - Install Git (instructions) - Install VSCode extension: Git Graph
π Week 3: Git and GitHub for Collaboration
Lectures: - Lecture 3: Version Control with Others
In-class exercise: - Exercise 3: Git and GitHub for Collaboration - generate_data.py
Exercises: - Exercise 3: GitHub
π Week 4: Introduction to Python
Lectures: - Lecture 4: Introduction to Python
Exercises: - Exercise 4: Introduction to Python
π Week 5: Python for Data - Part I
Lectures: - Lecture 5: Pandas I - Lecture data: countries_data.csv
Exercises: - Exercise 5: Pandas I - Exercise data: pwt_data_ex5.csv
π Week 6: Python for Data - Part II
Lectures: - Lecture 6: Pandas II - Lecture data: your_week6_file.csv
Exercises: - Exercise 6: Pandas II - Exercise data: your_ex6_file.csv
π Week 7: Classes and Object-Oriented Programming
Lectures: - Info Group Project - Lecture 7: Classes - Module example: monetary_policy.py
Exercises: - Exercise 7: Classes - Exercise data: pwt_data_ex7.csv
ποΈ Week 9: Relational Databases
Lectures: - Lecture 9: Databases & SQL - Demo script: countries & trade flows
Exercises: - Exercise 9: Relational Databases - FRED data (Parquet)
ποΈ Week 10: SQL Queries
Lectures: - Lecture 10: Queries - Script: build_cepii_db.py
π Week 11: Conclusion & Use Case
Lectures: - Lecture 11: Conclusion
Resources: - Database: wdi.db - Script: build_wdi.py - Script: db_connection_examples.py
Learning Objectives
The goal of this course is to learn to program in a way that is reproducible, reusable, and collaborative. By the end of this course, you will be able to produce structured and impactful work as an economist.
- Write modular Python code, document functions, and implement error handling
- Build reusable tools using object-oriented programming (classes)
- Collaborate on projects using Git, GitHub, and pull requests
- Design relational database schemas and query data with SQL