get_emissions | R Documentation |
Retrieves Global Carbon Project (GCP) annual global carbon dioxide emissions since 1750 from Our World In Data repository https://github.com/owid/co2-data
get_emissions(use_cache = TRUE, write_cache = getOption("hs_write_cache"))
use_cache |
(boolean) Return cached data if available, defaults to TRUE. Use FALSE to fetch updated data. |
write_cache |
(boolean) Write data to cache, defaults to FALSE. Use TRUE to write data to cache for later use. Can also be set using options(hs_write_cache=TRUE) |
get_emissions
invisibly returns a tibble with GCP's annual carbon dioxide emissions from fossil fuels in aggregate and for every nation.
The returned object includes ISO code, country, year, co2 emissions, growth rates, per capita, and decompositions by industry and gas type.
Please refer to above website for details.
Invisibly returns a tibble with annual carbon dioxide emissions
Hernando Cortina, hch@alum.mit.edu
https://www.globalcarbonproject.org/carbonbudget/
Friedlingstein, P. et al (2020), Global Carbon Budget 2020, Earth System Science Data, vol. 12, 3269-3340 \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5194/essd-12-3269-2020")}
# Fetch from cache if available:
emissions <- get_emissions()
#
# Force cache refresh:
emissions <- get_emissions(use_cache=FALSE)
#
# Review cache contents and last update dates:
hockeystick_cache_details()
#
# Plot output using package's built-in ggplot2 settings
plot_emissions(emissions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.