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

[1] - added Deep poverty impact #18

Merged
merged 13 commits into from
Jul 9, 2024

Conversation

masterismail
Copy link
Collaborator

example usage

The policy used can be found here

by age

from policyengine import EconomicImpact

impact = EconomicImpact(reform={
  "gov.hmrc.income_tax.rates.uk[0].rate": {
    "2024-01-01.2100-12-31": 0.55
  }},country="uk")

child = impact.calculate("poverty/deep/child")
adult = impact.calculate("poverty/deep/adult")
senior = impact.calculate("poverty/deep/senior")
all = impact.calculate("poverty/deep/gender/all")


print(f"child = {child} \n adult = {adult} \n senior = {senior} \n all = {all} ")

output

child = {'baseline': 2.44, 'reform': 2.45, 'change': 0.7} 
 adult = {'baseline': 2.6, 'reform': 2.7, 'change': 3.9} 
 senior = {'baseline': 1.76, 'reform': 1.76, 'change': 0.5} 
 all = {'baseline': 2.41, 'reform': 2.47, 'change': 2.7} 

by gender

from policyengine import EconomicImpact

impact = EconomicImpact(reform={
  "gov.hmrc.income_tax.rates.uk[0].rate": {
    "2024-01-01.2100-12-31": 0.55
  }},country="uk")

male = impact.calculate("poverty/deep/male")
female = impact.calculate("poverty/deep/female")
all = impact.calculate("poverty/deep/gender/all")


print(f"male = {male} \n female = {female} \n all = {all} ")

output

male = {'baseline': 2.66, 'reform': 2.73, 'change': 2.5} 
 female = {'baseline': 2.16, 'reform': 2.23, 'change': 2.9} 
 all = {'baseline': 2.41, 'reform': 2.47, 'change': 2.7} 

@nikhilwoodruff nikhilwoodruff merged commit 1e764c7 into PolicyEngine:main Jul 9, 2024
1 check passed
@masterismail masterismail changed the title added Deep poverty impact [1] - added Deep poverty impact Jul 10, 2024
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.

2 participants