diff --git a/Budgetary/byprogram.html b/Budgetary/byprogram.html deleted file mode 100644 index a88c3f9..0000000 --- a/Budgetary/byprogram.html +++ /dev/null @@ -1,508 +0,0 @@ - - - - - - - - - By program - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By program

-
-

Overview

-

The Budgetary Impact by Program metrics provide detailed insights into how a policy reform affects various government revenue and expenditure programs. These metrics are part of the EconomicImpact class and can be calculated for different tax and benefit programs.

-
-
-

Available Metrics

-
    -
  1. budgetary/by_program/income_tax: Income Tax revenue

  2. -
  3. budgetary/by_program/national_insurance: National Insurance contributions

  4. -
  5. budgetary/by_program/vat: Value Added Tax (VAT) revenue

  6. -
  7. budgetary/by_program/council_tax: Council Tax revenue

  8. -
  9. budgetary/by_program/fuel_duty: Fuel Duty revenue

  10. -
  11. budgetary/by_program/tax_credits: Tax Credits expenditure

  12. -
  13. budgetary/by_program/universal_credits: Universal Credit expenditure

  14. -
  15. budgetary/by_program/child_benefits: Child Benefits expenditure

  16. -
  17. budgetary/by_program/state_pension: State Pension expenditure

  18. -
  19. budgetary/by_program/pension_credit: Pension Credit expenditure

  20. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The amount before the reform (in GBP).

  • -
  • reform: The amount after the reform (in GBP).

  • -
  • change: The percentage change due to the reform.

  • -
-

All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate budgetary impact for each program
-income_tax = impact.calculate("budgetary/by_program/income_tax")
-national_insurance = impact.calculate("budgetary/by_program/national_insurance")
-vat = impact.calculate("budgetary/by_program/vat")
-council_tax = impact.calculate("budgetary/by_program/council_tax")
-fuel_duty = impact.calculate("budgetary/by_program/fuel_duty")
-tax_credits = impact.calculate("budgetary/by_program/tax_credits")
-universal_credits = impact.calculate("budgetary/by_program/universal_credits")
-child_benefits = impact.calculate("budgetary/by_program/child_benefits")
-state_pension = impact.calculate("budgetary/by_program/state_pension")
-pension_credit = impact.calculate("budgetary/by_program/pension_credit")
-
-# Print the results
-print(f"Income Tax: {income_tax}")
-print(f"National Insurance: {national_insurance}")
-print(f"VAT: {vat}")
-print(f"Council Tax: {council_tax}")
-print(f"Fuel Duty: {fuel_duty}")
-print(f"Tax Credits: {tax_credits}")
-print(f"Universal Credit: {universal_credits}")
-print(f"Child Benefits: {child_benefits}")
-print(f"State Pension: {state_pension}")
-print(f"Pension Credit: {pension_credit}")
-
-
-
-
-
-

Output

-
Income Tax: {'baseline': 291090070166.62, 'reform': 496242053771.2, 'change': 70.5}
-National Insurance: {'baseline': 50826792606.89, 'reform': 50826792606.89, 'change': 0.0}
-VAT: {'baseline': 175581776889.21, 'reform': 175581776889.21, 'change': 0.0}
-Council Tax: {'baseline': 47861314826.79, 'reform': 47861314826.79, 'change': 0.0}
-Fuel Duty: {'baseline': 28019829809.09, 'reform': 28019829809.09, 'change': 0.0}
-Tax Credits: {'baseline': -208150256.01, 'reform': -308166663.98, 'change': 48.1}
-Universal Credit: {'baseline': -72209672284.1, 'reform': -73780445681.08, 'change': 2.2}
-Child Benefits: {'baseline': -15975002346.41, 'reform': -15975002346.41, 'change': -0.0}
-State Pension: {'baseline': -127240166697.26, 'reform': -127240166697.26, 'change': -0.0}
-Pension Credit: {'baseline': -2000983943.05, 'reform': -2181135212.4, 'change': 9.0}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • Income Tax revenue increases significantly by 70.5%, from £291.1 billion to £496.2 billion.

  • -
  • National Insurance, VAT, Council Tax, and Fuel Duty revenues remain unchanged.

  • -
  • Tax Credits expenditure increases by 48.1%, from £208.2 million to £308.2 million.

  • -
  • Universal Credit expenditure increases slightly by 2.2%, from £72.2 billion to £73.8 billion.

  • -
  • Child Benefits and State Pension expenditures remain unchanged.

  • -
  • Pension Credit expenditure increases by 9.0%, from £2.0 billion to £2.2 billion.

  • -
-

These metrics provide a comprehensive view of how the reform affects various government revenue streams and expenditure programs. They can help policymakers understand the fiscal implications of proposed reforms across different sectors of the budget. -Note: Negative values for benefits (e.g., Tax Credits, Universal Credit) indicate government expenditure.

-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Budgetary/index.html b/Budgetary/index.html deleted file mode 100644 index 8a1b3c5..0000000 --- a/Budgetary/index.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - Budgetary Impact - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Budgetary Impact

-
-

Overview

-

The Budgetary Impact metrics provide comprehensive insights into how policy reforms affect government finances. These metrics are part of the EconomicImpact class and offer detailed analysis at both program-specific and overall levels.

-
-
-

Table of Contents

-
    -
  1. Budgetary Impact Overall

    -
      -
    • Overall Budgetary Impact

    • -
    • Benefit Spending Impact

    • -
    • Tax Revenue Impact

    • -
    -
  2. -
  3. Budgetary Impact by Program

    -
      -
    • Income Tax

    • -
    • National Insurance

    • -
    • Value Added Tax (VAT)

    • -
    • Council Tax

    • -
    • Fuel Duty

    • -
    • Tax Credits

    • -
    • Universal Credit

    • -
    • Child Benefits

    • -
    • State Pension

    • -
    • Pension Credit

    • -
    -
  4. -
-
-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Budgetary/overall.html b/Budgetary/overall.html deleted file mode 100644 index 785cd97..0000000 --- a/Budgetary/overall.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - - - - Overall - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Overall

-
-

Overview

-

The Budgetary Impact Overall metrics provide a high-level summary of how a policy reform affects government finances. These metrics are part of the EconomicImpact class and offer insights into the overall budgetary impact, changes in benefit spending, and changes in tax revenue.

-
-
-

Available Metrics

-
    -
  1. budgetary/overall/budgetary_impact: Overall budgetary impact of the reform

  2. -
  3. budgetary/overall/benefit_spending_impact: Impact on total benefit spending

  4. -
  5. budgetary/overall/tax_revenue_impact: Impact on total tax revenue

  6. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with specific keys:

-
-

Budgetary Impact

-
    -
  • budgetary_impact: The overall budgetary impact (in GBP)

  • -
-
-
-

Benefit Spending Impact

-
    -
  • baseline_total_benefits: Total benefits before the reform (in GBP)

  • -
  • reformed total benefits: Total benefits after the reform (in GBP)

  • -
  • benefit_spending_impact: The difference in benefit spending (in GBP)

  • -
-
-
-

Tax Revenue Impact

-
    -
  • baseline total tax: Total tax revenue before the reform (in GBP)

  • -
  • reformed total tax: Total tax revenue after the reform (in GBP)

  • -
  • tax_revenue_impact: The difference in tax revenue (in GBP)

  • -
-
-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate overall budgetary impacts
-budgetary_impact = impact.calculate("budgetary/overall/budgetary_impact")
-benefit_spending_impact = impact.calculate("budgetary/overall/benefit_spending_impact")
-tax_revenue_impact = impact.calculate("budgetary/overall/tax_revenue_impact")
-
-# Print the results
-print(f"Budgetary Impact: {budgetary_impact}")
-print(f"Benefit Spending Impact: {benefit_spending_impact}")
-print(f"Tax Revenue Impact: {tax_revenue_impact}")
-
-
-
-
-
-

output

-
Budgetary Impact: {'budgetary_impact': 203274712297.14}
-Benefit Spending Impact: {'baseline_total_benefits': 247160184562.67, 'reformed total benefits': 249032006583.15, 'benefit spending impact': 1871822020.49}
-Tax Revenue Impact: {'baseline total tax': 447861864968.89, 'reformed total tax': 653008399286.52, 'tax revenue impact': 205146534317.63}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  1. Overall Budgetary Impact:

  2. -
-
    -
  • The reform results in a positive budgetary impact of approximately £203.27 billion. This represents the net fiscal effect of the reform, combining changes in both tax revenue and benefit spending.

  • -
-
    -
  1. Benefit Spending Impact:

  2. -
-
    -
  • Baseline total benefits: £247.16 billion

  • -
  • Reformed total benefits: £249.03 billion

  • -
  • The reform increases benefit spending by £1.87 billion

  • -
-
    -
  1. Tax Revenue Impact:

  2. -
-
    -
  • Baseline total tax: £447.86 billion

  • -
  • Reformed total tax: £653.01 billion

  • -
  • The reform increases tax revenue by £205.15 billion

  • -
-

The reform significantly increases tax revenue (by £205.15 billion) while slightly increasing benefit spending (by £1.87 billion). The net effect is a substantial positive budgetary impact of £203.27 billion. -These metrics provide a comprehensive overview of the fiscal implications of the proposed reform. They can help policymakers understand the overall financial impact on government finances, including changes in both revenue and expenditure. -Note: All monetary values are in GBP (British Pounds).

-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByIncomeDecile/average.html b/Distributional/ByIncomeDecile/average.html deleted file mode 100644 index 25524be..0000000 --- a/Distributional/ByIncomeDecile/average.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - - - - - Income Distribution by Average - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Income Distribution by Average

-
-

Overview

-

The income distribution by average metrics provide insights into how a policy reform affects the average income across different income deciles. These metrics are part of the EconomicImpact class and measure the average change in household net income due to the reform.

-
-
-

Available Metrics

-
    -
  1. distributional/by_income/average: Calculates the average change in household net income by income decile.

  2. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • average: A dictionary where the key is the income decile, and the value is the average change in income for that decile.

  • -
-

The values represent the change in income due to the policy reform, rounded to several decimal places.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }}, country="uk")
-
-# Calculate average income change by income decile
-average_income_change = impact.calculate("distributional/by_income/average")
-
-# Print the result
-print(f"Average income change: {average_income_change}")
-
-
-
-
-

Output

-
Average income change: {'average': {1: -1542.53, 2: -1982.53, 3: -4556.84, 4: -5370.20, 5: -7216.05, 6: -7591.30, 7: -9211.03, 8: -9648.62, 9: -11506.89, 10: -14378.30, 11: -13195.00}}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The average income change is negative across all deciles, indicating a reduction in household net income due to the policy reform.

  • -
  • The change is most significant in the higher deciles, with the highest decrease observed in the top decile (11), at -13,195.00.

  • -
  • The impact is progressively less severe in lower deciles, with the smallest decrease observed in the lowest decile (1), at -1,542.53.

  • -
-
-

Let me know if you need any further adjustments!

-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByIncomeDecile/index.html b/Distributional/ByIncomeDecile/index.html deleted file mode 100644 index 812b2b2..0000000 --- a/Distributional/ByIncomeDecile/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - By income - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By income

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByIncomeDecile/relative.html b/Distributional/ByIncomeDecile/relative.html deleted file mode 100644 index e1856b9..0000000 --- a/Distributional/ByIncomeDecile/relative.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - - - Income Decile by Relative Change - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Income Decile by Relative Change

-
-

Overview

-

The income decile by relative change metrics provide insights into how a policy reform affects household net income across different income deciles in relative terms. These metrics are part of the EconomicImpact class and measure the relative change in income due to the reform, expressed as a percentage of the baseline income.

-
-
-

Available Metrics

-
    -
  1. distributional/by_income/relative: Calculates the relative change in household net income by income decile.

  2. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • relative: A dictionary where the key is the income decile, and the value is the relative change in income for that decile. The relative change is expressed as a percentage of the baseline income.

  • -
-

The values are rounded to several decimal places.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }}, country="uk")
-
-# Calculate relative income change by income decile
-relative_income_change = impact.calculate("distributional/by_income/relative")
-
-# Print the result
-print(f"Relative income change: {relative_income_change}")
-
-
-
-
-

