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

Make you are here points on marginal tax rate charts a point instead of a line #682

Merged
merged 4 commits into from
Aug 10, 2023

Conversation

patrickhanl
Copy link
Contributor

@patrickhanl patrickhanl commented Aug 9, 2023

MTR plot with no reform

mtr-no-reform

MTR baseline and reform

mtr-baseline-reform

MTR delta

mtr-delta

Also MTR component was using some fuzzy logic to get the reform MTR value, I updated that to use the householdReform prop the same way the baseline MTR value was assigned.

resolves #663

🤖 Generated by Copilot at abbef1a

Summary

📊🛠️🧪

This pull request adds a new feature to the policy engine app that allows users to compare the marginal tax rates of a household under different policies. It updates the MarginalTaxRates component to show the reform policy output and scatter plots, and adds a test file MarginalTaxRates.test.js to verify the component's functionality.

We plot the curves of doom and despair
We mock the Plotly and the useSearchParams
We show the output and the rates of the reform
We scatter the points of the MarginalTaxRates

Walkthrough

  • Add a new prop to the MarginalTaxRates component to compare baseline and reform policies (link)
  • Simplify the logic for getting the reform marginal tax rate value using the getValueFromHousehold function (link)
  • Change the lines that mark the current earnings and marginal tax rates to scatter plots with single markers for better visibility (link, link, link)
  • Update the comment to reflect the change of plot type (link)
  • Add a new test file for the MarginalTaxRates component in src/__tests__/MarginalTaxRates.test.js (link)

…use householdReform prop to get reform MTR value in same way as current MTR value. Added MTR test file.
@MaxGhenis
Copy link
Contributor

Thanks! Could you link the issue and resolve the merge conflicts?

@MaxGhenis MaxGhenis merged commit 3c02158 into PolicyEngine:master Aug 10, 2023
2 checks passed
@patrickhanl patrickhanl deleted the issue663 branch August 12, 2023 15:19
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

Successfully merging this pull request may close these issues.

Make you are here points on marginal tax rate charts a point instead of a line
2 participants