Description Usage Arguments Details Examples
View source: R/plot_emissions.R
plot_emissions
draws a plot of annual greenhouse gas emissions for the
countries provided to the regions
argument.
1 | plot_emissions(df, regions = NULL, title = NULL)
|
df |
A dataframe containing annual carbon dioxide, methane and nitrous
oxide emissions records by country or region. It must include variables
|
regions |
A character vector containing the codes of countries and/or
regions that should be included in the plot. The codes must match those of
the |
title |
The title of the plot. It is NULL by default. |
The x-axis range of the plot goes from the earliest to the latest year with
available data for any of the regions provided to the regions
argument.
If the number of regions requested is between two and ten, a legend is added to the plot.
If not provided or set to NULL
, all of the regions in df
are
included in the plot.
1 2 3 4 5 | Greenhouse_Gas_Emissions <-
read.csv("https://raw.githubusercontent.com/owid/co2-data/master/owid-co2-data.csv")
plot_emissions(Greenhouse_Gas_Emissions,
c("USA", "CHN", "GBR", "RUS"),
"Emissions of historical global powers")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.