I really enjoy the data prep challenges. In this one, I made a slight change. Apparently Bolivia was dropped from consideration because it didn't report in 1997 and so it had a null result for 20 year change. I backfilled in both directions -- if a value was still null after filling from previous then I filled from next. That put Bolivia in the number 1 spot for Lower Middle Income.
My result is slightly different, but this is probably due to interpretation