Data and Code

Instructions for download.

Background Info

We provide all the data and all the code that reproduces all exhibits in the book. No kiddin.

Users have two ways to access our data and code. First, they can go to our github page and get the the whole package. This is suggested for advanced users. Second, they can scroll below to each chapter and case study and download data and code in R or Stata.

Data are stored in a case study folder. In each folder, we have two sub-directories: raw and clean. In the raw directory, we have the original data that we downloaded, scraped or created. There is also a README.txt - a short background and source.

In the clean directory, we have a datasets in a format that used by codes that produce all the results, tables and graphs in the textbook. You will also find a VARIABLES.xls - a list of variables and some info on them, and a cleaning code(s) that produced the version here.

If you experience any discrepancies, please feel free to contact us via data.analyis.textbook@gmail.com. Comments are warmly welcome.

Download the full material

Do this. Then do that. [under construction]

Clicking on the above link(s) will either start the download process or open the file depending on your browser. If you wish to only download the file, right-click and select your browser's "Save as..." option.

Chapter by Chapter list

[under construction]

I. Data Exploration

II. Patterns: regression analysis

Chapter 07 Simple regression analysis
A Finding a good deal hotels R code Stata code
Chapter 08 Complicated patterns and messy data
A Finding a good deal hotels R code Stata code
B Life expetancy world_bank R code Stata code

III. Prediction

IV. Causality: the effects of interventions