Output

-
Relative income change: {'relative': {1: -0.0704, 2: -0.0809, 3: -0.1465, 4: -0.1559, 5: -0.1784, 6: -0.1823, 7: -0.1986, 8: -0.1832, 9: -0.1960, 10: -0.1392, 11: -0.0281}}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The relative income change is negative across all deciles, indicating a reduction in household net income as a percentage of the baseline.

  • -
  • The highest relative decrease is observed in the 7th decile, with a reduction of approximately 19.86%.

  • -
  • The smallest relative decrease is in the 11th decile, at about 2.81%.

  • -
  • The relative changes vary by decile, reflecting the impact of the policy reform on different income groups.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByWealthDecile/average.html b/Distributional/ByWealthDecile/average.html deleted file mode 100644 index 331a629..0000000 --- a/Distributional/ByWealthDecile/average.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - - - Average - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Average

-
-

Overview

-

The wealth distribution by average metrics provide insights into how a policy reform affects the average wealth across different wealth deciles. These metrics are part of the EconomicImpact class and measure the average change in household net wealth due to the reform.

-
-
-

Available Metrics

-
    -
  1. distributional/by_wealth/average: Calculates the average change in household net wealth by wealth decile.

  2. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • average: A dictionary where the key is the wealth decile, and the value is the average change in wealth for that decile.

  • -
-

The values represent the change in wealth due to the policy reform, rounded to several decimal places.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }}, country="uk")
-
-# Calculate average wealth change by wealth decile
-average_wealth_change = impact.calculate("distributional/by_wealth/average")
-
-# Print the result
-print(f"Average wealth change: {average_wealth_change}")
-
-
-
-
-

Output

-
Average wealth change: {'average': {1: -1542.53, 2: -1982.53, 3: -4556.84, 4: -5370.20, 5: -7216.05, 6: -7591.30, 7: -9211.03, 8: -9648.62, 9: -11506.89, 10: -14378.30, 11: -13195.00}}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The average wealth change is negative across all deciles, indicating a reduction in household net wealth due to the policy reform.

  • -
  • The impact is most severe in the highest deciles, with the highest decrease observed in the top decile (11), at -13,195.00.

  • -
  • The decrease in wealth is progressively less severe in lower deciles, with the smallest decrease observed in the lowest decile (1), at -1,542.53.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByWealthDecile/index.html b/Distributional/ByWealthDecile/index.html deleted file mode 100644 index 3760351..0000000 --- a/Distributional/ByWealthDecile/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - by wealth - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

by wealth

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/ByWealthDecile/relative.html b/Distributional/ByWealthDecile/relative.html deleted file mode 100644 index ecbce26..0000000 --- a/Distributional/ByWealthDecile/relative.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - - - Relative - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Relative

-
-

Overview

-

The wealth distribution by relative change metrics provide insights into how a policy reform affects the relative change in household net income across different wealth deciles. These metrics are part of the EconomicImpact class and measure the proportional change in income due to the reform.

-
-
-

Available Metrics

-
    -
  1. distributional/by_wealth/relative: Calculates the relative change in household net income by wealth decile.

  2. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • relative: A dictionary where the key is the wealth decile, and the value is the relative change in income for that decile.

  • -
-

The relative change is calculated as the ratio of the change in income to the baseline income, providing a measure of how income changes proportionally within each decile.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }}, country="uk")
-
-# Calculate relative income change by wealth decile
-relative_income_change = impact.calculate("distributional/by_wealth/relative")
-
-# Print the result
-print(f"Relative income change: {relative_income_change}")
-
-
-
-
-

Output

-
Relative income change: {'relative': {1: -0.0704, 2: -0.0809, 3: -0.1465, 4: -0.1559, 5: -0.1784, 6: -0.1823, 7: -0.1986, 8: -0.1832, 9: -0.1960, 10: -0.1392, 11: -0.0281}}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The relative income change is negative across all wealth deciles, indicating a proportional decrease in household net income due to the policy reform.

  • -
  • The relative change is highest in the higher deciles, with the most significant decrease observed in the top decile (11), at -0.0281 (2.81% decrease).

  • -
  • The impact is also noticeable in the lower deciles, with the smallest relative decrease observed in the lowest decile (1), at -0.0704 (7.04% decrease).

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Distributional/index.html b/Distributional/index.html deleted file mode 100644 index 13ecdc3..0000000 --- a/Distributional/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - Distributional - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Distributional

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/EconomicImpact/index.html b/EconomicImpact/index.html deleted file mode 100644 index 579b18e..0000000 --- a/EconomicImpact/index.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - - - - - - EconomicImpact Class - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

EconomicImpact Class

-
-

Overview

-

The EconomicImpact class is designed to evaluate the economic impact of a given reform on a specified country. It provides methods to calculate various economic metrics, such as inequality and income distribution, before and after the reform.

-
-
-

Class Initialization

-
-

EconomicImpact(reform, country)

-

Initializes the EconomicImpact class with a specified reform and country.

-

Parameters:

-
    -
  • reform (dict): A dictionary defining the economic reform. The structure of the dictionary should match the expected format for the Reform class.

  • -
  • country (str): The country for which the reform’s impact is to be evaluated. Supported values are "uk" and "us".

  • -
-

Example:

-
from policyengine import EconomicImpact
-
-impact = EconomicImpact(
-    reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}},
-    country="uk"
-)
-
-
-
-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class
-impact = EconomicImpact(
-    reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}},
-    country="uk"
-)
-
-# Calculate the Gini coefficient
-result_gini = impact.calculate("inequality/gini")
-print(result_gini)
-# Output: {'baseline': 0.4288962129322326, 'reform': 0.42720356179075414, 'change': -0.001692651141478485}
-
-# Calculate the top 1% income share
-result_top_1 = impact.calculate("inequality/top_1_pct_share")
-print(result_top_1)
-# Output: {'baseline': 0.09121853588608866, 'reform': 0.09301056461517446, 'change': 0.0017920287290857928}
-
-# Calculate the top 10% income share
-result_top_10 = impact.calculate("inequality/top_10_pct_share")
-print(result_top_10)
-# Output: {'baseline': 0.3101681771998754, 'reform': 0.31214840219992496, 'change': 0.0019802250000495736}
-
-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/EconomicImpact/intro.html b/EconomicImpact/intro.html deleted file mode 100644 index 8d82b0c..0000000 --- a/EconomicImpact/intro.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - EconomicImpact Class - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

EconomicImpact Class

-
-

Overview

-

The EconomicImpact class is designed to evaluate the economic impact of a given reform on a specified country. It provides methods to calculate various economic metrics, such as inequality and income distribution, before and after the reform.

-
-
-

Class Initialization

-
-

EconomicImpact(reform, country)

-

Initializes the EconomicImpact class with a specified reform and country.

-

Parameters:

-
    -
  • reform (dict): A dictionary defining the economic reform. The structure of the dictionary should match the expected format for the Reform class.

  • -
  • country (str): The country for which the reform’s impact is to be evaluated. Supported values are "uk" and "us".

  • -
-

Example:

-
from policyengine import EconomicImpact
-
-impact = EconomicImpact(
-    reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}},
-    country="uk"
-)
-
-
-
-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class
-impact = EconomicImpact(
-    reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}},
-    country="uk"
-)
-
-# Calculate the Gini coefficient
-result_gini = impact.calculate("inequality/gini")
-print(result_gini)
-# Output: {'baseline': 0.4288962129322326, 'reform': 0.42720356179075414, 'change': -0.001692651141478485}
-
-# Calculate the top 1% income share
-result_top_1 = impact.calculate("inequality/top_1_pct_share")
-print(result_top_1)
-# Output: {'baseline': 0.09121853588608866, 'reform': 0.09301056461517446, 'change': 0.0017920287290857928}
-
-# Calculate the top 10% income share
-result_top_10 = impact.calculate("inequality/top_10_pct_share")
-print(result_top_10)
-# Output: {'baseline': 0.3101681771998754, 'reform': 0.31214840219992496, 'change': 0.0019802250000495736}
-
-
-
-
- - - -
-
-
- - -
-
- - Made with Sphinx and @pradyunsg's - - Furo - -
-
- -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Inequality/index.html b/Inequality/index.html deleted file mode 100644 index 0218d39..0000000 --- a/Inequality/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - Inequality - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Inequality

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Inequality/inequality.html b/Inequality/inequality.html deleted file mode 100644 index 795e7fb..0000000 --- a/Inequality/inequality.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - - - - - - Inequality Impact - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Inequality Impact

-
-

Overview

-

The inequality impact metrics provide insights into how a policy reform affects income distribution. These metrics are part of the EconomicImpact class and include measures of income inequality and concentration of income among the top earners.

-
-
-

Available Metrics

-
    -
  1. inequality/gini: Calculates the Gini coefficient, which measures income inequality.

  2. -
  3. inequality/top_1_pct_share: Calculates the income share of the top 1% of earners.

  4. -
  5. inequality/top_10_pct_share: Calculates the income share of the top 10% of earners.

  6. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The metric value before the reform.

  • -
  • reform: The metric value after the reform.

  • -
  • change: The absolute change in the metric value due to the reform.

  • -
  • change_percentage: The percentage change in the metric value due to the reform (only for Gini coefficient and top 1% share).

  • -
-

All values are rounded to 2 decimal places for baseline, reform, change, and change percentage.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(
-    reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}},
-    country="uk"
-)
-
-# Calculate Gini coefficient impact
-gini_impact = impact.calculate("inequality/gini")
-
-# Calculate top 1% income share impact
-top_1_pct_share = impact.calculate("inequality/top_1_pct_share")
-
-# Calculate top 10% income share impact
-top_10_pct_share = impact.calculate("inequality/top_10_pct_share")
-
-# Print the results
-print(f"Gini coefficient impact: {gini_impact}")
-print(f"Top 1% income share impact: {top_1_pct_share}")
-print(f"Top 10% income share impact: {top_10_pct_share}")
-
-
-
-
-

Output

-
Gini coefficient impact: {'baseline': 0.43, 'reform': 0.43, 'change': -0.00, 'change_percentage': -0.39}
-Top 1% income share impact: {'baseline': 0.09, 'reform': 0.09, 'change': 0.00, 'change_percentage': 1.96}
-Top 10% income share impact: {'baseline': 0.31, 'reform': 0.31, 'change': 0.00, 'change_percentage': 0.64}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The Gini coefficient decreases slightly from 0.43 to 0.43, indicating a small reduction in income inequality.

  • -
  • The income share of the top 1% increases from 9.12% to 9.30%, reflecting a slight rise in concentration among the highest earners.

  • -
  • The income share of the top 10% increases from 31.02% to 31.21%, showing a minor rise in the share of income held by the top 10% of earners.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/deep/byage.html b/Poverty/deep/byage.html deleted file mode 100644 index 6702a74..0000000 --- a/Poverty/deep/byage.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - - - - By age - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By age

-
-

Overview

-

The deep poverty by age group metrics provide insights into how a policy reform affects deep poverty rates for different age categories. These metrics are part of the EconomicImpact class and can be calculated for children, adults, seniors, and the overall population.

-
-
-

Available Metrics

-
    -
  1. poverty/deep/child: Calculates the deep poverty rate for children.

  2. -
  3. poverty/deep/adult: Calculates the deep poverty rate for adults.

  4. -
  5. poverty/deep/senior: Calculates the deep poverty rate for seniors.

  6. -
  7. poverty/deep/age/all: Calculates the overall deep poverty rate.

  8. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The deep poverty rate before the reform.

  • -
  • reform: The deep poverty rate after the reform.

  • -
  • change: The percentage change in the deep poverty rate due to the reform.

  • -
-

