-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuseeior_example.R
More file actions
23 lines (18 loc) · 1012 Bytes
/
useeior_example.R
File metadata and controls
23 lines (18 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Example for running useeior, see https://github.com/USEPA/useeior for more information on the model
# Run ?functionname to see documentation and function input options for the functions in this example
# The output csv files are the inputs for useeiopy (https://github.com/USEPA/useeiopy)
# Start clean by removing useeior package and installing latest version
remove.packages("useeior")
devtools::install_github("USEPA/useeior")
library(useeior)
# See the versioning scheme for explanation of model names (https://github.com/USEPA/USEEIO/blob/master/VersioningScheme.md)
useeior::seeAvailableModels()
model <- useeior::loadIOData('USEEIOv2.0-GHG')
model <- useeior::loadandbuildSatelliteTables(model)
model <- useeior::loadandbuildIndicators(model)
model <- useeior::buildEEIOModel(model)
result <- useeior::calculateEEIOModel(model, perspective='DIRECT')
# Write model for API
useeior::writeModelforAPI(model, getwd())
# Write model matrices to csv for review
useeior::writeModelMatrices(model,getwd())