About this book
Welcome to the IMF R Tutorial!
This website/book was put together by Bas Bakker and Greta Polo from the IMF’s Western Hemisphere Department, with some early help from Shihui Liu.
We’re big fans of R and think the IMF should use it more for charts and data manipulation. We know R has a bit of a learning curve, and up until now, there haven’t been many examples of how to create IMF-style charts in R or easy templates. That’s why we wrote this book!
Why should you use R? R enables you to create charts that are more visually appealing and versatile than those made in Excel. Updating charts is effortless and rerunning the code takes seconds. Combining data from different sources, such as WEO and World Bank data, is straightforward, saving time and effort.
With AI tools, generating and fine-tuning R code has never been easier, making complex tasks manageable and accessible. To make things even smoother, we’ve built a custom GPT model trained on the IMF R book so you can get on-point code suggestions right when you need them.
From seamless data analysis to integrating updated visuals directly into LaTeX documents, R offers a smarter, more efficient way to work. This book is here to help you unlock those possibilities.
Our goal is to help IMF economists (and others) develop skills in using R for data analysis, visualization, econometrics, and more. We want tutorials that are clear, accessible, and useful for both beginners and experienced users. Everything is hands-on so you can apply what you learn directly to your IMF work.
We aim to continuously improve the book and add new topics.
If you have any questions or suggestions or corrections, please contact Bas (bbakker@imf.org), and Greta (gpolo@imf.org).
Bas and Greta