Natural gas rents (% of GDP) - NY.GDP.NGAS.RT.ZS

Data - WDI

Info

Last observation: 2021 (N = 10,756)

First observation: 1970 (N = 10,756)

Last data update: 14 aoû 2026, 20:20. Last compile: 14 aoû 2026, 21:08

Nobs - Javascript

Code
NY.GDP.NGAS.RT.ZS |>
  left_join(iso2c, by = "iso2c") |>
  group_by(iso2c, Iso2c) |>
  mutate(value = round(value, 2)) |>
  summarise(Nobs = n(),
            `Year 1` = first(year),
            `Rent 1 (%)` = first(value),
            `Year 2` = last(year),
            `Rent 2 (%)` = last(value)) |>
  arrange(-`Rent 2 (%)`) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Kuwait, Iraq, Libya

Code
NY.GDP.NGAS.RT.ZS |>
  filter(iso2c %in% c("KW", "IQ", "LY")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.5, 0.9),
        legend.direction = "horizontal") +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.5),
                     labels = scales::percent_format(accuracy = 0.1)) +
  xlab("") + ylab("Natural gas rents (% of GDP)")

China, France, Germany

Code
NY.GDP.NGAS.RT.ZS |>
  filter(iso2c %in% c("CN", "FR", "DE")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.1),
                     labels = scales::percent_format(accuracy = 0.1)) +
  xlab("") + ylab("Natural gas rents (% of GDP)")

Spain, United Kingdom, United States

Code
NY.GDP.NGAS.RT.ZS |>
  filter(iso2c %in% c("US", "GB", "ES")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.1),
                     labels = scales::percent_format(accuracy = 0.1)) +
  xlab("") + ylab("Natural gas rents (% of GDP)")

Argentina, Chile, Venezuela

Code
NY.GDP.NGAS.RT.ZS |>
  filter(iso2c %in% c("AR", "CL", "VE")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(Iso2c = ifelse(iso2c == "VE", "Venezuela", Iso2c)) |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.7, 0.9),
        legend.direction = "horizontal") +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.1),
                     labels = scales::percent_format(accuracy = 0.1)) +
  xlab("") + ylab("Natural gas rents (% of GDP)")

Greece, Hong Kong, Mexico

Code
NY.GDP.NGAS.RT.ZS |>
  filter(iso2c %in% c("GR", "HK", "MX")) |>
  left_join(iso2c, by = "iso2c") |>
  year_to_enddate() |>
  mutate(Iso2c = ifelse(iso2c == "HK", "Hong Kong", Iso2c)) |>
  mutate(value = value/100) |>
  left_join(colors, by = c("Iso2c" = "country")) |>
  ggplot() + 
  geom_line(aes(x = date, y = value, color = color)) + 
  theme_minimal() + scale_color_identity() + add_flags +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.8)) +
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 0.1),
                     labels = scales::percent_format(accuracy = 0.1)) +
  xlab("") + ylab("Natural gas rents (% of GDP)")