Skip to content

What Is PolicyEngine

Anthony Volk edited this page May 14, 2024 · 1 revision

PolicyEngine is a non-profit with the mission of computing the impact of public policy for the world.

PolicyEngine's free, open-source software packages model tax and benefit systems, the rules that define how governments spend their money. PolicyEngine primarily models the US and UK, with some support for Canada, Nigeria, and Israel, as well.

Who is PolicyEngine?

A large, decentralized team of open-source contributors dedicated to demystifying taxes, benefits, and policymaking. Contributors come from all walks of life, from software development to academia to government and beyond. Some contributors are opening their first GitHub pull request, while others have worked in industry for years. If you'd like to make a change to PolicyEngine, however small, your contribution will be welcomed.

What is a "tax and benefit system"?

This refers to the set of legal provisions a country, province, state, or other legal entity utilize to define who is taxed, how they are taxed, and how much they are taxed, as well as who receives benefits, how much, and why. For example, all of the taxes assessed by the United States Internal Revenue Service (IRS) are one portion of the US's tax and benefit system.

How does PolicyEngine model a tax and benefit system?

PolicyEngine utilizes a four-tier package structure, depicted in the image below.

PolicyEngine’s country packages (linked below) contain microsimulation models of national tax and benefit systems, written in Python. The US and UK packages are PolicyEngine's most comprehensive, while the others remain in various stages of development. These packages are based upon the OpenFisca framework. For more information regarding how to contribute to these packages, check out the wiki at https://github.com/PolicyEngine/policyengine-us/wiki. United States United Kingdom Canada

PolicyEngine Core forks OpenFisca-Core in order to enable the processing of the country packages into a consistent object structure and execution of tax & benefit system microsimulations. The package is written in Python.

PolicyEngine API contains a Python Flask back end that allows for the creation and simulation of household- and society-wide tax policy changes. This, in turn, sits atop a few SQL databases that store data regarding household and policy calculations that users have run, enabling them to revisit this data later. This package currently serves as the live back end for the PolicyEngine website.

PolicyEngine App serves as the front end for the live PolicyEngine website and is written in ReactJS, with some minimal parts utilizing Python or TypeScript, as well.

PolicyEngine architecture diagram

How do users interact with PolicyEngine modelling?

Users can interact with PolicyEngine in one of a few ways:

  • Many of our users utilize the front-end application:
    • Those seeking to better understand the impacts of tax and benefit policy reform often use what we call the "policy calculator," which allows users to alter existing fiscal policy, run society-wide simulations against these changes, and estimate budgetary impacts, poverty impacts, etc.
    • Others utilize our "household calculator" to better understand what tax liabilities and benefit entitlements their family, a friend or acquaintance, or a sample household should receive.
  • More data science-oriented users can utilize the country packages directly (via core) to run simulations entirely within Python. These users typically come from an academic background in economics, statistics, or something similar.
  • Finally, some users directly interface with our API, usually to host their own tax and benefit solutions. These users are often local organizations dedicated to helping community members understand all benefits available to them, including local ones that PolicyEngine may not normally model in its own front-end application.