knitr::opts_chunk$set(
  collapse = TRUE,
  echo = FALSE, 
  comment = "#>",
  fig.path="man/figures/README-",
  out.width = "100%"
  )
library(tidyverse)
# library(pacman)
# p_load_current_gh("jonathan-g/kayadata")
library(kayadata)

kayadata

CRAN Status Badge DOI License: MIT R-CMD-check

This package loads Kaya-identity data, synthesized from several sources.

To install the package from CRAN:

install.packages("kayadata")

Once you've installed it, then you just need to use the command library(kayadata) to load the package.

Some of the functions the package provides are:

mexico_data = get_kaya_data("Mexico") 
mexico_data %>% filter(year >= 1965) %>% 
  select(region:ef) %>%
  head()
mexico_2050 = project_top_down("Mexico", 2050)
mexico_2050
us_kaya = get_kaya_data("United States")
plot_kaya(us_kaya, "ef", y_lab = "Carbon intensity of economy",
          start_year = 2000, stop_year = 2010, log_scale = TRUE,
          trend_line = TRUE)
world_kaya = get_kaya_data("World")
plot_kaya(world_kaya, "P", start_year = 2000, stop_year = 2010, log_scale = FALSE,
          trend_line = FALSE)
mexico_mix = get_fuel_mix("Mexico")
mexico_mix
plot_fuel_mix(mexico_mix)

After you install the package, you can get more help inside RStudio by typing help(package="kayadata") in the R console window.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.



gilligan-ees-3310/kayadata documentation built on July 27, 2023, 5:44 a.m.