Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new features in json file #431

Closed
MattHJensen opened this issue Dec 12, 2016 · 5 comments
Closed

new features in json file #431

MattHJensen opened this issue Dec 12, 2016 · 5 comments
Assignees
Milestone

Comments

@MattHJensen
Copy link
Contributor

@martinholmer recently augmented the JSON reform file to include Growth, Behavior, and Consumption parameters in PSLmodels/Tax-Calculator#1083

These changes break backwards compatibility for TB and TC, and some updates to TB are required before we can deploy any version of TC greater than 0.7.2 to TB.

I described the core issue in PSLmodels/Tax-Calculator#1083:

it won't be trivial to adopt on TaxBrain because of how TaxBrain guides users to static modeling first and then to dynamic modeling. Right now, partial eq and other dynamic runs come after the static results; with the new file upload feature, users will be able to jump directly to a partial equilibrium run without first generating static results. I don't think it will be hard to deal with the user interface and backend changes that will need to result from that, but it won't be trivial either.

To be more specific, the problem is that the new JSON format allows users to upload a file that will produce a partial equilibrium result rather than to a static result. The resulting page shouldn't have the same functionality as a static results page, and it also probably can't have the same functionality as the partial equilibrium result page.

The reason that the page shouldn't have the same functionality as the static results page is that it won't make sense for the user to continue on to dynamic modeling after having specified behavioral parameters.

The reason that the page probably can't have the same functionality as the partial equilibrium result page is that our existing PE page allows the user to return to the static results, but no static results were generated with the json file.

I see two options for when the user includes nonzero behavioral parameters:

  1. Have the page take the user to what looks like the static results page, but when the user clicks "Link to Dynamic Simulations" a pop up will say "Your simulation is already a partial equilibrium dynamic simulation. Please resubmit without behavioral parameters if you would like to link to other dynamic modeling options."

  2. Have the page look like the partial equilibrium results page and either:
    a) remove the "The microsimulation upon which this dynamic simulation was based can be found here" or,
    b) (fancier version) leave the "The microsimulation upon which this dynamic simulation was based can be found here" and when the user clicks "here", run that static calculation and generate the static results on the fly.

@talumbau, it would be helpful to know which of these is easier to implement, and if there will be any other difficulties on the back end with incorporating the new json features from PSLmodels/Tax-Calculator#1083

@martinholmer
Copy link
Contributor

martinholmer commented Dec 12, 2016

@MattHJensen said:

I see two options for when the user [uploads a JSON reform file that] includes nonzero behavioral parameters:

(1) Have the page take the user to what looks like the static results page, but when the user clicks "Link to Dynamic Simulations" a pop up will say "Your simulation is already a partial equilibrium dynamic simulation. Please resubmit without behavioral parameters if you would like to link to other dynamic modeling options."

I don't know anything about how easy or difficult different kinds of changes to TaxBrain are, but it seems to me that this first option is a very sensible approach. There is no need for different output options, just a need to block the current path to the "dynamic" analysis options.

That's my two cents on this.

@MattHJensen @talumbau @feenberg @brendancol @Amy-Xu @GoFroggyRun @andersonfrailey

@MattHJensen
Copy link
Contributor Author

Thanks @martinholmer! That makes sense to me too.

@MattHJensen MattHJensen added this to the b1 milestone Dec 12, 2016
@MattHJensen
Copy link
Contributor Author

Added this to milestone b1 as it is blocking any new TC releases.

@talumbau talumbau self-assigned this Dec 13, 2016
@talumbau
Copy link
Member

I actually think 1 is probably the easiest, due to the fact that it maintains the "file based reform generates static results page" workflow, which is desirable. I can take this on.

@MattHJensen
Copy link
Contributor Author

Sounds good. Thanks @talumbau

talumbau pushed a commit that referenced this issue Dec 31, 2016
 - A file-based reform could have behavioral parameters. If this is the
   case, you should not be able to launch a dynamic simulation.
 - Adds a modal pop-up if user clicks Link to Dyn. Sims on results page
   for file based reform that includes behavior parameters.
 - Behavior is unchanged if file based reform contains no behavioral
   components
 - Depends on change to worker node
 - Resolves #431
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants