This repository contains the source material for "Relatedness, Complexity and Local Growth," which was published first as Motu Working Paper 19-01 and subsequently in Regional Studies.
We generate data, figures and tables by running the R scripts code/data.R
, code/figures.R
and code/tables.R
(in that order).
We run each script in a fresh relatedness-complexity.Rproj
instance within RStudio.
data/raw/
contains the raw data used in our analysis.
Our analysis uses several R packages.
We identify these packages at the beginning of each R script in code/
and in the log files in logs/
.
All dependencies can be installed via
# Install CRAN packages
cran_packages <- c(
"ggraph",
"igraph",
"knitr",
"kableExtra",
"lfe",
"reshape2",
"sessioninfo",
"stargazer",
"tidygraph",
"tidyverse"
)
install.packages(cran_packages)
# Install WGCNA
install.packages("BiocManager")
BiocManager::install("WGCNA")
# Install EconGeo
install.packages("remotes")
remotes::install_github("PABalland/EconGeo")