Skip to content

Commit

Permalink
Edited examples, references
Browse files Browse the repository at this point in the history
Edited examples, references for `import_inputs` and `run_fredi`
  • Loading branch information
knoiva-indecon committed Jun 26, 2024
1 parent 371f6ef commit bd9a471
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 8 additions & 5 deletions FrEDI/R/import_inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@
#' popInputFile <- scenariosPath |> file.path("State ICLUS Population.csv")
#'
#' ### Import inputs
#' example_inputsList <- import_inputs(
#' slrfile = slrInputFile,
#' popfile = popInputFile,
#' temptype = "global"
#' )
#' example_inputsList <- import_inputs(slrfile=slrInputFile, popfile=popInputFile, popArea="state")
#'
#' ### Use imports with FREDI:
#' df_x <- run_fredi(inputsList=example_inputsList)
#'
#' @references Environmental Protection Agency (EPA). 2021. Technical Documentation on The Framework for Evaluating Damages and Impacts (FrEDI). Technical Report EPA 430-R-21-004, EPA, Washington, DC. Available at <https://epa.gov/cira/FrEDI/>.
#'
#' United Nations. 2015. World population prospects: The 2015 revision. New York: United Nations, Department of Economic and Social Affairs, Population Division.
#'
#' U.S. Census Bureau. 2021. State Population Totals and Components of Change: 2010--2019. Available at <https://www.census.gov/data/tables/time-series/demo/popest/2010s-state-total.html>.
#'
#' U.S. Census Bureau. 2023. State Population Totals and Components of Change: 2020--2023. Available at <https://www.census.gov/data/tables/time-series/demo/popest/2020s-state-total.html>.
#'
#' U.S. Census Bureau. 2023. 2023 National Population Projections Tables: Main Series. Available at <https://www.census.gov/data/tables/2023/demo/popproj/2023-summary-tables.html>.
#'
#' @export
#' @md
Expand Down
11 changes: 5 additions & 6 deletions FrEDI/R/run_fredi.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@
#' popScenario |> glimpse()
#'
#' ### Subset climate scenario
#' temps1 <- gcamScenarios |> filter(scenario=="ECS_3.0_ref_0") |> select(year, temp_C)
#' temps1 <- gcamScenarios |> filter(scenario=="Hector_GCAM_v5.3_ECS_3.0_ref")
#' temps1 <- temps1 |> mutate(temp_C = temp_C_global |> convertTemps(from="global"))
#' temps1 <- temps1 |> select(year, temp_C)
#'
#' ### Run custom scenario
#' run2 <- run_fredi(inputsList=list(tempInput=temps1, popInput=popScenario))
Expand All @@ -142,10 +144,7 @@
#' popInputFile <- scenariosPath |> file.path("State ICLUS Population.csv")
#'
#' ### Import inputs
#' x_inputs <- import_inputs(
#' slrfile = slrInputFile,
#' popfile = popInputFile
#' )
#' x_inputs <- import_inputs(slrfile=slrInputFile, popfile=popInputFile, popArea="state")
#'
#' ### Run custom scenarios
#' run3 <- run_fredi(inputsList=x_inputs)
Expand All @@ -157,7 +156,7 @@
#' run4 <- run_fredi(sectorList="ATS Temperature-Related Mortality", aggLevels="none", elasticity=1)
#'
#' ### Set end year for analysis to 2110 -- messages user and returns a null value since default scenarios only have values out to 2100
#' run5 <- run_fredi(maxYear=2100)
#' run5 <- run_fredi(maxYear=2110)
#'
#' ### Set end year for analysis to 2300 -- messages user and returns a null value since default scenarios only have values out to 2100)
#' run6 <- run_fredi(thru2300=TRUE)
Expand Down

0 comments on commit bd9a471

Please sign in to comment.