Skip to content

Commit

Permalink
Merge pull request #77 from USEPA/new_sectors
Browse files Browse the repository at this point in the history
New sectors merge
  • Loading branch information
cahartin authored Jul 12, 2023
2 parents 4b9dbe3 + 6cb36a5 commit 73dd69d
Show file tree
Hide file tree
Showing 87 changed files with 2,738 additions and 1,524 deletions.
2 changes: 2 additions & 0 deletions FrEDI/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
../docs/
docs
/doc/
/Meta/
7 changes: 4 additions & 3 deletions FrEDI/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: FrEDI
Title: The Framework for Evaluating Damages and Impacts (FrEDI) with Net Present Damages (NPD)
Version: 3.3.7
Title: The Framework for Evaluating Damages and Impacts (FrEDI)
Version: 3.4
Authors@R: c(person("Corinne", "Hartin",
email = "hartin.corinne@epa.gov",
role = c("aut","cre"),
Expand Down Expand Up @@ -32,12 +32,13 @@ Description: This R package models damages and impacts from climate change in th
License: file LICENSE
Encoding: UTF-8
Depends: R (>= 3.5.0),
tidyverse,
dplyr,
ggplot2,
tidyr,
openxlsx
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.0
RoxygenNote: 7.2.3
LazyData: TRUE
Suggests: knitr, rmarkdown, prettydoc
VignetteBuilder: knitr
Expand Down
4 changes: 2 additions & 2 deletions FrEDI/R/convertTemps.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#' @param temps A numeric vector of CONUS or global temperatures in degrees Celsius.
#' @param from A character string (one of `c("conus", "global")`), indicating whether users are converting from CONUS to global temperatures (`from="conus"`) or from global to CONUS (`from="global"`).
#'
#' Temperatures for the contiguous U.S. (CONUS) in degrees Celsius are converted to global temperatures (`convertTemps(temps, from="conus")`) in degrees Celsius by multiplying CONUS temperatures by a constant *k* (where *k=1.421*).
#' Temperatures for the contiguous U.S. (CONUS) in degrees Celsius are converted to global temperatures (`convertTemps(temps, from="conus")`) in degrees Celsius by multiplying CONUS temperatures by a constant *1/k* (where *k=1.421*).
#'
#' Global temperatures in degrees Celsius are converted to CONUS temperatures (`convertTemps(temps, from="global")`) in degrees Celsius by multiplying global temperatures by a constant *1/k* (where *k=1.421*).
#' Global temperatures in degrees Celsius are converted to CONUS temperatures (`convertTemps(temps, from="global")`) in degrees Celsius by multiplying global temperatures by a constant *k* (where *k=1.421*).
#'
#' @return
#' Outputs a numeric vector of temperatures in degrees Celsius.
Expand Down
4 changes: 2 additions & 2 deletions FrEDI/R/import_inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#' @details
#' This function enables users to import data on custom scenarios for use with temperature binning. Users specify path names to CSV files containing temperature, global mean sea level rise (GMSL), population, and gross domestic product (GDP) scenarios (`tempfile`, `slrfile`, `gdpfile`, and `popfile`, respectively). [FrEDI::import_inputs()] reads in and formats any specified files as data frames and returns a list of data frames for imported scenarios. Users can specify whether the temperature input is for the contiguous U.S. (CONUS) or global using `temptype` and specify the format of the population scenario using `popform`.
#'
#' Values for input scenarios must be within reasonable ranges. If a user inputs a custom scenario with values outside the allowable ranges, [FrEDI::import_inputs()] will not import the scenarios and will instead stop and return an error message. Temperature and GMSL inputs must begin in 2000 or earlier. Values for population and GDP scenarios can start in 2010 or earlier.
#' Values for input scenarios must be within reasonable ranges. Temperature and GMSL inputs must begin in 2000 or earlier, whereas values for population and GDP scenarios can start in 2010 or earlier.
#'
#' * The input temperature scenario (passed to [FrEDI::run_fredi()] via the `inputsList` argument) requires temperatures for the contiguous U.S. (CONUS) in degrees Celsius relative to 1995 (degrees of warming relative to the baseline). Temperature values must be greater than or equal to zero and less than or equal to 10 degrees Celsius. Users can convert global temperatures to CONUS temperatures using `convertTemps(from="global")` or by specifying `import_inputs(temptype="global")` when importing a temperature scenario from a CSV file.
#' * The input temperature scenario (passed to [FrEDI::run_fredi()] via the `inputsList` argument) requires temperatures for CONUS in degrees Celsius relative to 1995 (degrees of warming relative to the baseline). Temperature values must be greater than or equal to zero degrees if warming (CONUS). Users can convert global temperatures to CONUS temperatures using [FrEDI::convertTemps(from="global")] or by specifying [FrEDI::import_inputs(temptype="global")] when importing a temperature scenario from a CSV file.
#' * Values for the sea level rise (SLR) scenario are for global mean sea level rise (GMSL) must be in centimeters (cm) and values must be greater than or equal to zero and less than or equal to 250 cm.
#' * Population and gross domestic product (GDP) values must be greater than or equal to zero.
#'
Expand Down
Loading

0 comments on commit 73dd69d

Please sign in to comment.