README.md

scenarioSelector

lifecycle CRAN
status R-CMD-check Codecov test
coverage

The scenarioSelector app helps you find and visualize a scenario. You can use it online or as an R package following the installation and example below.

Installation

Install the development version of scenarioSelector from GitHub with:

# install.packages("devtools")
devtools::install_github("2DegreesInvesting/scenarioSelector")

Example

Use the scenarioSelector package with:

library(scenarioSelector)

You can run the app with:

if (interactive()) {
  run_app()
}

The tidy data is available with:

scenarios
#> # A tibble: 56,680 × 12
#>    scenario model is_net0 is_2dii region  year sector technology target variable
#>    <chr>    <chr> <lgl>   <lgl>   <chr>  <dbl> <chr>  <chr>      <chr>  <chr>   
#>  1 etp_2017 2ds   FALSE   TRUE    global  2020 autom… electric   produ… smsp    
#>  2 etp_2017 2ds   FALSE   TRUE    global  2020 autom… electric   produ… tmsr    
#>  3 etp_2017 2ds   FALSE   TRUE    global  2020 autom… hybrid     produ… smsp    
#>  4 etp_2017 2ds   FALSE   TRUE    global  2020 autom… hybrid     produ… tmsr    
#>  5 etp_2017 2ds   FALSE   TRUE    global  2020 autom… ice        produ… smsp    
#>  6 etp_2017 2ds   FALSE   TRUE    global  2020 autom… ice        produ… tmsr    
#>  7 etp_2017 2ds   FALSE   TRUE    global  2021 autom… electric   produ… smsp    
#>  8 etp_2017 2ds   FALSE   TRUE    global  2021 autom… electric   produ… tmsr    
#>  9 etp_2017 2ds   FALSE   TRUE    global  2021 autom… hybrid     produ… smsp    
#> 10 etp_2017 2ds   FALSE   TRUE    global  2021 autom… hybrid     produ… tmsr    
#> # … with 56,670 more rows, and 2 more variables: value <dbl>, unit <chr>

To track the source of the data see data-raw/.

Discussion

For a discussion including related work see the channel # scenario-selector-tool on 2DII’s (private) Slack or ADO #552.

Learning shiny

This app is small but implements some big ideas I learned from Mastering Shiny, by Hadley Wickham:



2DegreesInvesting/scenarioSelector documentation built on Dec. 17, 2021, 6:38 a.m.