All values are rounded to 1 decimal place for the baseline, reform, and change.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate deep poverty rates by age group
-child_deep_poverty = impact.calculate("poverty/deep/child")
-adult_deep_poverty = impact.calculate("poverty/deep/adult")
-senior_deep_poverty = impact.calculate("poverty/deep/senior")
-overall_deep_poverty = impact.calculate("poverty/deep/age/all")
-
-# Print the results
-print(f"Child deep poverty: {child_deep_poverty}")
-print(f"Adult deep poverty: {adult_deep_poverty}")
-print(f"Senior deep poverty: {senior_deep_poverty}")
-print(f"Overall deep poverty: {overall_deep_poverty}")
-
-
-
-
-
-

output

-
Child deep poverty: {'baseline': 2.4, 'reform': 2.5, 'change': 0.7}
-Adult deep poverty: {'baseline': 2.6, 'reform': 2.7, 'change': 3.9}
-Senior deep poverty: {'baseline': 1.8, 'reform': 1.8, 'change': 0.5}
-Overall deep poverty: {'baseline': 2.4, 'reform': 2.5, 'change': 2.7}
-
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The child deep poverty rate increases slightly from 2.4% to 2.5%, a 0.7% increase.

  • -
  • The adult deep poverty rate increases from 2.6% to 2.7%, a 3.9% increase.

  • -
  • The senior deep poverty rate remains stable at 1.8%, with a minimal 0.5% increase.

  • -
  • The overall deep poverty rate increases from 2.4% to 2.5%, a 2.7% increase.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/deep/bygender.html b/Poverty/deep/bygender.html deleted file mode 100644 index cbabf19..0000000 --- a/Poverty/deep/bygender.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - - - By gender - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By gender

-
-

Overview

-

The deep poverty by gender metrics provide insights into how a policy reform affects deep poverty rates for different genders. These metrics are part of the EconomicImpact class and can be calculated for males, females, and the overall population.

-
-
-

Available Metrics

-
    -
  1. poverty/deep/male: Calculates the deep poverty rate for males.

  2. -
  3. poverty/deep/female: Calculates the deep poverty rate for females.

  4. -
  5. poverty/deep/gender/all: Calculates the overall deep poverty rate.

  6. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The deep poverty rate before the reform.

  • -
  • reform: The deep poverty rate after the reform.

  • -
  • change: The percentage change in the deep poverty rate due to the reform.

  • -
-

All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate deep poverty rates by gender
-male_deep_poverty = impact.calculate("poverty/deep/male")
-female_deep_poverty = impact.calculate("poverty/deep/female")
-overall_deep_poverty = impact.calculate("poverty/deep/gender/all")
-
-# Print the results
-print(f"Male deep poverty: {male_deep_poverty}")
-print(f"Female deep poverty: {female_deep_poverty}")
-print(f"Overall deep poverty: {overall_deep_poverty}")
-
-
-
-
-
-

output

-
Male deep poverty: {'baseline': 2.66, 'reform': 2.73, 'change': 2.5}
-Female deep poverty: {'baseline': 2.16, 'reform': 2.23, 'change': 2.9}
-Overall deep poverty: {'baseline': 2.41, 'reform': 2.47, 'change': 2.7}
-
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The baseline male deep poverty rate is 2.66%, which increases to 2.73% after the reform, representing a 2.5% increase.

  • -
  • The baseline female deep poverty rate is 2.16%, which increases to 2.23% after the reform, representing a 2.9% increase.

  • -
  • The overall deep poverty rate increases from 2.41% to 2.47%, a change of 2.7%.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/deep/index.html b/Poverty/deep/index.html deleted file mode 100644 index ee8f17d..0000000 --- a/Poverty/deep/index.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - Deep poverty - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Deep poverty

-
-

Overview

-

Deep poverty metrics focus on measuring severe economic hardship, typically defined as living below 50% of the poverty line. These metrics provide critical information about the most economically vulnerable segments of the population.

-
-
-

Available Metrics

-

Our deep poverty analysis includes the following categories:

-
    -
  1. Deep Poverty by Age Group

    -
      -
    • Child Deep Poverty

    • -
    • Adult Deep Poverty

    • -
    • Senior Deep Poverty

    • -
    • Overall Deep Poverty

    • -
    -
  2. -
  3. Deep Poverty by Gender

    -
      -
    • Male Deep Poverty

    • -
    • Female Deep Poverty

    • -
    • Overall Deep Poverty

    • -
    -
  4. -
-
-
-

Significance

-

Deep poverty metrics are crucial for:

-
    -
  • Identifying the most economically vulnerable populations

  • -
  • Assessing the severity of poverty beyond standard poverty measures

  • -
  • Evaluating the impact of policies on extreme poverty

  • -
  • Guiding targeted interventions for those in severe economic distress

  • -
-
-
-

Usage

-

These metrics can be accessed using the EconomicImpact class. For detailed information on each metric, please refer to the respective documentation pages.

-
-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/index.html b/Poverty/index.html deleted file mode 100644 index b6db6ca..0000000 --- a/Poverty/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - Poverty impact - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Poverty impact

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/regular/byage.html b/Poverty/regular/byage.html deleted file mode 100644 index 64a625a..0000000 --- a/Poverty/regular/byage.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - - By age - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By age

-
-

Overview

-

The regular poverty by age group metrics provide insights into how a policy reform affects poverty rates for different age categories. These metrics are part of the EconomicImpact class and can be calculated for children, adults, seniors, and the overall population.

-
-
-

Available Metrics

-
    -
  1. poverty/regular/child: Calculates the poverty rate for children.

  2. -
  3. poverty/regular/adult: Calculates the poverty rate for adults.

  4. -
  5. poverty/regular/senior: Calculates the poverty rate for seniors.

  6. -
  7. poverty/regular/all: Calculates the overall poverty rate.

  8. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The poverty rate before the reform.

  • -
  • reform: The poverty rate after the reform.

  • -
  • change: The percentage change in the poverty rate due to the reform.

  • -
-

All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate poverty rates by age group
-child_poverty = impact.calculate("poverty/regular/child")
-adult_poverty = impact.calculate("poverty/regular/adult")
-senior_poverty = impact.calculate("poverty/regular/senior")
-overall_poverty = impact.calculate("poverty/regular/all")
-
-# Print the results
-print(f"Child poverty: {child_poverty}")
-print(f"Adult poverty: {adult_poverty}")
-print(f"Senior poverty: {senior_poverty}")
-print(f"Overall poverty: {overall_poverty}")
-
-
-
-
-
-

Example Output

-
Child poverty: {'baseline': 0.32, 'reform': 0.36, 'change': 10.1}
-Adult poverty: {'baseline': 0.17, 'reform': 0.19, 'change': 8.4}
-Senior poverty: {'baseline': 0.13, 'reform': 0.17, 'change': 30.5}
-Overall poverty: {'baseline': 0.20, 'reform': 0.22, 'change': 11.7}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The child poverty rate increases from 32% to 36%, a 10.1% increase.

  • -
  • The adult poverty rate increases from 17% to 19%, an 8.4% increase.

  • -
  • The senior poverty rate increases from 13% to 17%, a significant 30.5% increase.

  • -
  • The overall poverty rate increases from 20% to 22%, an 11.7% increase.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/regular/bygender.html b/Poverty/regular/bygender.html deleted file mode 100644 index 0449de4..0000000 --- a/Poverty/regular/bygender.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - - - By gender - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

By gender

-
-

Overview

-

The regular poverty by gender metrics provide insights into how a policy reform affects poverty rates for different genders. These metrics are part of the EconomicImpact class and can be calculated for males, females, and the overall population.

-
-
-

Available Metrics

-
    -
  • poverty/regular/male: Calculates the poverty rate for males.

  • -
  • poverty/regular/female: Calculates the poverty rate for females.

  • -
  • poverty/regular/gender/all: Calculates the overall poverty rate.

  • -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • baseline: The poverty rate before the reform.

  • -
  • reform: The poverty rate after the reform.

  • -
  • change: The percentage change in the poverty rate due to the reform.

  • -
-

All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate poverty rates by gender
-male_poverty = impact.calculate("poverty/regular/male")
-female_poverty = impact.calculate("poverty/regular/female")
-overall_poverty = impact.calculate("poverty/regular/gender/all")
-
-# Print the results
-print(f"Male poverty: {male_poverty}")
-print(f"Female poverty: {female_poverty}")
-print(f"Overall poverty: {overall_poverty}")
-
-
-
-
-

Example output

-
Male poverty: {'baseline': 0.18, 'reform': 0.21, 'change': 12.9}
-Female poverty: {'baseline': 0.21, 'reform': 0.23, 'change': 10.7}
-Overall poverty: {'baseline': 0.20, 'reform': 0.22, 'change': 11.7}
-
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The baseline male poverty rate is 18%, which increases to 21% after the reform, representing a 12.9% increase.

  • -
  • The baseline female poverty rate is 21%, which increases to 23% after the reform, representing a 10.7% increase.

  • -
  • The overall poverty rate increases from 20% to 22%, a change of 11.7%.

  • -
-

These metrics can help policymakers understand the differential impact of a reform on poverty rates across genders.

-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Poverty/regular/index.html b/Poverty/regular/index.html deleted file mode 100644 index cef1ed2..0000000 --- a/Poverty/regular/index.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - Regular poverty - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Regular poverty

-
-

Overview

-

Regular poverty metrics measure the proportion of individuals living below the standard poverty line. These metrics provide crucial insights into the effectiveness of economic policies and their impact on different demographic groups.

-
-
-

Available Metrics

-

Our regular poverty analysis includes the following categories:

-
    -
  1. Poverty by Age Group

    -
      -
    • Child Poverty

    • -
    • Adult Poverty

    • -
    • Senior Poverty

    • -
    • Overall Poverty

    • -
    -
  2. -
  3. Poverty by Gender

    -
      -
    • Male Poverty

    • -
    • Female Poverty

    • -
    • Overall Poverty

    • -
    -
  4. -
-
-
-

Importance

-

Regular poverty metrics are essential for:

-
    -
  • Assessing the overall economic well-being of a population

  • -
  • Identifying vulnerable groups most affected by poverty

  • -
  • Evaluating the effectiveness of poverty reduction policies

  • -
  • Comparing poverty rates across different demographics

  • -
-
-
-

Usage

-

These metrics can be accessed using the EconomicImpact class. For detailed information on each metric, please refer to the respective documentation pages.

-
-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WinnersAndLosers/byincomedecile.html b/WinnersAndLosers/byincomedecile.html deleted file mode 100644 index 10d0803..0000000 --- a/WinnersAndLosers/byincomedecile.html +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - - - - by Income Decile - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

by Income Decile

-
-

Overview

-

The winners and losers by income decile metrics provide insights into how a policy reform affects income changes across different income deciles. These metrics help to understand the distribution of income gains and losses among various income groups. The analysis is categorized based on the percentage change in income and provides a breakdown for each decile.

-
-
-

Available Metrics

-
    -
  1. winners_and_losers/by_income_decile: Evaluates the income changes across income deciles and categorizes the population based on the magnitude of income gain or loss.

  2. -
-
-
-

Metric Structure

-

Each metric returns a dictionary with the following keys:

-
    -
  • result: Contains two sub-dictionaries:

    -
      -
    • deciles: Breakdown of the population within each decile into categories based on income change.

    • -
    • all: Summary statistics showing the average percentage of the population in each category across all deciles.

    • -
    -
  • -
-
-

Income Change Categories

-

The categories used for income change are:

-
    -
  • Lose more than 5%: Percentage of the population experiencing an income loss greater than 5%.

  • -
  • Lose less than 5%: Percentage of the population experiencing an income loss less than 5%.

  • -
  • No change: Percentage of the population experiencing no change in income.

  • -
  • Gain less than 5%: Percentage of the population experiencing an income gain less than 5%.

  • -
  • Gain more than 5%: Percentage of the population experiencing an income gain greater than 5%.

  • -
-
-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }}, country="uk")
-
-# Calculate income change metrics by income decile
-by_income = impact.calculate("winners_and_losers/by_income_decile")
-by_wealth = impact.calculate("winners_and_losers/by_wealth_decile")
-
-# Print the results
-print(f"By Income Decile: {by_income}")
-print(f"By Wealth Decile: {by_wealth}")
-
-
-
-
-

Output

-
-

By Income Decile

