ScPoProgramming

SciencesPo Paris, Ecole Doctorale 2024

Welcome to Introduction to Programming

  • This website is the home of the course Introduction to Programming taught to first year PhD students (M1) in the doctoral program of the department of economics at Sciences Po Paris.
  • This course assumes no prior programming experience.
  • Below you will find setup instructions and a syllabus.
  • You can obtain all material for this course from the associated github repository at link

Objectives of this Course

  • After this course, we want you to be able to participate or conduct your own research project in an efficient way. Research nowadays means data sciencey stuff in most cases, certainly in Economics.
  • We want you to have a basic understanding of how an operating system (in particular, your OS) works.
  • We want to be able to achieve a basic level of automation in repetitive tasks.
  • We want you to know what Version Control is and how to use it in a research project.
  • We will introduce some (hopefully) useful R programming.

Syllabus

Session Number Topic Author
1 The Unix Shell The Software Carpentry Project + Florian Oswald
2 Shell: Files and Directories The Software Carpentry Project + Florian Oswald
3 Shell: Working with Files and Directories The Software Carpentry Project + Florian Oswald
4 Shell: Pipes and Filters The Software Carpentry Project + Florian Oswald
5 Git Version Control The Software Carpentry Project + Florian Oswald
Homework 1: complete and run a bash script on gh-actions Florian Oswald
6 R Intro Florian Oswald
7 R {tidyverse} Grant McDermott + Florian Oswald
8 R and python generics Florian Oswald
9 R {data.table} Grant McDermott + Florian Oswald
10 Building R packages Florian Oswald
11 Spatial Data with R Florian Oswald
12 julia intro 1 Florian Oswald
13 julia intro 2 Florian Oswald
14 Quick Intro to NLP with R Florian Oswald

Setup Instructions

  • You must bring your own laptop to each class.
  • Please make sure you have an up to date operating system, i.e. run a software update before we start.
  • Everybody should install R or make sure they have a recent version installed.
  • Everybody should install RStudio or run an update on the installed program.

Windows and Mac Specific Instructions

There are different instructions depending on whether you have a Mac or a Windows computer. Unix-based computers are similar to Macs in most respects.

Windows

We need to install some things that make your windows computer a resemble a bit a Unix box. In particular, we want to be able to use the unix shell. Therefore, I want you to download and install

Specifics:

  1. During the installation process, choose all default settings.
  2. At one point, you are offered a choice for a default editor being used for git. If you know vim already, why not (I use vim), otherwise I recommend nano, which is a simple to use editor that runs inside your command line - we want to avoid having to open an external window of a separate editor for our tasks (i.e. don’t choose notepad and other standalone editors).

Mac

You should be all set. To make sure we have really everything we need, open Terminal.app (in Applications > Utilities or do Cmd + Space to get spotlight search and type terminal). Then paste this code and hit enter:

xcode-select --install

click on install (don’t click on get Xcode)

Unix

Same, all set. Maybe open a terminal and type

git --version

if that throws an error, install it with your package manager, e.g.

sudo apt install git-all

Code of Conduct

If you decide to participate in this course, I expect you to abide by the following minimal code of conduct.

  1. Be polite to the other class participants.
  2. While in class, do not spend time on messaging apps, chat rooms, computer games, or similar content.

You can expect your instructor to abide by the same code of conduct, so this is a matter of mutual respect. If you are found in breach of the above you will be given a single warning, and I will ask you to no longer join the course after a second time. Your grade will be “fail”.

License

All lectures of this course are derived from the work of the Software Carpentry. Their material is licensed under creative commons license 4.0, whereby I am allowd to share and remix the content, if appropriate attribution is given.

Those terms apply to anyone wanting use material on this website as well. Thank you.

© Florian Oswald, 2024