kayadata

Package to load Kaya Identity data.

https://github.com/jonathan-g/kayadata

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Package to load Kaya Identity data.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • Open Issues: 0
  • Releases: 9
Created over 8 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Support

README.Rmd

---
title: "kayadata"
author: "Jonathan Gilligan"
date: "2024-07-07"
output: github_document
---
```{r setup, include=FALSE}
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](https://www.r-pkg.org/badges/version-last-release/kayadata)](https://cran.r-project.org/package=kayadata)
[![DOI](https://zenodo.org/badge/108232691.svg)](https://zenodo.org/badge/latestdoi/108232691)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![R-CMD-check](https://github.com/jonathan-g/kayadata/workflows/R-CMD-check/badge.svg)](https://github.com/jonathan-g/kayadata/actions)
[![pkgdown](https://github.com/jonathan-g/kayadata/workflows/pkgdown/badge.svg)](https://github.com/jonathan-g/kayadata/actions)


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

To install the package from CRAN:
```{r initialize, echo=TRUE, eval=FALSE}
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:

* `kaya_region_list()`: Get a list of available countries and regions.
* `get_kaya_data()`: Get data for a specific country. 
  Example: 
```{r get-kaya-data, echo=TRUE}
mexico_data = get_kaya_data("Mexico") 
mexico_data %>% filter(year >= 1965) %>% 
  select(region:ef) %>%
  head()
```
* `project_top_down()`: Project future population, GDP, energy use, and 
  emissions. 
  Example: 
```{r project-top-down, echo=TRUE}
mexico_2050 = project_top_down("Mexico", 2050)
mexico_2050
```
* `plot_kaya`: Plot trends in Kaya variables for a given region or country.
  Example:
```{r plot-kaya, echo=TRUE}
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)
```
```{r plot-kaya-world, echo=TRUE}
world_kaya = get_kaya_data("World")
plot_kaya(world_kaya, "P", start_year = 2000, stop_year = 2010, log_scale = FALSE,
          trend_line = FALSE)
```
* `get_fuel_mix`: Get the fuel mix (coal, gas, oil, nuclear, and renewables) 
  for a region or country. 
  Example: 
```{r get-fuel-mix, echo=TRUE}
mexico_mix = get_fuel_mix("Mexico")
mexico_mix
```
* `plot_fuel_mix`: Plot the fuel mix in a donut chart
```{r plot-fuel-mix, echo=TRUE}
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](https://jonathan-g.github.io/kayadata/CODE_OF_CONDUCT.html). By
participating in this project you agree to abide by its terms.

Owner

  • Name: Jonathan Gilligan
  • Login: jonathan-g
  • Kind: user
  • Location: Nashville, TN, USA
  • Company: Vanderbilt University

Environmental scientist. 🏳️‍🌈🏳️‍⚧️

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 223
  • Total Committers: 2
  • Avg Commits per committer: 111.5
  • Development Distribution Score (DDS): 0.26
Past Year
  • Commits: 9
  • Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jonathan Gilligan j****n@g****m 165
Jonathan Gilligan j****n@v****u 58
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • jonathan-g (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 335 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: kayadata

Kaya Identity Data for Nations and Regions

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 335 Last month
Rankings
Forks count: 17.1%
Dependent repos count: 23.9%
Average: 28.2%
Dependent packages count: 28.8%
Stargazers count: 34.6%
Downloads: 36.8%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R depends
  • ggplot2 >= 3.0 depends
  • dplyr >= 0.8 imports
  • forcats >= 0.3 imports
  • magrittr >= 1.5 imports
  • purrr >= 0.3 imports
  • scales >= 1.0 imports
  • stringr >= 1.3 imports
  • tidyr >= 0.8 imports
  • broom >= 0.5 suggests
  • knitr >= 1.22 suggests
  • rmarkdown >= 1.12 suggests
  • testthat >= 2.0 suggests
  • vdiffr >= 0.3.1 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite