Skip to content

uw-windc/WiNDCNational.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

110 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiNDC National

Stable Dev

This package contains methods to build the WiNDC National data from the source BEA input/output tables.

Example Usage

using WiNDCNational
using DataFrames
import MPSGE # import MPSGE to avoid name conflicts


X = build_us_table(:summary)

Y, M = calibrate(X) # Calibrate the model


# Compare pre-calibration and post-calibration data
leftjoin(
    table(X),
    table(Y),
    on = [:row, :col, :year, :parameter],
    renamecols = "_X" => "_Y"
) |>
x -> transform(x,
    [:value_X, :value_Y] => ByRow((x,y) -> abs(x - y)) => :diff
) |>
x -> subset(x, :diff => ByRow(>(1e-6))) |>
x -> sort(x, :diff)



M = national_mpsge(Y) # add keyword year = 2023 to solve for a specific year
MPSGE.solve!(M; cumulative_iteration_limit=0) # Solve at benchmark

MPSGE.set_value!.(M[:Absorption_Tax], 0) # Set some taxes to 0
MPSGE.solve!(M)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages