South Africa produces nearly a quarter of the continent's total carbon emissions, followed by Egypt, Algeria and Nigeria.