Date:
19 June 2023
Author:
Phillipa Martin

PolicyEngine

One of the benefits often cited for Rules as Code (RaC) is the ability to use RaC to inform policy changes and model changes to see how changes would affect governments and citizens. PolicyEngineExternal Link does exactly that.

PolicyEngine also has some really cool functionality built in, like the ability to see your search parameters and results in Python and an integration with ChatGPT so you can produce reports on proposed policy changes. Very cool!

PolicyEngine covers four countries:

From the PolicyEngine homepageExternal Link you select the country you’d like to review in the top banner (the UK is the default). The homepage has two main access points/journeys:

  • Compute my household income, taxes and benefits
  • Compute the impact of policy reforms
PolicyEngine - Computing the impact of public policy

It’s truly an amazing tool, and the best way to showcase its power is to take you through a couple of examples.

Policy reforms

Once you’ve chosen your country and selected policy reforms, you then need to choose the area of government (basically where the policy sits). For example, in the UK you can choose from:

  • Abolitions
  • Contributed
  • DCMS
  • DWP
  • HMRC
  • Local authorities
  • Ofgem
  • Revenue Scotland
  • HM Treasury
  • WRA

Presumably if you worked in government in the UK, the acronyms would be familiar and you’d know which one to select. For example, DCMS is the Department of Digital, Culture, Media and Sport and the only option underneath that is the BBC.

Sample policy modelling: increasing the TV licence in the UK from £159 to £200

From the options under DCMS, you can choose BBC, then select TV licence/TV licence fee. The flow looks like this:

  • BBC
    • TV licence
      • TV licence fee
      • Discount
      • TV licence fee evasion rate
      • TV ownership rate

Once you’ve selected the policy parameters, you can model the effect of changes on both the government and citizens. For example, let’s say you change the TV licence fee from £159 to £200. Next, click on the Calculate economic impact button and then Budgetary impact to see how this one change would affect the government’s income.

In this case, this increase in the TV licence fee would raise £1.1bn in one year.

You can also share the policy modelling and download it as a CSV.

If you select one of the other options instead of Budgetary impact, you can see how the policy change would affect citizens. In fact, you can also toggle between these options on the bottom left-hand menu.

Outputting Python from PolicyEngine

From the left-hand menu at the bottom (unfortunately it is a little hidden) you can reproduce your parameters and results in Python. Note, this is also where you access the ChatGPT analysis.

Below is the Python code for this proposed policy change.

Using ChatGPT for analysis of policy reform

The integration with ChatGPT is relatively new. PolicyEngine launched the ChatGPT integration in March 2023. Read about the ChatGPT integrationExternal Link

When you click on the Analysis link on the left, you can either generate the ChatGPT analysis within the PolicyEngine website or view the prompt and copy and paste it.

For this RaC insight, we did the analysis within the PolicyEngine website. The ChatGPT-generated analysis covered both the budgetary impact (the revenue for the government) plus the policy reform’s other effects. For example, raising the TV licence fee to £200 would also:

  • Decrease the net income of households by 0.1% on average
  • Raise the poverty rate by 1.4%
  • Increase inequality

At this point, you can also choose to Show prompt and see the ChatGPT prompt.

PolicyEngine as a tax and benefits calculator

PolicyEngine can also be used to see your household tax, plus any benefits you may be eligible for or tax credits. For this use-case, simply select Compute my household income, taxes and benefits from the homepage. You’ll then be asked a series of questions (not very many!) that allows PolicyEngine to calculate how much tax you’d pay and benefit payments.

Obviously this is a very powerful use-case, and similar to other RaC applications around the world. However, one thing that’s particularly powerful about PolicyEngine is that you can bring policy reform into your personal calculations. Users can select Create a reform to see how a policy change would alter their situation.

As an example, I entered some details into the US version and then clicked on Create a reform.

From there, I changed the income tax rate to see the impact on net income.

The tech behind PolicyEngine

PolicyEngine uses the open source RaC tool Open FiscaExternal Link . Open Fisca was built (using Python) by the French Government specifically as a RaC platform. Read our blog, What is OpenFisca?

As demonstrated above, PolicyEngine also uses ChatGPT to generate analysis of the policy changes.

Salsa Digital’s take

PolicyEngine is an amazing and powerful tool. Most of the Rules as Code projects we know about focus on calculating benefits, so it’s particularly nice to see one that looks at the policy reform application of RaC. The fact that it can combine benefit calculation and policy reform makes it a tool that we can imagine being used widely by those working in government and legislation.

PolicyEngine makes it easy for anyone working on policy reforms to model how changes will affect multiple stakeholders. Plus, they can produce a report (via ChatGPT) to pass to other staff members and ultimately the relevant minister. All of this can be achieved with a few clicks and 5-10 minutes.

PolicyEngine realises the dream of Rules as Code as a way to make legislation and rules transparent and to make it easy to see how policy changes will affect various groups of people. Salsa would love to see a tool like this in Australia. Sign us up!