Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A package containing functions to create standard PACTA plots using ggplot, together with data processing functions needed for the charts.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

RMI-PACTA/r2dii.plot

Repository files navigation

Lifecycle: stableCodecov test coverageCRAN statusR-CMD-check

The goal of r2dii.plot is to help you plot PACTA data in an informative,beautiful, and easy way.

Installation

You can install the released version of r2dii.plot from CRAN with:

install.packages("r2dii.plot")

And the development version from GitHub with:

# install.packages("devtools")devtools::install_github("RMI-PACTA/r2dii.plot")

Example

The r2dii.plot package is designed to work smoothly with other “r2dii”packages –r2dii.data,r2dii.match, andr2dii.analysis. It alsoplays well with theggplot2 package,which helps you customize your plots. Here, we’ll use an example dataset that comes with r2dii.plot and that resembles the output of thetarget_market_share()function in the r2dii.analysis package.

library(ggplot2,warn.conflicts=FALSE)library(dplyr,warn.conflicts=FALSE)library(r2dii.plot)

Plot trajectory chart

  • Useqplot_*() to quickly get a plot with standard titles and labels.
# `data` must meet documented "Requirements"data<-market_share_demo %>%  filter(sector=="power",technology=="renewablescap",region=="global",scenario_source=="demo_2020"  )qplot_trajectory(data)

  • Useplot_*() for a more “bare” plot that you can customize yourselfby modifying the input data and applyingggplot2 functions.
data<-market_share_demo %>%  filter(sector=="power",technology=="renewablescap",region=="global",scenario_source=="demo_2020",    between(year,2020,2035)  ) %>%  mutate(label= case_when(metric=="projected"~"Your Portfolio",metric=="corporate_economy"~"Benchmark (Corp. Econ.)",metric=="target_sds"~"SDS Scenario",metric=="target_sps"~"SPS Scenario",metric=="target_cps"~"CPS Scenario",TRUE~metric    )  )data %>%  prep_trajectory() %>%  plot_trajectory()+  labs(title="Power production trajectory for Renewables",subtitle="With reference to climate scenarios.",x="Year",y="Production (normalized to 2020)"  )

For examples of other plots and data sets please visitGet started withr2dii.plot.

Funding

This project has received funding from theEuropean Union LIFEprogramand the International Climate Initiative (IKI). The Federal Ministry forthe Environment, Nature Conservation and Nuclear Safety (BMU) supportsthis initiative on the basis of a decision adopted by the GermanBundestag. The views expressed are the sole responsibility of theauthors and do not necessarily reflect the views of the funders. Thefunders are not responsible for any use that may be made of theinformation it contains.

About

A package containing functions to create standard PACTA plots using ggplot, together with data processing functions needed for the charts.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp