knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ccplot

The goal of ccplot is to provide out-of-the-box data visualization tools to analyze and understand worldwide greenhouse gas emissions.

Installation

You can install the development version of ccplot from GitHub with:

# install.packages("devtools")
devtools::install_github("omunizb/climate-change")

Usage

Currently, ccplot has four plotting functions. The following examples use a Data on CO2 and Greenhouse Gas Emissions by Our World in Data dataset by Hannah Ritchie, Max Roser, Edouard Mathieu and Bobbie Macdonald:

Greenhouse_Gas_Emissions <- 
  read.csv("https://raw.githubusercontent.com/owid/co2-data/master/owid-co2-data.csv")
library(ccplot)

plot_emissions(Greenhouse_Gas_Emissions, c("USA", "CHN", "GBR", "RUS"), 
               "Emissions of historical global powers")
library(ccplot)

decade_increase(Greenhouse_Gas_Emissions, c("1990-1999", "1980-1989"), 
                c("USA", "GBR"))
library(ccplot)

lproj(df = Greenhouse_Gas_Emissions, region = "USA")
library(ccplot)

data(futdata)

emissions_pred(Greenhouse_Gas_Emissions, "USA", futdata)

As you can see in this example, ccplot also includes the dataset futdatawith projections of US population and GDP until 2030.



omunizb/climate-change documentation built on Jan. 3, 2022, 12:15 a.m.