"Digital legislation" is the concept of making regulation and legislation available as programmable code, if and where appropriate, to improve the streamlined, consistent and automated use of the operating rules of government in applications, compliance, service deliver and any other use case. It does not naturally apply to all legislation, as there is often areas where interpretation is specifically required. However, for areas such as rules around entitlements, calculations, compliance, obligations and some definitions, digital legislation represented as code is useful.

Check out the blog post by the Service Innovation team about the relationship between policy, legislation and service delivery for some context and useful links. The CodeX project at Stanford explores this concept as well.

These tools are enabling digital legislation:

Product Licensing/owner Technical description Functional description How do you use it? Use cases (and links) Human readable? Machine readable? API enabled? How does it compare? Notes
[

https://digital-legislation.net/ Regulation as a Platform (RaaP)]
OpenFisca © OpenFisca contributors, AGPLv3, transparent roadmap and community A set of Python 2.7 modules, with a core and a web-api that allow to create “country packages” that model a tax and benefits system. An ecosystem of open-source tools have been created on top of its standardised APIs, such as a searchable web view of the system models and statistical research components. OpenFisca is an open-source computation engine that makes law computable. It allows for economic microsimulation by modelling the fiscal and social system (i.e. the set of all laws, regulations and practices) in a country. This model in turn allows for digital services (computation of taxes, social benefits…), reform impact assessment and historical policy research. All three of these uses have been proven effective in France (see openfisca.org), which has the most developed model. If contributors have already started to model the local tax and benefits system (see the list), one simply installs the associated Python module on a local machine or a server and can send queries through Python, YAML or web APIs. These queries look like a simple description of families or companies situations (e.g. their income, headcount…) along with unknown properties that should be calculated (e.g. income tax, rebates, benefits…). OpenFisca then sends back the situation with all blanks filled in.

The available model can also be extended, collaboratively refined or used to model reforms and compare them to a baseline.

If there is no model yet, bootstrapping one can be done in a matter of days. Calculate citizens' rights: from an individual situation, calculate any variable of a national tax and benefit system. Example app.


 Assess labor cost: model any kind of entity and evaluate its eligibility to fiscal obligations and benefits.
 Example app. Evaluate reforms impact: compare the law now to what it could be.
 Example paper. Yes, with the Legislation Explorer web app.
 Yes, written in Python with parsers for introspection provided. Yes. The Web API module lets you access all modelled elements in the legislation over HTTP(S), complete with analytics. 6 years (started in 2012) worth of investment from civil society and local and national governments. Used by:
 - Two Innovation Service Lab webapps in Aotearoa New Zealand. 
- Several national agencies, local governments and private companies in France. 
- NGOs in Tunisia. 
- Finance ministry in Senegal. 
- Barcelona township.
- Researchers in Italy. Good documentation. When it is missing, French government and research bodies have most context and are available for requests for help on Slack.
Oracle Policy Automation
Legal Rule ML
Ines CeCILL v2.1 (OSI-approved licence) The Ines model simulates social and fiscal direct taxations and benefits from representative data of the French population as provided by the national statistics agency INSEE. Created in 1996, open-sourced in 2016. Tied to a source data format, very little reuse value. Licensed as open-source but code forge is behind an account wall.

Further reading