Skip to content

Commit

Permalink
Merge pull request #30 from USEPA/dev
Browse files Browse the repository at this point in the history
Update data commons url
  • Loading branch information
bl-young authored Jul 27, 2023
2 parents b650c04 + de7f237 commit 82ec0eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions R/UtilityFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ getFlowsaData <- function(dataname, year) {
# Define file directory
directory <- file.path(rappdirs::user_data_dir(), subdirectory)
if (!file.exists(file.path(directory, filename))) {
url <- paste0("https://edap-ord-data-commons.s3.amazonaws.com/", subdirectory)
url <- paste0("https://dmap-data-commons-ord.s3.amazonaws.com/", subdirectory)
logging::loginfo(paste0("file not found, downloading from ", url))
# Check for and create directory if necessary
if (!file.exists(directory)) {
Expand All @@ -197,7 +197,7 @@ getFlowsaData <- function(dataname, year) {
#' "flowsa/FlowByActivity".
#' @return A dataframe of StateIO data registry on Data Commons.
getRegistryonDataCommons <- function(data_group = "stateio") {
registry_ls <- aws.s3::get_bucket(bucket = "edap-ord-data-commons",
registry_ls <- aws.s3::get_bucket(bucket = "dmap-data-commons-ord",
prefix = data_group)
registry <- cbind.data.frame(basename(sapply(registry_ls, `[[`, "Key")),
sapply(registry_ls, `[[`, "LastModified"),
Expand Down Expand Up @@ -251,7 +251,7 @@ downloadStateIODatafromDataCommons <- function(filename, ver = NULL) {
f <- paste0(paste(filename, ver, sep = "_"), ".rds")
}
# Download file
url <- "https://edap-ord-data-commons.s3.amazonaws.com/stateio"
url <- "https://dmap-data-commons-ord.s3.amazonaws.com/stateio"
utils::download.file(file.path(url, f),
file.path(directory, f), mode = "wb", quiet = TRUE)
}
Expand Down Expand Up @@ -296,7 +296,7 @@ loadStateIODataFile <- function(filename, ver = NULL) {
"not found in local data directory, either."))
message("Please confirm ", filename, " is correctly spelled. ",
"You should be able to find the correctly spelled file on ",
"https://edap-ord-data-commons.s3.amazonaws.com/index.html?prefix=stateio/. ",
"https://dmap-data-commons-ord.s3.amazonaws.com/index.html?prefix=stateio/. ",
"If it's not found there, please open an issue at ",
"https://github.com/USEPA/stateior/issues/new ",
"and inform package maintainers.\n",
Expand Down
2 changes: 1 addition & 1 deletion format_specs/OneRegionData.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ One region IO data created by `stateior` are data for single states saved as `.r
| Commodity Output | State_Summary_CommodityOutput_`year`_`version` | numeric vector | [Output Vectors](https://github.com/USEPA/useeior/blob/v1.1.0/format_specs/Model.md#output-vectors) |
| Industry Output | State_Summary_IndustryOutput_`year`_`version` | numeric vector | [Output Vectors](https://github.com/USEPA/useeior/blob/v1.1.0/format_specs/Model.md#output-vectors)|

<sup>1</sup> Data names on [Data Commons](https://edap-ord-data-commons.s3.amazonaws.com/index.html?prefix=stateio/). `year` and `version` are subject to change.
<sup>1</sup> Data names on [Data Commons](https://dmap-data-commons-ord.s3.amazonaws.com/index.html?prefix=stateio/). `year` and `version` are subject to change.

<sup>2</sup> These Use tables add, as the final column, the international trade adjustment (ITA) containing the value of all transportation and insurance services and customs duties

2 changes: 1 addition & 1 deletion format_specs/TwoRegionData.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Each two-region matrix has a four-quadrant structure. In each matrix, `SoI` is r
| Commodity Output | TwoRegion_Summary_CommodityOutput_`year`_`version` | numeric vector | [Two-region total output by commodity](#Two-Region-Output-Vectors) |
| Industry Output | TwoRegion_Summary_IndustryOutput_`year`_`version` | numeric vector | [Two-region total output by industry](#Two-Region-Output-Vectors) |

<sup>1</sup> Data names on [Data Commons](https://edap-ord-data-commons.s3.amazonaws.com/index.html?prefix=stateio/). `year` and `version` are subject to change.
<sup>1</sup> Data names on [Data Commons](https://dmap-data-commons-ord.s3.amazonaws.com/index.html?prefix=stateio/). `year` and `version` are subject to change.

### Two Region Make
The two-region Make is an `industry x commodity` matrix with amounts of commodities (in model year USD) being made by industries.
Expand Down

0 comments on commit 82ec0eb

Please sign in to comment.