I got a request for my stata code for reshaping the wdi 2010. There is also code to add variable labels. It is an alternative to using “wdireshape“. You can download it here: WDI 2010 reshape stata code.doc
1. The stata code is in a word “doc” file, rather than a stata “do” file. That is because WordPress limits the filetypes you can upload. Rather than putting it on my other website, I just pasted it into a word document. You can just paste it back into a stata do file…
2. You should download the “csv” version of the WDI.
3. You need a computer with quite a bit of memory to run the reshape. If you are short on memory, you can manually select a subset of the file and reshape it in smaller chunks that fit into your computer’s memory. You can then “merge” the pieces together.
4. It takes a long time to run if you do the whole file at once (hours).