Population adjustment

Adjusting for population size is usually a good idea when studying a quantity that is affected by it. The most obvious example is to study GDP (Gross Domestic Product) per capita instead of GDP.

Code:
# --- Setting up the data --
scandinaviaUSA <- global_economy %>%
  filter(Country %in% c("Norway","Sweden","Denmark", "United States"))
scandinaviaUSA %>% head()

# --- GDP by country in $US --
scandinaviaUSA %>%
  autoplot(GDP)+
  labs(title= "GDP", y = "$US")

# --- Population by country  --
scandinaviaUSA %>%
  autoplot(Population)+
  labs(title= "Population", y = "Number of people")

# --- Population by country  (log-scale on y-axis) --
scandinaviaUSA %>%
  autoplot(Population)+
  scale_y_log10()+
  labs(title= "Population (log-scale)",y = "Number of people")

# --- GDP per capita by country ---
scandinaviaUSA %>%
  autoplot(GDP/Population) +
  labs(title= "GDP per capita = GDP / Population", y = "$US")