Plots a treemap of cumulative co2 emissions by country since 1900.
Usage
emissions_map(
dataset = get_emissions(),
print = TRUE,
since = 1900,
number = "all",
title = substitute(paste(since, "-", to, " Cumulative " * CO[2] *
" Emissions by Country"), list(since = since, to =
as.character(dataset[nrow(dataset), 2])))
)
Arguments
- dataset
Name of the tibble generated by
get_emissions
(boolean) Display emissions treemap, defaults to TRUE. Use FALSE to not display chart.
- since
(numeric) Start year for cumulative emissions, defaults to 1900 if omitted
- number
(numeric) Number of countries to display in treemap, defaults to all if omitted
- title
(string) Manually specify chart title
Details
emissions_map
invisibly returns a ggplot2 object with cumulative emissions treemap by country since 1900 from get_emissions
.
By default the chart is also displayed. Users may further modify the output ggplot2 chart.
Author
Hernando Cortina, hch@alum.mit.edu