Introduction

Although the relationship between population and emissions may be obvious, as someone new to R, I’ve chosen to explore this relationship to practice using ggplot2.

What has happened to world population levels since 1990?

First, we should establish what has happened to world population levels since 1990. As shown below, populations have grown in every region of the world. The most populated regions are East Asia & the Pacific and South Asia, which was also true in 1990. However, we can see that Sub-Saharan Africa has surpassed Europe & Central Asia to become the third largest region by population size as of 2019.

emissions_data_final <- imf_wb_country_groups_iso3c %>% left_join(emissions_dataset_full, by = "iso3c")

world_population <- emissions_data_final %>% 
  group_by(country_group,year) %>%
  mutate(total_pop = sum(population, na.rm=TRUE)) %>%
  mutate(total_cumulative_co2 = sum(cumulative_co2, na.rm=TRUE)) %>%
  filter(country_group == "Sub-Saharan Africa" | country_group =="Latin America & Caribbean" | country_group =="Europe & Central Asia" | country_group =="Middle East & North Africa" | country_group =="East Asia & Pacific" | country_group =="South Asia" | country_group =="North America")
  
world_population <- subset(world_population, select = c(country_group,year,total_pop,total_cumulative_co2))
world_population <- world_population[!duplicated(world_population), ]

ggplot(world_population, aes(x=year, y=total_pop)) + geom_line(aes(color=country_group)) +
  labs(
    x = "Year",
    y = "Total Population (thousands)",
    col = "Regions",
    title = "World Population Growth by Region",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
)
## Warning: Removed 3 row(s) containing missing values (geom_path).

Population Growth Rates

We know which regions have the largest populations, but which have grown the fastest since 1990? From our previous graph, we suspect that Sub-Saharan Africa may be in the lead, but let’s do some analysis to confirm.

world_population_growth <- world_population %>%
  group_by(country_group) %>%
  mutate(Diff_year = year - lag(year),  # Difference in time (just in case there are gaps)
         Diff_growth = total_pop - lag(total_pop), # Difference in population between years
         Rate_percent = (Diff_growth / Diff_year)/total_pop * 100, # growth rate in percent
         Diff_growth_emissions = total_cumulative_co2 - lag(total_cumulative_co2), # Difference in emissions between years
         Rate_percent_emissions = (Diff_growth / Diff_year)/total_cumulative_co2 * 100) %>% # growth rate in percent
drop_na(year)

world_population_growth <- subset(world_population_growth, select = c(country_group,year,total_pop,total_cumulative_co2,Rate_percent,Rate_percent_emissions))


ggplot(subset(world_population_growth, Rate_percent<5 & Rate_percent >0), aes(x=year, y=Rate_percent)) + geom_line(aes(color=country_group)) +
  labs(
    x = "Year",
    y = "Population Growth Rate",
    col = "Regions",
    title = "Population Growth Rate by Region",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
  )

As you can see, Sub-Saharan Africa is indeed the fastest growing region in the world, with year over year growth rates averaging between 2.5-3% since 1990. Europe & Central Asia, on the other hand, is seeing their growth rate stagnate. Soon it may turn negative as birth rates in the region continue to decline.

Is there a relationship between population levels and emission levels in Sub-Saharan Africa?

africa_emissions <- emissions_data_final %>%
  group_by(country_group,year) %>%
  mutate(total_pop = sum(population, na.rm=TRUE)) %>%
  mutate(total_cumulative_co2 = sum(cumulative_co2, na.rm=TRUE)) %>%
  filter(country_group == "Sub-Saharan Africa")

africa_emissions <- subset(africa_emissions, select = c(country_group,year,total_pop,total_cumulative_co2))
africa_emissions <- africa_emissions[!duplicated(africa_emissions), ]

population <- ggplot(africa_emissions, aes(x=year, y=total_pop)) + geom_line(color="#FF61CC") +
  labs(
    x = "Year",
    y = "Total Population (thousands)",
    col = "Regions",
    title = "Population in Sub-Saharan 
                     Africa",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
) +  theme(legend.position="none")
emissions <- ggplot(africa_emissions, aes(x=year, y=total_cumulative_co2)) + geom_line(color="blue") +
  labs(
    x = "Year",
    y = "Total Emissions (tons of Co2)",
    col = "Regions",
    title = "Emissions in Sub-Saharan 
                    Africa",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
) +  theme(legend.position="none")

ggarrange(population, emissions, ncol=2, nrow = 1, align = "h") 

options(repr.plot.width=20, repr.plot.height=5)

We’d need to run a regression to confirm if there is a true correlation, but based on the shape of the two graphs, it does appear that a correlation exists.

What about the relationship between population growth rates and growth of emissions in Sub-Saharan Africa?

africa_emissions_growth <- africa_emissions %>%
  group_by(country_group) %>%
  mutate(Diff_year = year - lag(year),  # Difference in time (just in case there are gaps)
         Diff_growth = total_pop - lag(total_pop), # Difference in population between years
         Rate_percent = (Diff_growth / Diff_year)/total_pop * 100, # growth rate in percent
         Diff_growth_emissions = total_cumulative_co2 - lag(total_cumulative_co2), # Difference in emissions between years
         Rate_percent_emissions = (Diff_growth / Diff_year)/total_cumulative_co2 * 100) %>% # growth rate in percent
drop_na(year)

africa_emissions_growth <- subset(africa_emissions_growth, select = c(country_group,year,total_pop,total_cumulative_co2,Rate_percent,Rate_percent_emissions))

population <- ggplot(africa_emissions_growth, aes(x=year, y=Rate_percent)) + geom_line(color="#FF61CC") +
  labs(
    x = "Year",
    y = "Rate of Population Growth (%)",
    col = "Regions",
    title = "Population Growth in Sub-Saharan 
                     Africa",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
) +  theme(legend.position="none")
emissions <- ggplot(africa_emissions_growth, aes(x=year, y=Rate_percent_emissions)) + geom_line(color="blue") +
  labs(
    x = "Year",
    y = "Rate of Emissions Growth (%)",
    col = "Regions",
    title = "Emissions Growth Rates in Sub-Saharan 
                    Africa",
    subtitle = "1990-2019",
    caption = "Data source: World Bank, IMF, Our World In Data"
) +  theme(legend.position="none")

ggarrange(population, emissions, ncol=2, nrow = 1, align = "h")
## Warning: Removed 1 row(s) containing missing values (geom_path).
## Removed 1 row(s) containing missing values (geom_path).

Indeed, there appears to be a very close relationship between population growth rates and emission growth rates. This is problematic, given that by all expert accounts, the rate of population growth in Sub-Saharan Africa is not going to slow down anytime soon. The goal of climate activists is to decouple the two, to allow emissions to come down even in the face of high population growth.

```