-
{
-    'result': {
-        'deciles': {
-            'Lose more than 5%': [16.8, 21.8, 28.9, 52.2, 72.4, 85.4, 91.9, 93.0, 98.0, 95.4],
-            'Lose less than 5%': [2.7, 4.8, 5.8, 9.0, 5.2, 0.3, 0.6, 0.1, 0.0, 1.4],
-            'No change': [80.5, 73.4, 65.3, 38.8, 22.4, 14.3, 7.5, 6.9, 1.9, 3.1],
-            'Gain less than 5%': [0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
-            'Gain more than 5%': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
-        },
-        'all': {
-            'Lose more than 5%': 65.6,
-            'Lose less than 5%': 3.0,
-            'No change': 31.4,
-            'Gain less than 5%': 0.0,
-            'Gain more than 5%': 0.0
-        }
-    }
-}
-
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • For income deciles, the percentage of people losing more than 5% increases from the lower deciles to the higher deciles, with a substantial concentration of losses in the top deciles. The majority of the population experiences no change in income, with very few gaining or losing within small ranges.

  • -
  • For wealth deciles, a similar pattern is observed, with a significant proportion of the population in higher deciles experiencing losses greater than 5%, while most people in lower deciles experience no change.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WinnersAndLosers/bywealthdecile.html b/WinnersAndLosers/bywealthdecile.html deleted file mode 100644 index ccd8dfd..0000000 --- a/WinnersAndLosers/bywealthdecile.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - by Wealth Decile - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

by Wealth Decile

-
-

Overview

-

The winners and losers by wealth decile metrics provide insights into how a policy reform impacts different segments of the population based on their wealth. These metrics help understand the distributional effects of policy changes across various wealth deciles.

-
-
-

Available Metrics

-
    -
  1. winners_and_losers/by_wealth_decile: Calculates the proportion of people in each wealth decile who experience a gain or loss of income due to the reform, categorized into different ranges of percentage change.

  2. -
-
-
-

Metric Structure

-

The winners_and_losers/by_wealth_decile metric returns a dictionary with the following keys:

-
    -
  • deciles: A dictionary where each key represents a wealth decile, and the value is a list showing the proportion of people in that decile who fall into different categories based on their income change:

    -
      -
    • Lose more than 5%

    • -
    • Lose less than 5%

    • -
    • No change

    • -
    • Gain less than 5%

    • -
    • Gain more than 5%

    • -
    -
  • -
  • all: A dictionary showing the overall proportion of people across all wealth deciles who fall into each income change category.

  • -
-

All proportions are expressed as percentages and rounded to 1 decimal place.

-
-
-

Example Usage

-
from policyengine import EconomicImpact
-
-# Initialize the EconomicImpact class with a reform
-impact = EconomicImpact(reform={
-  "gov.hmrc.income_tax.rates.uk[0].rate": {
-    "2024-01-01.2100-12-31": 0.55
-  }
-}, country="uk")
-
-# Calculate winners and losers by wealth decile
-by_wealth_decile = impact.calculate("winners_and_losers/by_wealth_decile")
-
-# Print the results
-print(f"By wealth decile: {by_wealth_decile}")
-
-
-
-
-

Output

-
{
-    "result": {
-        "deciles": {
-            "Lose more than 5%": [21.0, 31.4, 58.9, 64.5, 68.7, 79.3, 81.1, 82.6, 84.5, 86.4],
-            "Lose less than 5%": [6.6, 9.9, 2.3, 1.9, 3.4, 2.0, 0.4, 2.6, 0.2, 0.6],
-            "No change": [72.3, 58.6, 38.8, 33.6, 27.9, 18.7, 18.4, 14.8, 15.3, 13.0],
-            "Gain less than 5%": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
-            "Gain more than 5%": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
-        },
-        "all": {
-            "Lose more than 5%": 65.8,
-            "Lose less than 5%": 3.0,
-            "No change": 31.1,
-            "Gain less than 5%": 0.0,
-            "Gain more than 5%": 0.0
-        }
-    }
-}
-
-
-
-
-

Interpretation

-

In this example:

-
    -
  • The proportion of people in the lowest wealth decile who lose more than 5% of their income is 21.0%, while those who gain more than 5% is 0.0%.

  • -
  • The proportion of people in the highest wealth decile who lose more than 5% is 86.4%, with no gain more than 5%.

  • -
  • Overall, 65.8% of the population experiences a loss of more than 5% in income, with no significant gains.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WinnersAndLosers/index.html b/WinnersAndLosers/index.html deleted file mode 100644 index 6b217c7..0000000 --- a/WinnersAndLosers/index.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - Winners and Losers - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

Winners and Losers

-
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/_sources/Budgetary/byprogram.md b/_sources/Budgetary/byprogram.md deleted file mode 100644 index f2d3696..0000000 --- a/_sources/Budgetary/byprogram.md +++ /dev/null @@ -1,94 +0,0 @@ -# By program - -## Overview - -The Budgetary Impact by Program metrics provide detailed insights into how a policy reform affects various government revenue and expenditure programs. These metrics are part of the `EconomicImpact` class and can be calculated for different tax and benefit programs. - -## Available Metrics - -1. `budgetary/by_program/income_tax`: Income Tax revenue -2. `budgetary/by_program/national_insurance`: National Insurance contributions -3. `budgetary/by_program/vat`: Value Added Tax (VAT) revenue -4. `budgetary/by_program/council_tax`: Council Tax revenue -5. `budgetary/by_program/fuel_duty`: Fuel Duty revenue -6. `budgetary/by_program/tax_credits`: Tax Credits expenditure -7. `budgetary/by_program/universal_credits`: Universal Credit expenditure -8. `budgetary/by_program/child_benefits`: Child Benefits expenditure -9. `budgetary/by_program/state_pension`: State Pension expenditure -10. `budgetary/by_program/pension_credit`: Pension Credit expenditure - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `baseline`: The amount before the reform (in GBP). -- `reform`: The amount after the reform (in GBP). -- `change`: The percentage change due to the reform. - -All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate budgetary impact for each program -income_tax = impact.calculate("budgetary/by_program/income_tax") -national_insurance = impact.calculate("budgetary/by_program/national_insurance") -vat = impact.calculate("budgetary/by_program/vat") -council_tax = impact.calculate("budgetary/by_program/council_tax") -fuel_duty = impact.calculate("budgetary/by_program/fuel_duty") -tax_credits = impact.calculate("budgetary/by_program/tax_credits") -universal_credits = impact.calculate("budgetary/by_program/universal_credits") -child_benefits = impact.calculate("budgetary/by_program/child_benefits") -state_pension = impact.calculate("budgetary/by_program/state_pension") -pension_credit = impact.calculate("budgetary/by_program/pension_credit") - -# Print the results -print(f"Income Tax: {income_tax}") -print(f"National Insurance: {national_insurance}") -print(f"VAT: {vat}") -print(f"Council Tax: {council_tax}") -print(f"Fuel Duty: {fuel_duty}") -print(f"Tax Credits: {tax_credits}") -print(f"Universal Credit: {universal_credits}") -print(f"Child Benefits: {child_benefits}") -print(f"State Pension: {state_pension}") -print(f"Pension Credit: {pension_credit}") - -``` - -## Output - -``` -Income Tax: {'baseline': 291090070166.62, 'reform': 496242053771.2, 'change': 70.5} -National Insurance: {'baseline': 50826792606.89, 'reform': 50826792606.89, 'change': 0.0} -VAT: {'baseline': 175581776889.21, 'reform': 175581776889.21, 'change': 0.0} -Council Tax: {'baseline': 47861314826.79, 'reform': 47861314826.79, 'change': 0.0} -Fuel Duty: {'baseline': 28019829809.09, 'reform': 28019829809.09, 'change': 0.0} -Tax Credits: {'baseline': -208150256.01, 'reform': -308166663.98, 'change': 48.1} -Universal Credit: {'baseline': -72209672284.1, 'reform': -73780445681.08, 'change': 2.2} -Child Benefits: {'baseline': -15975002346.41, 'reform': -15975002346.41, 'change': -0.0} -State Pension: {'baseline': -127240166697.26, 'reform': -127240166697.26, 'change': -0.0} -Pension Credit: {'baseline': -2000983943.05, 'reform': -2181135212.4, 'change': 9.0} -``` - -## Interpretation - -In this example: - -- Income Tax revenue increases significantly by 70.5%, from £291.1 billion to £496.2 billion. -- National Insurance, VAT, Council Tax, and Fuel Duty revenues remain unchanged. -- Tax Credits expenditure increases by 48.1%, from £208.2 million to £308.2 million. -- Universal Credit expenditure increases slightly by 2.2%, from £72.2 billion to £73.8 billion. -- Child Benefits and State Pension expenditures remain unchanged. -- Pension Credit expenditure increases by 9.0%, from £2.0 billion to £2.2 billion. - -These metrics provide a comprehensive view of how the reform affects various government revenue streams and expenditure programs. They can help policymakers understand the fiscal implications of proposed reforms across different sectors of the budget. -Note: Negative values for benefits (e.g., Tax Credits, Universal Credit) indicate government expenditure. \ No newline at end of file diff --git a/_sources/Budgetary/index.md b/_sources/Budgetary/index.md deleted file mode 100644 index 48e8e6a..0000000 --- a/_sources/Budgetary/index.md +++ /dev/null @@ -1,24 +0,0 @@ -# Budgetary Impact - -## Overview - -The Budgetary Impact metrics provide comprehensive insights into how policy reforms affect government finances. These metrics are part of the `EconomicImpact` class and offer detailed analysis at both program-specific and overall levels. - -## Table of Contents - -1. Budgetary Impact Overall - - Overall Budgetary Impact - - Benefit Spending Impact - - Tax Revenue Impact - -2. Budgetary Impact by Program - - Income Tax - - National Insurance - - Value Added Tax (VAT) - - Council Tax - - Fuel Duty - - Tax Credits - - Universal Credit - - Child Benefits - - State Pension - - Pension Credit \ No newline at end of file diff --git a/_sources/Budgetary/overall.md b/_sources/Budgetary/overall.md deleted file mode 100644 index 9c4b00c..0000000 --- a/_sources/Budgetary/overall.md +++ /dev/null @@ -1,88 +0,0 @@ -# Overall - -## Overview - -The Budgetary Impact Overall metrics provide a high-level summary of how a policy reform affects government finances. These metrics are part of the `EconomicImpact` class and offer insights into the overall budgetary impact, changes in benefit spending, and changes in tax revenue. - -## Available Metrics - -1. `budgetary/overall/budgetary_impact`: Overall budgetary impact of the reform -2. `budgetary/overall/benefit_spending_impact`: Impact on total benefit spending -3. `budgetary/overall/tax_revenue_impact`: Impact on total tax revenue - -## Metric Structure - -Each metric returns a dictionary with specific keys: - -### Budgetary Impact -- `budgetary_impact`: The overall budgetary impact (in GBP) - -### Benefit Spending Impact -- `baseline_total_benefits`: Total benefits before the reform (in GBP) -- `reformed total benefits`: Total benefits after the reform (in GBP) -- `benefit_spending_impact`: The difference in benefit spending (in GBP) - -### Tax Revenue Impact -- `baseline total tax`: Total tax revenue before the reform (in GBP) -- `reformed total tax`: Total tax revenue after the reform (in GBP) -- `tax_revenue_impact`: The difference in tax revenue (in GBP) - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate overall budgetary impacts -budgetary_impact = impact.calculate("budgetary/overall/budgetary_impact") -benefit_spending_impact = impact.calculate("budgetary/overall/benefit_spending_impact") -tax_revenue_impact = impact.calculate("budgetary/overall/tax_revenue_impact") - -# Print the results -print(f"Budgetary Impact: {budgetary_impact}") -print(f"Benefit Spending Impact: {benefit_spending_impact}") -print(f"Tax Revenue Impact: {tax_revenue_impact}") - -``` - -## output - -``` -Budgetary Impact: {'budgetary_impact': 203274712297.14} -Benefit Spending Impact: {'baseline_total_benefits': 247160184562.67, 'reformed total benefits': 249032006583.15, 'benefit spending impact': 1871822020.49} -Tax Revenue Impact: {'baseline total tax': 447861864968.89, 'reformed total tax': 653008399286.52, 'tax revenue impact': 205146534317.63} -``` - -## Interpretation - -In this example: - -1. Overall Budgetary Impact: - -- The reform results in a positive budgetary impact of approximately £203.27 billion. This represents the net fiscal effect of the reform, combining changes in both tax revenue and benefit spending. - - -2. Benefit Spending Impact: - -- Baseline total benefits: £247.16 billion -- Reformed total benefits: £249.03 billion -- The reform increases benefit spending by £1.87 billion - - -3. Tax Revenue Impact: - -- Baseline total tax: £447.86 billion -- Reformed total tax: £653.01 billion -- The reform increases tax revenue by £205.15 billion - - - -The reform significantly increases tax revenue (by £205.15 billion) while slightly increasing benefit spending (by £1.87 billion). The net effect is a substantial positive budgetary impact of £203.27 billion. -These metrics provide a comprehensive overview of the fiscal implications of the proposed reform. They can help policymakers understand the overall financial impact on government finances, including changes in both revenue and expenditure. -Note: All monetary values are in GBP (British Pounds). \ No newline at end of file diff --git a/_sources/Distributional/ByIncomeDecile/average.md b/_sources/Distributional/ByIncomeDecile/average.md deleted file mode 100644 index 222554d..0000000 --- a/_sources/Distributional/ByIncomeDecile/average.md +++ /dev/null @@ -1,52 +0,0 @@ -# Income Distribution by Average - -## Overview - -The income distribution by average metrics provide insights into how a policy reform affects the average income across different income deciles. These metrics are part of the `EconomicImpact` class and measure the average change in household net income due to the reform. - -## Available Metrics - -1. `distributional/by_income/average`: Calculates the average change in household net income by income decile. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `average`: A dictionary where the key is the income decile, and the value is the average change in income for that decile. - -The values represent the change in income due to the policy reform, rounded to several decimal places. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - }}, country="uk") - -# Calculate average income change by income decile -average_income_change = impact.calculate("distributional/by_income/average") - -# Print the result -print(f"Average income change: {average_income_change}") -``` - -## Output - -``` -Average income change: {'average': {1: -1542.53, 2: -1982.53, 3: -4556.84, 4: -5370.20, 5: -7216.05, 6: -7591.30, 7: -9211.03, 8: -9648.62, 9: -11506.89, 10: -14378.30, 11: -13195.00}} -``` - -## Interpretation - -In this example: - -- The average income change is negative across all deciles, indicating a reduction in household net income due to the policy reform. -- The change is most significant in the higher deciles, with the highest decrease observed in the top decile (11), at -13,195.00. -- The impact is progressively less severe in lower deciles, with the smallest decrease observed in the lowest decile (1), at -1,542.53. - ---- - -Let me know if you need any further adjustments! \ No newline at end of file diff --git a/_sources/Distributional/ByIncomeDecile/index.md b/_sources/Distributional/ByIncomeDecile/index.md deleted file mode 100644 index f9eeaf8..0000000 --- a/_sources/Distributional/ByIncomeDecile/index.md +++ /dev/null @@ -1 +0,0 @@ -# By income \ No newline at end of file diff --git a/_sources/Distributional/ByIncomeDecile/relative.md b/_sources/Distributional/ByIncomeDecile/relative.md deleted file mode 100644 index 1d550b7..0000000 --- a/_sources/Distributional/ByIncomeDecile/relative.md +++ /dev/null @@ -1,49 +0,0 @@ -# Income Decile by Relative Change - -## Overview - -The income decile by relative change metrics provide insights into how a policy reform affects household net income across different income deciles in relative terms. These metrics are part of the `EconomicImpact` class and measure the relative change in income due to the reform, expressed as a percentage of the baseline income. - -## Available Metrics - -1. `distributional/by_income/relative`: Calculates the relative change in household net income by income decile. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `relative`: A dictionary where the key is the income decile, and the value is the relative change in income for that decile. The relative change is expressed as a percentage of the baseline income. - -The values are rounded to several decimal places. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - }}, country="uk") - -# Calculate relative income change by income decile -relative_income_change = impact.calculate("distributional/by_income/relative") - -# Print the result -print(f"Relative income change: {relative_income_change}") -``` - -## Output - -``` -Relative income change: {'relative': {1: -0.0704, 2: -0.0809, 3: -0.1465, 4: -0.1559, 5: -0.1784, 6: -0.1823, 7: -0.1986, 8: -0.1832, 9: -0.1960, 10: -0.1392, 11: -0.0281}} -``` - -## Interpretation - -In this example: - -- The relative income change is negative across all deciles, indicating a reduction in household net income as a percentage of the baseline. -- The highest relative decrease is observed in the 7th decile, with a reduction of approximately 19.86%. -- The smallest relative decrease is in the 11th decile, at about 2.81%. -- The relative changes vary by decile, reflecting the impact of the policy reform on different income groups. diff --git a/_sources/Distributional/ByWealthDecile/average.md b/_sources/Distributional/ByWealthDecile/average.md deleted file mode 100644 index b8d72a3..0000000 --- a/_sources/Distributional/ByWealthDecile/average.md +++ /dev/null @@ -1,48 +0,0 @@ -# Average - -## Overview - -The wealth distribution by average metrics provide insights into how a policy reform affects the average wealth across different wealth deciles. These metrics are part of the `EconomicImpact` class and measure the average change in household net wealth due to the reform. - -## Available Metrics - -1. `distributional/by_wealth/average`: Calculates the average change in household net wealth by wealth decile. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `average`: A dictionary where the key is the wealth decile, and the value is the average change in wealth for that decile. - -The values represent the change in wealth due to the policy reform, rounded to several decimal places. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - }}, country="uk") - -# Calculate average wealth change by wealth decile -average_wealth_change = impact.calculate("distributional/by_wealth/average") - -# Print the result -print(f"Average wealth change: {average_wealth_change}") -``` - -## Output - -``` -Average wealth change: {'average': {1: -1542.53, 2: -1982.53, 3: -4556.84, 4: -5370.20, 5: -7216.05, 6: -7591.30, 7: -9211.03, 8: -9648.62, 9: -11506.89, 10: -14378.30, 11: -13195.00}} -``` - -## Interpretation - -In this example: - -- The average wealth change is negative across all deciles, indicating a reduction in household net wealth due to the policy reform. -- The impact is most severe in the highest deciles, with the highest decrease observed in the top decile (11), at -13,195.00. -- The decrease in wealth is progressively less severe in lower deciles, with the smallest decrease observed in the lowest decile (1), at -1,542.53. diff --git a/_sources/Distributional/ByWealthDecile/index.md b/_sources/Distributional/ByWealthDecile/index.md deleted file mode 100644 index fef9dfb..0000000 --- a/_sources/Distributional/ByWealthDecile/index.md +++ /dev/null @@ -1 +0,0 @@ -# by wealth \ No newline at end of file diff --git a/_sources/Distributional/ByWealthDecile/relative.md b/_sources/Distributional/ByWealthDecile/relative.md deleted file mode 100644 index da554ab..0000000 --- a/_sources/Distributional/ByWealthDecile/relative.md +++ /dev/null @@ -1,48 +0,0 @@ -# Relative - -## Overview - -The wealth distribution by relative change metrics provide insights into how a policy reform affects the relative change in household net income across different wealth deciles. These metrics are part of the `EconomicImpact` class and measure the proportional change in income due to the reform. - -## Available Metrics - -1. `distributional/by_wealth/relative`: Calculates the relative change in household net income by wealth decile. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `relative`: A dictionary where the key is the wealth decile, and the value is the relative change in income for that decile. - -The relative change is calculated as the ratio of the change in income to the baseline income, providing a measure of how income changes proportionally within each decile. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - }}, country="uk") - -# Calculate relative income change by wealth decile -relative_income_change = impact.calculate("distributional/by_wealth/relative") - -# Print the result -print(f"Relative income change: {relative_income_change}") -``` - -## Output - -``` -Relative income change: {'relative': {1: -0.0704, 2: -0.0809, 3: -0.1465, 4: -0.1559, 5: -0.1784, 6: -0.1823, 7: -0.1986, 8: -0.1832, 9: -0.1960, 10: -0.1392, 11: -0.0281}} -``` - -## Interpretation - -In this example: - -- The relative income change is negative across all wealth deciles, indicating a proportional decrease in household net income due to the policy reform. -- The relative change is highest in the higher deciles, with the most significant decrease observed in the top decile (11), at -0.0281 (2.81% decrease). -- The impact is also noticeable in the lower deciles, with the smallest relative decrease observed in the lowest decile (1), at -0.0704 (7.04% decrease). diff --git a/_sources/Distributional/index.md b/_sources/Distributional/index.md deleted file mode 100644 index 38456ce..0000000 --- a/_sources/Distributional/index.md +++ /dev/null @@ -1 +0,0 @@ -# Distributional \ No newline at end of file diff --git a/_sources/EconomicImpact/index.md b/_sources/EconomicImpact/index.md deleted file mode 100644 index 9b4ec73..0000000 --- a/_sources/EconomicImpact/index.md +++ /dev/null @@ -1,53 +0,0 @@ -# EconomicImpact Class - -## Overview - -The `EconomicImpact` class is designed to evaluate the economic impact of a given reform on a specified country. It provides methods to calculate various economic metrics, such as inequality and income distribution, before and after the reform. - -## Class Initialization - -### `EconomicImpact(reform, country)` - -Initializes the `EconomicImpact` class with a specified reform and country. - -**Parameters:** -- `reform` (dict): A dictionary defining the economic reform. The structure of the dictionary should match the expected format for the `Reform` class. -- `country` (str): The country for which the reform's impact is to be evaluated. Supported values are `"uk"` and `"us"`. - -**Example:** -```python -from policyengine import EconomicImpact - -impact = EconomicImpact( - reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}}, - country="uk" -) -``` - - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class -impact = EconomicImpact( - reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}}, - country="uk" -) - -# Calculate the Gini coefficient -result_gini = impact.calculate("inequality/gini") -print(result_gini) -# Output: {'baseline': 0.4288962129322326, 'reform': 0.42720356179075414, 'change': -0.001692651141478485} - -# Calculate the top 1% income share -result_top_1 = impact.calculate("inequality/top_1_pct_share") -print(result_top_1) -# Output: {'baseline': 0.09121853588608866, 'reform': 0.09301056461517446, 'change': 0.0017920287290857928} - -# Calculate the top 10% income share -result_top_10 = impact.calculate("inequality/top_10_pct_share") -print(result_top_10) -# Output: {'baseline': 0.3101681771998754, 'reform': 0.31214840219992496, 'change': 0.0019802250000495736} -``` \ No newline at end of file diff --git a/_sources/EconomicImpact/intro.md b/_sources/EconomicImpact/intro.md deleted file mode 100644 index 9b4ec73..0000000 --- a/_sources/EconomicImpact/intro.md +++ /dev/null @@ -1,53 +0,0 @@ -# EconomicImpact Class - -## Overview - -The `EconomicImpact` class is designed to evaluate the economic impact of a given reform on a specified country. It provides methods to calculate various economic metrics, such as inequality and income distribution, before and after the reform. - -## Class Initialization - -### `EconomicImpact(reform, country)` - -Initializes the `EconomicImpact` class with a specified reform and country. - -**Parameters:** -- `reform` (dict): A dictionary defining the economic reform. The structure of the dictionary should match the expected format for the `Reform` class. -- `country` (str): The country for which the reform's impact is to be evaluated. Supported values are `"uk"` and `"us"`. - -**Example:** -```python -from policyengine import EconomicImpact - -impact = EconomicImpact( - reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}}, - country="uk" -) -``` - - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class -impact = EconomicImpact( - reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}}, - country="uk" -) - -# Calculate the Gini coefficient -result_gini = impact.calculate("inequality/gini") -print(result_gini) -# Output: {'baseline': 0.4288962129322326, 'reform': 0.42720356179075414, 'change': -0.001692651141478485} - -# Calculate the top 1% income share -result_top_1 = impact.calculate("inequality/top_1_pct_share") -print(result_top_1) -# Output: {'baseline': 0.09121853588608866, 'reform': 0.09301056461517446, 'change': 0.0017920287290857928} - -# Calculate the top 10% income share -result_top_10 = impact.calculate("inequality/top_10_pct_share") -print(result_top_10) -# Output: {'baseline': 0.3101681771998754, 'reform': 0.31214840219992496, 'change': 0.0019802250000495736} -``` \ No newline at end of file diff --git a/_sources/Inequality/index.md b/_sources/Inequality/index.md deleted file mode 100644 index efa73c0..0000000 --- a/_sources/Inequality/index.md +++ /dev/null @@ -1 +0,0 @@ -# Inequality \ No newline at end of file diff --git a/_sources/Inequality/inequality.md b/_sources/Inequality/inequality.md deleted file mode 100644 index 76893ae..0000000 --- a/_sources/Inequality/inequality.md +++ /dev/null @@ -1,63 +0,0 @@ -# Inequality Impact - -## Overview - -The inequality impact metrics provide insights into how a policy reform affects income distribution. These metrics are part of the `EconomicImpact` class and include measures of income inequality and concentration of income among the top earners. - -## Available Metrics - -1. **`inequality/gini`**: Calculates the Gini coefficient, which measures income inequality. -2. **`inequality/top_1_pct_share`**: Calculates the income share of the top 1% of earners. -3. **`inequality/top_10_pct_share`**: Calculates the income share of the top 10% of earners. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- **`baseline`**: The metric value before the reform. -- **`reform`**: The metric value after the reform. -- **`change`**: The absolute change in the metric value due to the reform. -- **`change_percentage`**: The percentage change in the metric value due to the reform (only for Gini coefficient and top 1% share). - -All values are rounded to 2 decimal places for baseline, reform, change, and change percentage. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact( - reform={"gov.hmrc.income_tax.rates.uk[0].rate": {"2024-01-01": 0.25}}, - country="uk" -) - -# Calculate Gini coefficient impact -gini_impact = impact.calculate("inequality/gini") - -# Calculate top 1% income share impact -top_1_pct_share = impact.calculate("inequality/top_1_pct_share") - -# Calculate top 10% income share impact -top_10_pct_share = impact.calculate("inequality/top_10_pct_share") - -# Print the results -print(f"Gini coefficient impact: {gini_impact}") -print(f"Top 1% income share impact: {top_1_pct_share}") -print(f"Top 10% income share impact: {top_10_pct_share}") -``` - -## Output - -``` -Gini coefficient impact: {'baseline': 0.43, 'reform': 0.43, 'change': -0.00, 'change_percentage': -0.39} -Top 1% income share impact: {'baseline': 0.09, 'reform': 0.09, 'change': 0.00, 'change_percentage': 1.96} -Top 10% income share impact: {'baseline': 0.31, 'reform': 0.31, 'change': 0.00, 'change_percentage': 0.64} -``` - -## Interpretation - -In this example: - -- The Gini coefficient decreases slightly from 0.43 to 0.43, indicating a small reduction in income inequality. -- The income share of the top 1% increases from 9.12% to 9.30%, reflecting a slight rise in concentration among the highest earners. -- The income share of the top 10% increases from 31.02% to 31.21%, showing a minor rise in the share of income held by the top 10% of earners. diff --git a/_sources/Poverty/deep/byage.md b/_sources/Poverty/deep/byage.md deleted file mode 100644 index 117c250..0000000 --- a/_sources/Poverty/deep/byage.md +++ /dev/null @@ -1,66 +0,0 @@ -# By age - -## Overview - -The deep poverty by age group metrics provide insights into how a policy reform affects deep poverty rates for different age categories. These metrics are part of the `EconomicImpact` class and can be calculated for children, adults, seniors, and the overall population. - -## Available Metrics - -1. `poverty/deep/child`: Calculates the deep poverty rate for children. -2. `poverty/deep/adult`: Calculates the deep poverty rate for adults. -3. `poverty/deep/senior`: Calculates the deep poverty rate for seniors. -4. `poverty/deep/age/all`: Calculates the overall deep poverty rate. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `baseline`: The deep poverty rate before the reform. -- `reform`: The deep poverty rate after the reform. -- `change`: The percentage change in the deep poverty rate due to the reform. - -All values are rounded to 1 decimal place for the baseline, reform, and change. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate deep poverty rates by age group -child_deep_poverty = impact.calculate("poverty/deep/child") -adult_deep_poverty = impact.calculate("poverty/deep/adult") -senior_deep_poverty = impact.calculate("poverty/deep/senior") -overall_deep_poverty = impact.calculate("poverty/deep/age/all") - -# Print the results -print(f"Child deep poverty: {child_deep_poverty}") -print(f"Adult deep poverty: {adult_deep_poverty}") -print(f"Senior deep poverty: {senior_deep_poverty}") -print(f"Overall deep poverty: {overall_deep_poverty}") - -``` - -## output - -``` -Child deep poverty: {'baseline': 2.4, 'reform': 2.5, 'change': 0.7} -Adult deep poverty: {'baseline': 2.6, 'reform': 2.7, 'change': 3.9} -Senior deep poverty: {'baseline': 1.8, 'reform': 1.8, 'change': 0.5} -Overall deep poverty: {'baseline': 2.4, 'reform': 2.5, 'change': 2.7} - -``` - -## Interpretation - -In this example: - -- The child deep poverty rate increases slightly from 2.4% to 2.5%, a 0.7% increase. -- The adult deep poverty rate increases from 2.6% to 2.7%, a 3.9% increase. -- The senior deep poverty rate remains stable at 1.8%, with a minimal 0.5% increase. -- The overall deep poverty rate increases from 2.4% to 2.5%, a 2.7% increase. \ No newline at end of file diff --git a/_sources/Poverty/deep/bygender.md b/_sources/Poverty/deep/bygender.md deleted file mode 100644 index b0fea98..0000000 --- a/_sources/Poverty/deep/bygender.md +++ /dev/null @@ -1,61 +0,0 @@ -# By gender - -## Overview - -The deep poverty by gender metrics provide insights into how a policy reform affects deep poverty rates for different genders. These metrics are part of the `EconomicImpact` class and can be calculated for males, females, and the overall population. - -## Available Metrics - -1. `poverty/deep/male`: Calculates the deep poverty rate for males. -2. `poverty/deep/female`: Calculates the deep poverty rate for females. -3. `poverty/deep/gender/all`: Calculates the overall deep poverty rate. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `baseline`: The deep poverty rate before the reform. -- `reform`: The deep poverty rate after the reform. -- `change`: The percentage change in the deep poverty rate due to the reform. - -All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate deep poverty rates by gender -male_deep_poverty = impact.calculate("poverty/deep/male") -female_deep_poverty = impact.calculate("poverty/deep/female") -overall_deep_poverty = impact.calculate("poverty/deep/gender/all") - -# Print the results -print(f"Male deep poverty: {male_deep_poverty}") -print(f"Female deep poverty: {female_deep_poverty}") -print(f"Overall deep poverty: {overall_deep_poverty}") - -``` - -## output - -``` -Male deep poverty: {'baseline': 2.66, 'reform': 2.73, 'change': 2.5} -Female deep poverty: {'baseline': 2.16, 'reform': 2.23, 'change': 2.9} -Overall deep poverty: {'baseline': 2.41, 'reform': 2.47, 'change': 2.7} - -``` - -## Interpretation - -In this example: - -- The baseline male deep poverty rate is 2.66%, which increases to 2.73% after the reform, representing a 2.5% increase. -- The baseline female deep poverty rate is 2.16%, which increases to 2.23% after the reform, representing a 2.9% increase. -- The overall deep poverty rate increases from 2.41% to 2.47%, a change of 2.7%. \ No newline at end of file diff --git a/_sources/Poverty/deep/index.md b/_sources/Poverty/deep/index.md deleted file mode 100644 index 18d7819..0000000 --- a/_sources/Poverty/deep/index.md +++ /dev/null @@ -1,32 +0,0 @@ -# Deep poverty - -## Overview - -Deep poverty metrics focus on measuring severe economic hardship, typically defined as living below 50% of the poverty line. These metrics provide critical information about the most economically vulnerable segments of the population. - -## Available Metrics - -Our deep poverty analysis includes the following categories: - -1. **Deep Poverty by Age Group** - - Child Deep Poverty - - Adult Deep Poverty - - Senior Deep Poverty - - Overall Deep Poverty - -2. **Deep Poverty by Gender** - - Male Deep Poverty - - Female Deep Poverty - - Overall Deep Poverty - -## Significance - -Deep poverty metrics are crucial for: -- Identifying the most economically vulnerable populations -- Assessing the severity of poverty beyond standard poverty measures -- Evaluating the impact of policies on extreme poverty -- Guiding targeted interventions for those in severe economic distress - -## Usage - -These metrics can be accessed using the `EconomicImpact` class. For detailed information on each metric, please refer to the respective documentation pages. \ No newline at end of file diff --git a/_sources/Poverty/index.md b/_sources/Poverty/index.md deleted file mode 100644 index d856af4..0000000 --- a/_sources/Poverty/index.md +++ /dev/null @@ -1 +0,0 @@ -# Poverty impact \ No newline at end of file diff --git a/_sources/Poverty/regular/byage.md b/_sources/Poverty/regular/byage.md deleted file mode 100644 index 5c6d2e9..0000000 --- a/_sources/Poverty/regular/byage.md +++ /dev/null @@ -1,63 +0,0 @@ -# By age - -## Overview - -The regular poverty by age group metrics provide insights into how a policy reform affects poverty rates for different age categories. These metrics are part of the `EconomicImpact` class and can be calculated for children, adults, seniors, and the overall population. - -## Available Metrics - -1. `poverty/regular/child`: Calculates the poverty rate for children. -2. `poverty/regular/adult`: Calculates the poverty rate for adults. -3. `poverty/regular/senior`: Calculates the poverty rate for seniors. -4. `poverty/regular/all`: Calculates the overall poverty rate. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `baseline`: The poverty rate before the reform. -- `reform`: The poverty rate after the reform. -- `change`: The percentage change in the poverty rate due to the reform. - -All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate poverty rates by age group -child_poverty = impact.calculate("poverty/regular/child") -adult_poverty = impact.calculate("poverty/regular/adult") -senior_poverty = impact.calculate("poverty/regular/senior") -overall_poverty = impact.calculate("poverty/regular/all") - -# Print the results -print(f"Child poverty: {child_poverty}") -print(f"Adult poverty: {adult_poverty}") -print(f"Senior poverty: {senior_poverty}") -print(f"Overall poverty: {overall_poverty}") - -``` -## Example Output - -``` -Child poverty: {'baseline': 0.32, 'reform': 0.36, 'change': 10.1} -Adult poverty: {'baseline': 0.17, 'reform': 0.19, 'change': 8.4} -Senior poverty: {'baseline': 0.13, 'reform': 0.17, 'change': 30.5} -Overall poverty: {'baseline': 0.20, 'reform': 0.22, 'change': 11.7} -``` -## Interpretation - -In this example: - -- The child poverty rate increases from 32% to 36%, a 10.1% increase. -- The adult poverty rate increases from 17% to 19%, an 8.4% increase. -- The senior poverty rate increases from 13% to 17%, a significant 30.5% increase. -- The overall poverty rate increases from 20% to 22%, an 11.7% increase. \ No newline at end of file diff --git a/_sources/Poverty/regular/bygender.md b/_sources/Poverty/regular/bygender.md deleted file mode 100644 index fece79f..0000000 --- a/_sources/Poverty/regular/bygender.md +++ /dev/null @@ -1,58 +0,0 @@ -# By gender - -## Overview -The regular poverty by gender metrics provide insights into how a policy reform affects poverty rates for different genders. These metrics are part of the EconomicImpact class and can be calculated for males, females, and the overall population. - -## Available Metrics -- `poverty/regular/male`: Calculates the poverty rate for males. -- `poverty/regular/female`: Calculates the poverty rate for females. -- `poverty/regular/gender/all`: Calculates the overall poverty rate. - -## Metric Structure -Each metric returns a dictionary with the following keys: -- `baseline`: The poverty rate before the reform. -- `reform`: The poverty rate after the reform. -- `change`: The percentage change in the poverty rate due to the reform. - -All values are rounded to 2 decimal places for the baseline and reform, and to 1 decimal place for the change. - -## Example Usage -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate poverty rates by gender -male_poverty = impact.calculate("poverty/regular/male") -female_poverty = impact.calculate("poverty/regular/female") -overall_poverty = impact.calculate("poverty/regular/gender/all") - -# Print the results -print(f"Male poverty: {male_poverty}") -print(f"Female poverty: {female_poverty}") -print(f"Overall poverty: {overall_poverty}") -``` - -## Example output - -``` -Male poverty: {'baseline': 0.18, 'reform': 0.21, 'change': 12.9} -Female poverty: {'baseline': 0.21, 'reform': 0.23, 'change': 10.7} -Overall poverty: {'baseline': 0.20, 'reform': 0.22, 'change': 11.7} - -``` - -## Interpretation - -In this example: - -- The baseline male poverty rate is 18%, which increases to 21% after the reform, representing a 12.9% increase. -- The baseline female poverty rate is 21%, which increases to 23% after the reform, representing a 10.7% increase. -- The overall poverty rate increases from 20% to 22%, a change of 11.7%. - -These metrics can help policymakers understand the differential impact of a reform on poverty rates across genders. \ No newline at end of file diff --git a/_sources/Poverty/regular/index.md b/_sources/Poverty/regular/index.md deleted file mode 100644 index d502590..0000000 --- a/_sources/Poverty/regular/index.md +++ /dev/null @@ -1,32 +0,0 @@ -# Regular poverty - -## Overview - -Regular poverty metrics measure the proportion of individuals living below the standard poverty line. These metrics provide crucial insights into the effectiveness of economic policies and their impact on different demographic groups. - -## Available Metrics - -Our regular poverty analysis includes the following categories: - -1. **Poverty by Age Group** - - Child Poverty - - Adult Poverty - - Senior Poverty - - Overall Poverty - -2. **Poverty by Gender** - - Male Poverty - - Female Poverty - - Overall Poverty - -## Importance - -Regular poverty metrics are essential for: -- Assessing the overall economic well-being of a population -- Identifying vulnerable groups most affected by poverty -- Evaluating the effectiveness of poverty reduction policies -- Comparing poverty rates across different demographics - -## Usage - -These metrics can be accessed using the `EconomicImpact` class. For detailed information on each metric, please refer to the respective documentation pages. \ No newline at end of file diff --git a/_sources/WinnersAndLosers/byincomedecile.md b/_sources/WinnersAndLosers/byincomedecile.md deleted file mode 100644 index c2bc19e..0000000 --- a/_sources/WinnersAndLosers/byincomedecile.md +++ /dev/null @@ -1,78 +0,0 @@ -# by Income Decile - -## Overview - -The winners and losers by income decile metrics provide insights into how a policy reform affects income changes across different income deciles. These metrics help to understand the distribution of income gains and losses among various income groups. The analysis is categorized based on the percentage change in income and provides a breakdown for each decile. - -## Available Metrics - -1. `winners_and_losers/by_income_decile`: Evaluates the income changes across income deciles and categorizes the population based on the magnitude of income gain or loss. - -## Metric Structure - -Each metric returns a dictionary with the following keys: -- `result`: Contains two sub-dictionaries: - - `deciles`: Breakdown of the population within each decile into categories based on income change. - - `all`: Summary statistics showing the average percentage of the population in each category across all deciles. - -### Income Change Categories - -The categories used for income change are: -- **Lose more than 5%**: Percentage of the population experiencing an income loss greater than 5%. -- **Lose less than 5%**: Percentage of the population experiencing an income loss less than 5%. -- **No change**: Percentage of the population experiencing no change in income. -- **Gain less than 5%**: Percentage of the population experiencing an income gain less than 5%. -- **Gain more than 5%**: Percentage of the population experiencing an income gain greater than 5%. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - }}, country="uk") - -# Calculate income change metrics by income decile -by_income = impact.calculate("winners_and_losers/by_income_decile") -by_wealth = impact.calculate("winners_and_losers/by_wealth_decile") - -# Print the results -print(f"By Income Decile: {by_income}") -print(f"By Wealth Decile: {by_wealth}") -``` - -## Output - -### By Income Decile - -```python -{ - 'result': { - 'deciles': { - 'Lose more than 5%': [16.8, 21.8, 28.9, 52.2, 72.4, 85.4, 91.9, 93.0, 98.0, 95.4], - 'Lose less than 5%': [2.7, 4.8, 5.8, 9.0, 5.2, 0.3, 0.6, 0.1, 0.0, 1.4], - 'No change': [80.5, 73.4, 65.3, 38.8, 22.4, 14.3, 7.5, 6.9, 1.9, 3.1], - 'Gain less than 5%': [0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], - 'Gain more than 5%': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - }, - 'all': { - 'Lose more than 5%': 65.6, - 'Lose less than 5%': 3.0, - 'No change': 31.4, - 'Gain less than 5%': 0.0, - 'Gain more than 5%': 0.0 - } - } -} -``` - -## Interpretation - -In this example: - -- For income deciles, the percentage of people losing more than 5% increases from the lower deciles to the higher deciles, with a substantial concentration of losses in the top deciles. The majority of the population experiences no change in income, with very few gaining or losing within small ranges. -- For wealth deciles, a similar pattern is observed, with a significant proportion of the population in higher deciles experiencing losses greater than 5%, while most people in lower deciles experience no change. - diff --git a/_sources/WinnersAndLosers/bywealthdecile.md b/_sources/WinnersAndLosers/bywealthdecile.md deleted file mode 100644 index 95e6827..0000000 --- a/_sources/WinnersAndLosers/bywealthdecile.md +++ /dev/null @@ -1,74 +0,0 @@ -# by Wealth Decile - -## Overview - -The winners and losers by wealth decile metrics provide insights into how a policy reform impacts different segments of the population based on their wealth. These metrics help understand the distributional effects of policy changes across various wealth deciles. - -## Available Metrics - -1. `winners_and_losers/by_wealth_decile`: Calculates the proportion of people in each wealth decile who experience a gain or loss of income due to the reform, categorized into different ranges of percentage change. - -## Metric Structure - -The `winners_and_losers/by_wealth_decile` metric returns a dictionary with the following keys: - -- `deciles`: A dictionary where each key represents a wealth decile, and the value is a list showing the proportion of people in that decile who fall into different categories based on their income change: - - `Lose more than 5%` - - `Lose less than 5%` - - `No change` - - `Gain less than 5%` - - `Gain more than 5%` - -- `all`: A dictionary showing the overall proportion of people across all wealth deciles who fall into each income change category. - -All proportions are expressed as percentages and rounded to 1 decimal place. - -## Example Usage - -```python -from policyengine import EconomicImpact - -# Initialize the EconomicImpact class with a reform -impact = EconomicImpact(reform={ - "gov.hmrc.income_tax.rates.uk[0].rate": { - "2024-01-01.2100-12-31": 0.55 - } -}, country="uk") - -# Calculate winners and losers by wealth decile -by_wealth_decile = impact.calculate("winners_and_losers/by_wealth_decile") - -# Print the results -print(f"By wealth decile: {by_wealth_decile}") -``` - -## Output - -```python -{ - "result": { - "deciles": { - "Lose more than 5%": [21.0, 31.4, 58.9, 64.5, 68.7, 79.3, 81.1, 82.6, 84.5, 86.4], - "Lose less than 5%": [6.6, 9.9, 2.3, 1.9, 3.4, 2.0, 0.4, 2.6, 0.2, 0.6], - "No change": [72.3, 58.6, 38.8, 33.6, 27.9, 18.7, 18.4, 14.8, 15.3, 13.0], - "Gain less than 5%": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], - "Gain more than 5%": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - }, - "all": { - "Lose more than 5%": 65.8, - "Lose less than 5%": 3.0, - "No change": 31.1, - "Gain less than 5%": 0.0, - "Gain more than 5%": 0.0 - } - } -} -``` - -## Interpretation - -In this example: - -- The proportion of people in the lowest wealth decile who lose more than 5% of their income is 21.0%, while those who gain more than 5% is 0.0%. -- The proportion of people in the highest wealth decile who lose more than 5% is 86.4%, with no gain more than 5%. -- Overall, 65.8% of the population experiences a loss of more than 5% in income, with no significant gains. diff --git a/_sources/WinnersAndLosers/index.md b/_sources/WinnersAndLosers/index.md deleted file mode 100644 index 9840ddf..0000000 --- a/_sources/WinnersAndLosers/index.md +++ /dev/null @@ -1 +0,0 @@ -# Winners and Losers \ No newline at end of file diff --git a/_sources/contributing/index.md b/_sources/contributing/index.md deleted file mode 100644 index 700a0f7..0000000 --- a/_sources/contributing/index.md +++ /dev/null @@ -1,31 +0,0 @@ -# How to contribute - -Any and all contributions are welcome to this project. You can help by: - -* Filing issues. Tell us about bugs you've found, or features you'd like to see. -* Fixing issues. File a pull request to fix an issue you or someone else has filed. - -If you file an issue or a pull request, one of the maintainers (primarily [@nikhilwoodruff](https://github.com/nikhilwoodruff)) will respond to it within at least a week. If you don't hear back, feel free to ping us on the issue or pull request. - -## Changelog Entries - -Before you send out a pull request, make sure to add a description of your changes to [changelog_entry.yaml](../../changelog_entry.yaml). -For example, -```yaml -- bump: patch - changes: - fixed: - - Fixed a bug causing Windows tests to fail. -``` -You can find more examples in [changelog.yaml](../../changelog.yaml). Note that you do not need to add the date field. -That field is automatically populated by `make changelog`. Also, note that **you should not run `make changelog` -yourself**, as [our GitHub workflows](../../.github/workflows) will do this for you as part of the build process. - -## Pull requests - -Each pull request should: -* Close an issue. If there isn't an issue that the pull request completely addresses, please file one. -* Have a description that makes sense to a layperson. If you're fixing a bug, describe what the bug is and how you fixed it. If you're adding a feature, describe what the feature is and why you added it. -* Have tests. If you're fixing a bug, write a test that fails without your fix and passes with it. If you're adding a feature, write tests that cover the feature. Sometimes this isn't necessary (for example, documentation changes), but if in doubt, err on the side of including tests. -* Pass all GitHub actions. If you're not sure why a GitHub action is failing, feel free to ask for help in the issue or pull request. - diff --git a/_sources/contributing/intro.md b/_sources/contributing/intro.md deleted file mode 100644 index 700a0f7..0000000 --- a/_sources/contributing/intro.md +++ /dev/null @@ -1,31 +0,0 @@ -# How to contribute - -Any and all contributions are welcome to this project. You can help by: - -* Filing issues. Tell us about bugs you've found, or features you'd like to see. -* Fixing issues. File a pull request to fix an issue you or someone else has filed. - -If you file an issue or a pull request, one of the maintainers (primarily [@nikhilwoodruff](https://github.com/nikhilwoodruff)) will respond to it within at least a week. If you don't hear back, feel free to ping us on the issue or pull request. - -## Changelog Entries - -Before you send out a pull request, make sure to add a description of your changes to [changelog_entry.yaml](../../changelog_entry.yaml). -For example, -```yaml -- bump: patch - changes: - fixed: - - Fixed a bug causing Windows tests to fail. -``` -You can find more examples in [changelog.yaml](../../changelog.yaml). Note that you do not need to add the date field. -That field is automatically populated by `make changelog`. Also, note that **you should not run `make changelog` -yourself**, as [our GitHub workflows](../../.github/workflows) will do this for you as part of the build process. - -## Pull requests - -Each pull request should: -* Close an issue. If there isn't an issue that the pull request completely addresses, please file one. -* Have a description that makes sense to a layperson. If you're fixing a bug, describe what the bug is and how you fixed it. If you're adding a feature, describe what the feature is and why you added it. -* Have tests. If you're fixing a bug, write a test that fails without your fix and passes with it. If you're adding a feature, write tests that cover the feature. Sometimes this isn't necessary (for example, documentation changes), but if in doubt, err on the side of including tests. -* Pass all GitHub actions. If you're not sure why a GitHub action is failing, feel free to ask for help in the issue or pull request. - diff --git a/_sources/index.ipynb b/_sources/index.ipynb new file mode 100644 index 0000000..17868cd --- /dev/null +++ b/_sources/index.ipynb @@ -0,0 +1,120 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Introduction\n", + "\n", + "The PolicyEngine Python package serves as a package unifying all PolicyEngine tax-benefit models and outputs, providing the highest-level interface outside of the web app. It's aimed to provide a clear, simple interface to specify model inputs and pull out model outputs, both at the household and macro level.\n", + "\n", + "Generally, PolicyEngine's models' usage falls into a 2x2 of categories:\n", + "\n", + "1. Simulating over a specific household\n", + " a. Simulating a particular policy (scenario) over a household (e.g. what benefits am I entitled to now?)\n", + " b. Comparing two policies over a household (how would this tax reform affect my net income?)\n", + "2. Simulating over the entire population\n", + " a. Simulating a particular policy over the population (what's the poverty rate right now?)\n", + " b. Comparing two policies over the population (how would this tax reform affect the poverty rate?)\n", + "\n", + "Here's an example of how to use it to calculate how abolishing the Personal Allowance in the UK (US- standard deduction) would affect an earner on £30,000." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-2514.0" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from policyengine import Simulation\n", + "\n", + "sim = Simulation(\n", + " country=\"uk\",\n", + " scope=\"household\",\n", + " data={\n", + " \"employment_income\": {\n", + " 2025: 30_000\n", + " },\n", + " },\n", + " time_period=2025,\n", + " reform={\n", + " \"gov.hmrc.income_tax.allowances.personal_allowance.amount\": {\n", + " \"2025\": 0,\n", + " }\n", + " }\n", + ")\n", + "sim.calculate(\"household/comparison/net_income_change\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And here's an example of how to calculate how the same policy would affect the UK government's tax revenue." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "137.95680800660614" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sim = Simulation(\n", + " country=\"uk\",\n", + " scope=\"macro\",\n", + " data=\"enhanced_frs_2022_23\",\n", + " time_period=2025,\n", + " reform={\n", + " \"gov.hmrc.income_tax.allowances.personal_allowance.amount\": {\n", + " \"2025\": 0,\n", + " }\n", + " }\n", + ")\n", + "sim.calculate(\"macro/comparison/revenue_impact\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/_sources/index.md b/_sources/index.md deleted file mode 100644 index f90db42..0000000 --- a/_sources/index.md +++ /dev/null @@ -1,12 +0,0 @@ -# Introduction - -The PolicyEngine Python package serves as a unified framework for conducting comprehensive policy simulations and analyses across different countries. Building on the foundation of [OpenFisca-Core](https://github.com/openfisca/openfisca-core), PolicyEngine provides a consistent API that supports diverse functionalities such as microsimulations, individual household analyses, and cross-country comparisons. - -PolicyEngine Core enables users to: - -* Simulate and analyze various tax-benefit policies with tailored models for each country. -* Use two main simulation classes—Microsimulation for broad-scale microdata simulations and IndividualSim for detailed single household calculations. -* Generate interactive and visually appealing charts using Plotly, facilitating budgetary breakdowns, income decile analyses, poverty breakdowns by demographic groups, and impacts on income inequality. -* Reproduce visualizations from the PolicyEngine web interface programmatically, allowing for in-depth analysis and customization. - -The package aims to streamline policy evaluation by offering a user-friendly API, comprehensive documentation, and tools for generating insightful visual representations of simulation results. \ No newline at end of file diff --git a/_sources/intro.md b/_sources/intro.md deleted file mode 100644 index f90db42..0000000 --- a/_sources/intro.md +++ /dev/null @@ -1,12 +0,0 @@ -# Introduction - -The PolicyEngine Python package serves as a unified framework for conducting comprehensive policy simulations and analyses across different countries. Building on the foundation of [OpenFisca-Core](https://github.com/openfisca/openfisca-core), PolicyEngine provides a consistent API that supports diverse functionalities such as microsimulations, individual household analyses, and cross-country comparisons. - -PolicyEngine Core enables users to: - -* Simulate and analyze various tax-benefit policies with tailored models for each country. -* Use two main simulation classes—Microsimulation for broad-scale microdata simulations and IndividualSim for detailed single household calculations. -* Generate interactive and visually appealing charts using Plotly, facilitating budgetary breakdowns, income decile analyses, poverty breakdowns by demographic groups, and impacts on income inequality. -* Reproduce visualizations from the PolicyEngine web interface programmatically, allowing for in-depth analysis and customization. - -The package aims to streamline policy evaluation by offering a user-friendly API, comprehensive documentation, and tools for generating insightful visual representations of simulation results. \ No newline at end of file diff --git a/_sources/maintaining.ipynb b/_sources/maintaining.ipynb new file mode 100644 index 0000000..bb1cfc2 --- /dev/null +++ b/_sources/maintaining.ipynb @@ -0,0 +1,94 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Maintainance\n", + "\n", + "This package is intended to be simple for users to use, but also for maintainers to maintain (with some kind of maintenance specifically prioritised).\n", + "\n", + "There are two ways we might want to improve this package:\n", + "\n", + "1. Adding more 'outputs' (e.g. more types of results from the simulation inputs, using the underlying tax-benefit models).\n", + "2. Everything else related to the underlying way that the package uses the models.\n", + "\n", + "This package is meant to make (1) as easy as possible, which may come at the expense of some ease of maintaining (2).\n", + "\n", + "## Model outputs\n", + "\n", + "The package is centered around an 'output tree': a hierarchical nested dictionary of outputs from the model, of the type that the user asked for. For example, if we are doing a macro analysis, we might expect something like:\n", + "\n", + "```yaml\n", + "macro:\n", + " baseline:\n", + " tax_revenue: 100 billion\n", + " reform:\n", + " tax_revenue: 200 billion\n", + " comparison:\n", + " tax_revenue_impact: 100 billion\n", + "```\n", + "\n", + "If you look at the file structure of the repo, you'll see a folder `policyengine/outputs/`. This is where all the behaviour to deal with the models is housed. It's designed so that maintainers should be able to add something new, e.g. `macro/comparison/deep_poverty_impact` or `macro/single/deep_poverty_rate`, without needing to know how the rest of the repo works. Each file here is dynamically loaded into the tree (notice how `macro/comparison/tax_revenue_impact.py` aligns with that example- not a coincidence!), and must contain a single function, with the same name as the filename, that takes `policyengine.Simulation` as an argument. `policyengine.Simulation` has all the tax-benefit models initialised that the function might need, as well as all the metadata the user has passing in about their modelling request.\n", + "\n", + "There's a slight caveat here that not everything aligns exactly with this folder structure. At the top level, we have household and macro, but one layer down, we have 'single' (e.g. 'poverty rate') and 'comparison' (e.g. 'change in poverty rate'). At runtime, 'single' is duplicated into 'baseline' and 'reform' with the operations duplicated. For example, here's the output tree under that example from the introduction." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'comparison': {'revenue_impact': 137.95680800660614},\n", + " 'baseline': {'tax_revenue': 649.7843458774124},\n", + " 'reform': {'tax_revenue': 787.7411538840186}}" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from policyengine import Simulation\n", + "\n", + "sim = Simulation(\n", + " country=\"uk\",\n", + " scope=\"macro\",\n", + " data=\"enhanced_frs_2022_23\",\n", + " time_period=2025,\n", + " reform={\n", + " \"gov.hmrc.income_tax.allowances.personal_allowance.amount\": {\n", + " \"2025\": 0,\n", + " }\n", + " }\n", + ")\n", + "sim.calculate(\"macro\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/contributing/index.html b/contributing/index.html deleted file mode 100644 index 6976751..0000000 --- a/contributing/index.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - - - How to contribute - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

How to contribute

-

Any and all contributions are welcome to this project. You can help by:

-
    -
  • Filing issues. Tell us about bugs you’ve found, or features you’d like to see.

  • -
  • Fixing issues. File a pull request to fix an issue you or someone else has filed.

  • -
-

If you file an issue or a pull request, one of the maintainers (primarily @nikhilwoodruff) will respond to it within at least a week. If you don’t hear back, feel free to ping us on the issue or pull request.

-
-

Changelog Entries

-

Before you send out a pull request, make sure to add a description of your changes to changelog_entry.yaml. -For example,

-
- bump: patch
-  changes:
-    fixed:
-    - Fixed a bug causing Windows tests to fail.
-
-
-

You can find more examples in changelog.yaml. Note that you do not need to add the date field. -That field is automatically populated by make changelog. Also, note that you should not run make changelog -yourself, as our GitHub workflows will do this for you as part of the build process.

-
-
-

Pull requests

-

Each pull request should:

-
    -
  • Close an issue. If there isn’t an issue that the pull request completely addresses, please file one.

  • -
  • Have a description that makes sense to a layperson. If you’re fixing a bug, describe what the bug is and how you fixed it. If you’re adding a feature, describe what the feature is and why you added it.

  • -
  • Have tests. If you’re fixing a bug, write a test that fails without your fix and passes with it. If you’re adding a feature, write tests that cover the feature. Sometimes this isn’t necessary (for example, documentation changes), but if in doubt, err on the side of including tests.

  • -
  • Pass all GitHub actions. If you’re not sure why a GitHub action is failing, feel free to ask for help in the issue or pull request.

  • -
-
-
- - - -
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/contributing/intro.html b/contributing/intro.html deleted file mode 100644 index 7b676c0..0000000 --- a/contributing/intro.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - - - - How to contribute - PolicyEngine - - - - - - - - - - - - - - - - - - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark, in light mode - - - - - - - - - - - - - - - Auto light/dark, in dark mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Skip to content - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

How to contribute

-

Any and all contributions are welcome to this project. You can help by:

-
    -
  • Filing issues. Tell us about bugs you’ve found, or features you’d like to see.

  • -
  • Fixing issues. File a pull request to fix an issue you or someone else has filed.

  • -
-

If you file an issue or a pull request, one of the maintainers (primarily @nikhilwoodruff) will respond to it within at least a week. If you don’t hear back, feel free to ping us on the issue or pull request.

-
-

Changelog Entries

-

Before you send out a pull request, make sure to add a description of your changes to changelog_entry.yaml. -For example,

-
- bump: patch
-  changes:
-    fixed:
-    - Fixed a bug causing Windows tests to fail.
-
-
-

You can find more examples in changelog.yaml. Note that you do not need to add the date field. -That field is automatically populated by make changelog. Also, note that you should not run make changelog -yourself, as our GitHub workflows will do this for you as part of the build process.

-
-
-

Pull requests

-

Each pull request should:

-
    -
  • Close an issue. If there isn’t an issue that the pull request completely addresses, please file one.

  • -
  • Have a description that makes sense to a layperson. If you’re fixing a bug, describe what the bug is and how you fixed it. If you’re adding a feature, describe what the feature is and why you added it.

  • -
  • Have tests. If you’re fixing a bug, write a test that fails without your fix and passes with it. If you’re adding a feature, write tests that cover the feature. Sometimes this isn’t necessary (for example, documentation changes), but if in doubt, err on the side of including tests.

  • -
  • Pass all GitHub actions. If you’re not sure why a GitHub action is failing, feel free to ask for help in the issue or pull request.

  • -
-
-
- - - -
-
-
- - -
-
- - Made with Sphinx and @pradyunsg's - - Furo - -
-
- -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/genindex.html b/genindex.html index 3a4220a..0540fd2 100644 --- a/genindex.html +++ b/genindex.html @@ -205,53 +205,9 @@