## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0     ✔ purrr   1.0.1
## ✔ tibble  3.1.8     ✔ dplyr   1.1.0
## ✔ tidyr   1.3.0     ✔ stringr 1.5.0
## ✔ readr   2.1.3     ✔ forcats 1.0.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## Warning: 程辑包'countrycode'是用R版本4.2.3 来建造的
## `summarise()` has grouped output by 'Product'. You can override using the
## `.groups` argument.

The visualization shows the total energy production by product from 2013 to 2020, highlighting a substantial increase in natural gas production. Natural gas production has grown rapidly since 2018, reaching over 2.0e+08. In contrast, the other two largest energy sources, electricity and heat, remain below 5.0e+07 and exhibit minimal changes during the same period.

This stark difference in growth rates suggests that natural gas has experienced significant driving factors, such as technological advancements (e.g., hydraulic fracturing), increased global demand, and the cost-effectiveness of natural gas compared to other energy sources. The relatively stable production of electricity and heat could imply that existing capacity has met the demand for these energy sources or that they are not subject to the same driving forces as natural gas.

## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.

## Warning: 程辑包'rworldmap'是用R版本4.2.3 来建造的
## 载入需要的程辑包:sp
## Warning: 程辑包'sp'是用R版本4.2.3 来建造的
## ### Welcome to rworldmap ###
## For a short introduction type :   vignette('rworldmap')
## `summarise()` has grouped output by 'Country'. You can override using the
## `.groups` argument.
## Warning: There were 2 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `Code = countrycode(Country, "country.name", "iso3c")`.
## ℹ In group 31: `Country = "Republic of Turkiye"`.
## Caused by warning in `countrycode_convert()`:
## ! Some values were not matched unambiguously: Republic of Turkiye
## ℹ Run ]8;;ide:run:dplyr::last_dplyr_warnings()dplyr::last_dplyr_warnings()]8;; to see the 1 remaining warning.
## Adding missing grouping variables: `Country`

## Adding missing grouping variables: `Country`

## Adding missing grouping variables: `Country`

The global maps for the production, imports, and exports of natural gas in 2020 show that the US is the leading producer of natural gas. This dominance can be attributed to factors like abundant resources, advanced technology, supportive government policies, and a well-developed infrastructure. Moreover, the increasing demand for cleaner energy sources has further fueled the growth in natural gas production in the US.

In terms of imports, the US is also a significant player. This could indicate a high domestic demand for natural gas that cannot be entirely met by the current production levels. It might also suggest the presence of a diverse energy portfolio and the need to import gas from other countries to maintain the balance between energy sources.

Regarding exports, the US exports a relatively smaller amount of natural gas compared to its production and imports. This observation can be attributed to various reasons, such as high domestic demand, a focus on energy security, or the presence of more profitable domestic markets for natural gas. It could also be due to constraints in the country’s export infrastructure, including the limited capacity of liquefied natural gas (LNG) terminals and pipeline networks.

## `summarise()` has grouped output by 'Country', 'Flow'. You can override using
## the `.groups` argument.

## `summarise()` has grouped output by 'Flow'. You can override using the
## `.groups` argument.

## Warning: 程辑包'gifski'是用R版本4.2.3 来建造的
## Warning: 程辑包'gganimate'是用R版本4.2.3 来建造的
## Warning: 程辑包'magick'是用R版本4.2.3 来建造的
## Linking to ImageMagick 6.9.12.3
## Enabled features: cairo, freetype, fftw, ghostscript, heic, lcms, pango, raw, rsvg, webp
## Disabled features: fontconfig, x11
## `summarise()` has grouped output by 'Country'. You can override using the
## `.groups` argument.

The US consistently ranking first in natural gas production from 2013 to 2020 highlights the country’s abundant natural gas resources, well-developed infrastructure, and strong industry support. Its massive production increase, reaching over 3e+07 after 2018, could be driven by factors such as favorable government policies, technological advancements, and growing demand for cleaner energy sources. Canada ranking second, albeit with much lower production than the US, might indicate that its natural gas industry is still developing or facing challenges like transportation infrastructure or capital investment. The shift in Australia surpassing Norway after 2018 might be attributed to recent investments in natural gas projects and the strategic location of Australia for exports to Asia-Pacific markets, where demand for natural gas has been increasing.

## `summarise()` has grouped output by 'Country'. You can override using the
## `.groups` argument.
## Warning: There were 2 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `Code = countrycode(Country, "country.name", "iso3c")`.
## ℹ In group 31: `Country = "Republic of Turkiye"`.
## Caused by warning in `countrycode_convert()`:
## ! Some values were not matched unambiguously: Republic of Turkiye
## ℹ Run ]8;;ide:run:dplyr::last_dplyr_warnings()dplyr::last_dplyr_warnings()]8;; to see the 1 remaining warning.
## Adding missing grouping variables: `Country`

## `summarise()` has grouped output by 'Country'. You can override using the
## `.groups` argument.
## Warning: There were 2 warnings in `mutate()`.
## The first warning was:
## ℹ In argument: `Code = countrycode(Country, "country.name", "iso3c")`.
## ℹ In group 31: `Country = "Republic of Turkiye"`.
## Caused by warning in `countrycode_convert()`:
## ! Some values were not matched unambiguously: Republic of Turkiye
## ℹ Run ]8;;ide:run:dplyr::last_dplyr_warnings()dplyr::last_dplyr_warnings()]8;; to see the 1 remaining warning.
## Adding missing grouping variables: `Country`