AEA 1

Table of Contents

Introduction

this lecture

  • in this lecture, we look at:
    • motivation to learn python
    • overview of the course
    • typing texts in markdown and latex
    • markdown files on github
    • first assignment
    • first look at jupyter server

motivation

  • in this course we teach you
    • to combine rigorous economics
    • and how to present it in an understandable way
    • while your results can be easily reproduced
  • we do this by teaching you
    • a programming language: Python
    • how to create notebooks where you can explain your code and
    • publish them on-line, e.g. on github

things to learn

  • when you finish this course, you can
    • solve models in Python
    • do simulations in Python
    • create a file or notebook like this
    • go on to the Datascience course next semester

finishing the course

  • helps you to present economics in a way that is
    • understandable and
    • reproducible
  • gives a good starting point to write your thesis
  • check the website and Canvas for relevant information

Overview of the course

  • Python (most of the time)
    • programming economic models, e.g. market outcome, asymmetric information, oligopoly
    • simulating outcomes and interpreting these results
  • Career Services offers training:
    • these classes are compulsory!
    • see AEA1 on Canvas for details
  • Gender economics taught by Mery Ferrando:
    • helps you to understand gender economics and
    • what we have in mind for the final assignment

Office and Excel

Excel is great for programming?

  • indeed, simple things can be done in excel
  • e.g. keep track of your grades and calculate the average
  • but possibilities are limited: it is not a programming language
  • however, the main problem is reproducibility
  • if you've done a serious project in excel, look at it again in 3 months time…

Open source word processing

markdown

  • see Tirole (2017: 447) for an explanation why open source is so powerful
  • markdown allows you to create structure in a simple way
  • This is illustrated in a screencast: Short introduction to JupyterLab
  • examples are:

# this is a heading

## subheading

* first bullet
* second bullet

[link text](actual link, e.g. http://www.etc)

![Alt text for image](/path/to/img.jpg "Optional title")
  • look on the web for other syntax like footnotes etc.
  • equations you can type in latex

latex

  • latex is great word processing software
  • many students write their thesis in latex
  • here we focus on writing math in latex
  • you can guess what the following will do:
$x^2$, $\beta$, $\sqrt{9}$, $\frac{1}{2}$, $\bar x$

\begin{equation}

a^2 + b^2 = c^2

\end{equation}
  • if you need something, just google; e.g. google "latex phi" or google "latex empty set" etc.

What do you need?

Install software

Working in the cloud

github

  • github allows you to
    • publish web pages
    • work "in the cloud" with version control
    • collaborate in the cloud
    • have different versions ("branches") of the same project
  • version control takes a bit of time to learn
  • but once you get it, the benefits are huge!
  • for this course learning git is optional
  • you can just drag and drop your notebooks on github as we will practice in class
  • you need github to submit your final python assignment (using github classroom)

Rules of the game

to learn python we use datacamp, screencasts and lectures:

  • you need to finish the datacamp courses and screencasts in time
  • otherwise you will be lost during the lectures
  • see the Lecture schedule for the planning
  • if you want to learn everything on your own, you do not need to attend my lectures
  • but if you do attend the lectures, you participate actively
  • you do not learn Python by passively typing in answers!
  • you have to attend Joyce's career services classes
  • Mery's lectures on gender economics, coupled with the Python classes in the same week, give you an idea of what we expect in the final assignment

lecture format

  • in the lectures we will answer questions that you ask us
  • in order to prepare these answers, it is useful if you create an issue via this link
    • using the link, create an "issue" where you explain what your question is: what did you try and why did it not work?
      • hence not something like "I do not know the answer to: Question Calculate the total welfare that this planner can achieve. Denote this value max_welfare."
      • but "I tried to calculate total welfare in the following way … but then I get the following error …"
  • for us to be able to prepare these answers, submit the issue on the Friday before the week in which we discuss the topic

suggested workflow

  • follow the Datacamp courses and make notes of what you learn at Datacamp in a notebook on the jupyterlab server
    • in this way it is easy to refer back to useful code snippets that you see on Datacamp
  • go through the notebook and try to answer the questions and assignments
  • if you get stuck with a problem, watch the corresponding screencast for this part
  • if you still cannot figure it out, create an issue on github to ask us
  • we will answer your questions in class

to get a grade for this course:

  • finish assignment 1 (see below) before the deadline
  • attend the career services workshops
  • read Tirole's book to get ideas on how to work with economics "in the real world"; this will help you with the final assignment and with your thesis
  • Final Assignment
  • Deadlines for the final assignment

Assignment 1

Date: Dept. of Economics, Tilburg University

Author: Jan Boone