This repository contains the code underlying the note "How Many Jobs Can be Done at Home?" by Jonathan I. Dingel and Brent Neiman. This is a complete replication package that produces all results from scratch, beginning with code that downloads all the required data from bls.gov and onetcenter.org.
If you simply want to download our results without running any replication code, you can grab the following CSV files:
- industry-level results by 2-digit NAICS and 3-digit NAICS
- metropolitan-level results
- occupation-level results
- country-level results
The workflow is organized as a series of tasks.
Each task folder contains three folders: input
, code
, output
.
A task's output is used as an input by one or more downstream tasks.
This graph depicts the input-output relationships between tasks.
We use the make
utility to automate this workflow.
After downloading this replication package (and installing the relevant software), you can reproduce the figures and tables appearing in the paper simply by typing make
at the command line.
The project's tasks are implemented via Stata code and shell scripts. The taskflow structure employs symbolic links. To run the code, you must have installed Stata. We ran our code using Stata 14 and GNU bash version 3.2.57 on Mac OS X. We expect the code to work on other versions too.
- Download (or clone) this repository by clicking the green
Clone or download
button above. Uncompress the ZIP file into a working directory on your cluster or local machine. - From the Unix/Linux/MacOSX command line, navigate to directory containing this readme.
- Typing
make
will execute all the code. TheMakefile
will executestata-se
commands, so Mac OS X users should ensurestata-se
is in their relevantPATH
.
- It is best to replicate the project using the
make
approach described above. Nonetheless, it is also possible to produce the results task-by-task in the order depicted in the flow chart. If all upstream tasks have been completed, you can complete a task by navigating to the task'scode
directory and typingmake
. - An internet connection is required so that the
downloaddata
task can download data. - If you want to create your own manual classification, edit the file Teleworkable_BNJDopinion.csv before running the code.
You likely should install Windows Subsystem for Linux.
Alternatively, my colleague says that "Windows users can install chocolatey, and then type choco install make
on the command line."
If you aren't able to use make
, you can replicate the paper by following this list.
Thanks to Menglu Xu for research assistance. Thanks to Megan Fasules for spotting a bug in our initial code.
- James Stratton applied our measures to Australian occupational codes. See his replication package for "How Many How Many Australians Can Work From Home? An Application of Dingel and Neiman (2020) to Australian Occupation Data".
- Ole Agersnap wrote code to produce state-level measures. His code is available in state_measures.