diff --git a/docs/Budgetary/byprogram.md b/docs/Budgetary/byprogram.md new file mode 100644 index 0000000..f2d3696 --- /dev/null +++ b/docs/Budgetary/byprogram.md @@ -0,0 +1,94 @@ +# 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/docs/Budgetary/index.md b/docs/Budgetary/index.md new file mode 100644 index 0000000..48e8e6a --- /dev/null +++ b/docs/Budgetary/index.md @@ -0,0 +1,24 @@ +# 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/docs/Budgetary/overall.md b/docs/Budgetary/overall.md new file mode 100644 index 0000000..9c4b00c --- /dev/null +++ b/docs/Budgetary/overall.md @@ -0,0 +1,88 @@ +# 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/docs/EconomicImpact/index.md b/docs/EconomicImpact/index.md new file mode 100644 index 0000000..9b4ec73 --- /dev/null +++ b/docs/EconomicImpact/index.md @@ -0,0 +1,53 @@ +# 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/docs/Poverty/deep/byage.md b/docs/Poverty/deep/byage.md new file mode 100644 index 0000000..117c250 --- /dev/null +++ b/docs/Poverty/deep/byage.md @@ -0,0 +1,66 @@ +# 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/docs/Poverty/deep/bygender.md b/docs/Poverty/deep/bygender.md new file mode 100644 index 0000000..b0fea98 --- /dev/null +++ b/docs/Poverty/deep/bygender.md @@ -0,0 +1,61 @@ +# 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/docs/Poverty/deep/index.md b/docs/Poverty/deep/index.md new file mode 100644 index 0000000..18d7819 --- /dev/null +++ b/docs/Poverty/deep/index.md @@ -0,0 +1,32 @@ +# 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/docs/Poverty/index.md b/docs/Poverty/index.md new file mode 100644 index 0000000..d856af4 --- /dev/null +++ b/docs/Poverty/index.md @@ -0,0 +1 @@ +# Poverty impact \ No newline at end of file diff --git a/docs/Poverty/regular/byage.md b/docs/Poverty/regular/byage.md new file mode 100644 index 0000000..5c6d2e9 --- /dev/null +++ b/docs/Poverty/regular/byage.md @@ -0,0 +1,63 @@ +# 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/docs/Poverty/regular/bygender.md b/docs/Poverty/regular/bygender.md new file mode 100644 index 0000000..fece79f --- /dev/null +++ b/docs/Poverty/regular/bygender.md @@ -0,0 +1,58 @@ +# 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/docs/Poverty/regular/index.md b/docs/Poverty/regular/index.md new file mode 100644 index 0000000..d502590 --- /dev/null +++ b/docs/Poverty/regular/index.md @@ -0,0 +1,32 @@ +# 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/docs/_toc.yml b/docs/_toc.yml index ece1651..c590a63 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -1,9 +1,23 @@ format: jb-book -root: intro +root: index parts: - caption: Contributing chapters: - - file: contributing/intro + - file: contributing/index - caption: EconomicImpact chapters: - - file: EconomicImpact/intro \ No newline at end of file + - file: EconomicImpact/index + - file: Poverty/index + sections: + - file: Poverty/regular/index + sections: + - file: Poverty/regular/bygender + - file: Poverty/regular/byage + - file: Poverty/deep/index + sections: + - file: Poverty/deep/bygender + - file: Poverty/deep/byage + - file: Budgetary/index + sections: + - file: Budgetary/overall + - file: Budgetary/byprogram \ No newline at end of file diff --git a/docs/contributing/index.md b/docs/contributing/index.md new file mode 100644 index 0000000..700a0f7 --- /dev/null +++ b/docs/contributing/index.md @@ -0,0 +1,31 @@ +# 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/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f90db42 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,12 @@ +# 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