Skip to content

Commit

Permalink
Merge pull request #11 from USEPA/Cromar
Browse files Browse the repository at this point in the history
Configured and built package version 3.0.0
  • Loading branch information
knoiva-indecon authored Jun 10, 2022
2 parents 3fa43e1 + da5a52a commit f052e2a
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions FrEDI/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Package: FrEDI
Title: The Framework for Evaluating Damages and Impacts (FrEDI)
Version: 2.3.0
Version: 3.0.0
Authors: U.S. Environmental Protection Agency (EPA) <https://epa.gov/cira/>
URL: https://epa.gov/cira/FrEDI/
Description: This R package models damages and impacts from climate change in the contiguous United States (CONUS)
using the Framework for Evaluating Damages and Impacts (FrEDI) developed as part of the Climate Change Impacts and
Risk Analysis (CIRA) project at the U.S. Environmental Protection Agency. The package contains functions that
implement FrEDI for projecting impacts from climate change and sea level rise for a selected set of
sectors. Version 2.3.0 includes a module for estimating impacts on socially vulnerable populations for
sectors. Version 3.0.0 includes a module for estimating impacts on socially vulnerable populations for
select sectors.
License: file LICENSE
Encoding: UTF-8
Expand Down
Binary file modified FrEDI/R/sysdata.rda
Binary file not shown.
Binary file modified FrEDI/data/defaultResults.rda
Binary file not shown.
Binary file removed FrEDI_2.2.0.tar.gz
Binary file not shown.
Binary file renamed FrEDI_2.3.0.tar.gz → FrEDI_3.0.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 13 additions & 13 deletions createSystemData/configure_FrEDI.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require(devtools)
Date of most recent version of the Excel configuration file:

```{r mostRecentDate}
mostRecentDate <- "20220601"
mostRecentDate <- "20220609"
```


Expand Down Expand Up @@ -136,7 +136,7 @@ Test system data
```{r test_systemData0}
### Uncomment following two lines to create and save data and check the outputs
time1 <- Sys.time()
test_systemData <- createSystemData(save=T, excelName = excelFileName, silent=T)
test_systemData <- createSystemData(save=F, excelName = excelFileName, silent=T)
time2 <- Sys.time()
time_create <- time2 - time1; time_create
```
Expand All @@ -145,9 +145,9 @@ time_create <- time2 - time1; time_create
Use the following code chunk to view/check outputs for the new sector (all data stored in a list called `test_systemData`)

```{r check outputs}
(test_systemData$slrImpacts %>% filter(sector %in% c_newSectors)) %>% filter(!is.na(annual_impacts)) %>% nrow
test_systemData$slrImpacts %>% names
test_systemData$df_results0$sector_label %>% unique
#(test_systemData$slrImpacts %>% filter(sector %in% c_newSectors)) %>% filter(!is.na(annual_impacts)) %>% nrow
#test_systemData$slrImpacts %>% names
#test_systemData$df_results0$sector_label %>% unique
```


Expand Down Expand Up @@ -216,7 +216,7 @@ After running, [update the R tool](#updateRtool).
Change the following code if there are new sectors

```{r new_sectors}
c_sectorsList <- "Extreme Temperature"
c_sectorsList <- "ATS Extreme Temperature"
# c_sectorsList <- FrEDI::get_sectorInfo()
```

Expand All @@ -227,9 +227,9 @@ c_sectorsList <- "Extreme Temperature"
Try the package: 167,184 rows

```{r df_defaults, message=T}
# frediPath %>% load_all
# df_defaults <- run_fredi(sectorList = c_sectorsList, aggLevels="none") %>% filter(year %in% seq(2010, 2090, by=5))
df_defaults <- FrEDI::run_fredi(sectorList = c_sectorsList, aggLevels="none") %>% filter(year %in% seq(2010, 2090, by=5))
frediPath %>% load_all
df_defaults <- run_fredi(sectorList = c_sectorsList, aggLevels="none") %>% filter(year %in% seq(2010, 2090, by=5))
# df_defaults <- FrEDI::run_fredi(sectorList = c_sectorsList, aggLevels="none") %>% filter(year %in% seq(2010, 2090, by=5))
# df_defaults %>% filter(!is.na(annual_impacts)) %>% nrow
```

Expand All @@ -247,8 +247,8 @@ test_digits <- (df_defaults %>%
))$annual_impacts; test_digits
# test_digits %>% format(digits = 6)
test_digits %>% sprintf(fmt = '%#.6f')
c(NA) %>% sprintf(fmt = '%#.6f')
# test_digits %>% sprintf(fmt = '%#.6f')
# c(NA) %>% sprintf(fmt = '%#.6f')
### -239115535.389834
```

Expand Down Expand Up @@ -310,7 +310,7 @@ Use the following section to update R defaults
```{r defaultResults}
# ###### Update and Save Default Scenario ######
defaultResults <- FrEDI::run_fredi()
save(defaultResults, file=frediPath %>% file.path("data", "defaultResults.RData"))
save(defaultResults, file=frediPath %>% file.path("data", "defaultResults.rda"))
```


Expand Down Expand Up @@ -354,7 +354,7 @@ devtools::build(pkg=frediPath)
```{r package paths}
### Copy the file
packageName <- "FrEDI"
packageVersion <- "2.3.0"
packageVersion <- "3.0.0"
packageFile_name <- packageName %>% paste0("_", packageVersion, ".tar.gz")
packageFile_path <- frediPath %>% file.path("..", packageFile_name)
packageDest <- .libPaths()[1]
Expand Down
Binary file not shown.
Binary file modified createSystemData/data/sysdata.rda
Binary file not shown.
Binary file not shown.

0 comments on commit f052e2a

Please sign in to comment.