What is OpenFisca?
is an open source rules as code (RaC) platform that can be used to encode and serve legislation and regulation as code. It’s a lightweight, modular and scalable python-based rules engine. It’s free (open source), licensed under an .
OpenFisca was initially developed by the French Government in 2011, and is now used for RaC projects in France, New Zealand, Australia, Canada and other jurisdictions. OpenFisca is independent of country or jurisdiction, so it can be used to code legislation of any country, jurisdiction or department.
OpenFisca can be used to:
Evaluate the eligibility of individuals, households or businesses to government entitlements
Calculate the entitlement amounts based on specific circumstances
Determine obligations of individuals, households or businesses to comply with government policy
Simulate the impact of proposed policy changes on different population segments
Calculate taxes and benefits for different entities: people, households, companies, etc.
OpenFisca for Australia
Implementing Australian legislation and regulations as rules in an open repository has many benefits.
While the most obvious use case is individuals testing their eligibility for specific entitlements via departmental websites, agencies can provide additional, personalised services and content for citizens.
For example, based on user input for a specific eligibility test, OpenFisca can be used to find other entitlements the user may be eligible for. These entitlements do not have to come from the same department or agency.
Additionally, the open repository of RaC can be used by government departments and industry to provide other services and automate processes. For example, departments can use OpenFisca to test the impact of policy changes across different segments of the population.
OpenFisca’s modules consist of:
- OpenFisca Core
- Web API
- Country package
- Extension package
Depending on the implementation requirements, one or several OpenFisca components will be required.
OpenFisca Core is the main rules engine, and is common to all country packages. The core binds the country package, extensions and the rules engine together.
OpenFisca Core also packages the Web API.
OpenFisca exposes its rules engine via API endpoints. The API is compatible with all country packages.
The API can be used to run simulations and retrieve calculations for specific situations (including eligibility checks and entitlement amounts).
Country packages are the basic modules of OpenFisca and define the parameters, entities and variables for a country.
Extensions extend the capabilities of the country packages and are used to define new variables or parameters. Extensions are typically used to implement tax and benefit rules for local jurisdictions and departments (e.g. states and territories, local governments and departments/agencies).
Salsa, GovZero Aotearoa and OpenFisca
GovZero Aotearoa is an open collaboration initiative that aims to deliver citizen benefits in New Zealand. A key outcome of the project is to create a public repository of coded rules using OpenFisca. The RaC repository will make it easier for citizens to access legal rights and understand their eligibility for benefits and their regulatory obligations.
The Salsa team collaborates closely with a diverse group of experts. The wider group has considerable experience with RaC and OpenFisca, with many members having previously worked on RaC/OpenFisca projects in both New Zealand and New South Wales (see examples below).
Other RaC case studies
Other RaC case studies include:
- Fair Trading New South Wales (Australia)
- Mes Aides (My Helpers) — Entitlements eligibility simulator (France)
- Lex Impact — Policy difference engine (France)
- Les meves ajudes (My Aides) — Entitlements eligibility simulator (Spain)
- Rapu Ture — Exploring the Rules (New Zealand)
The interface asks a series of questions — with the questions dependent on the type of game citizens are planning to run. Based on the inputs (answers), OpenFisca returns whether the citizens are allowed to run their gaming activity.
France was an early adopter and innovator in RaC. The French Government has integrated several OpenFisca projects with departmental websites.
Mes Aides uses OpenFisca and its web API to inform French citizens about their eligibility to national and local benefits. The portal has two simulators:
The OpenFisca-powered eligibility simulator compares an individual’s personal situation to French social security legislation eligibility criteria, and informs users whether they’re entitled to payments. Additionally, the OpenFisca engine can calculate how much citizens should get and any conditions or obligations they must meet.
Users are guided through a series of questions in web forms. Alternatively, users can login, which will pre-populate known data.
The Lex Impact service allows users to test the impact of policy changes. Users can test changes to the following policies/legislation:
- Income tax
- Grants to municipalities
- Social contributions and benefits
- Social security revenue
For each of the policies, there are test cases and various policy variables that can be modified to see the impact. Users can also add specific test cases.
For example, for the income tax simulator users are presented with various input values that can be changed (e.g. income thresholds and tax rates), and also different household types. By changing the values, users can see the impact. Users can also add different household types (e.g. single parent with three dependent children) to see specific impacts.
Similar to the French Mes Aides service, les meves ajudes allows users to test what benefits they’re eligible for. The eligibility service incorporates social security legislation from the City of Barcelona, the Catalonia Government and the state.
Users provide their specific circumstances and see what social benefits they’re entitled to. OpenFisca is used to return the eligible benefits, the amount, and links for how to apply.
The New Zealand Government is another leader in OpenFisca and RaC.
The Rapu Ture portal is an experimental project by the Service Innovation Lab to model, explore and evaluate government rules. The site contains many scenarios for users to explore, with both test inputs and expected outputs.