Teal Emery
The IMF publishes the risk of debt distress for PRGT Eligible Countries that use the LIC DSA.
While this data is public, it’s published online in a
pdf, which makes
it burdensome for researchers & policymakers to use & update. I’m
scraping the data using R, and publishing it on GitHub as a .csv
file
for all to use. I need this for my own research, but I’m hoping it will
be useful to others.
Annotated Script: want to run this or modify this script yourself? The script is annotated, so it should be straightforward.
Standardized Country Naming: I’ve standardized the names using the
countrycode
R
Package, and added
iso3c codes to make
it easy to connect this data to other sovereign-level data.
File Naming Convention: The script extracts the as of date listed at the top of the pdf, and appends it to the end of the file name so that it is clear when the data is from.
Eventually I’d like to automate this to run periodically using GitHub Actions. If you want to help with this, ping me.