This repository contains the code for the paper "Decomposing India's Trade Ratio: 1980-2021. This paper is co-authored with Arjun Jayadev and Josh Mason.
The repo consists of the following folders
2_code
: Code required to pull and clean raw data, implement the decomposition and generate figures and tables3_raw
: Raw data for India's trading partners and other variables.4_output
: Cleaned csvs generated by code.5_figures
: Figures and tables in the paper.
The folder 2_code
consists of the following R scripts:
0_master
: Loads all packages and runs all scripts.01_prep
: Pulls and cleans raw data for India's trading partners.02_decomp
: Implements decomposition for trade ratio (goods only).03_decomp_goods_services
: Implements decomposition for trade ratio (goods and services).04_exhibits
: Generates figures and tables used in paper.
To replicate the results in the paper, follow the steps below
- Open
decomposition.Rproj
in RStudio. - Within the project, open
0_master
from2_code
. - Run the file.
The scripts are written in R using RStudio 2022.07.2+576 "Spotted Wakerobin" Release. Raw and clean csvs were opened in Microsoft Excel 16.