Need help calculating percent of production by source by 2018 for each continent

First of all, please read FAQ: What's a reproducible example (reprex) and how do I create one?

Without actual reprex I can't even guess where your problem actually starts. The error returned, perhaps, because your df_tidy does not have a column titled "Africa,Americas,Asia,Europe,Oceania" (as a single word).

P.S. Consider following some guide for clean code writing (e.g. https://style.tidyverse.org/). It is really hard to read and understand.