UBICenter / uk

Simulations of UBI in the UK
MIT License
3 stars 6 forks source link

Blank Slate UBI model

This repo contains the code required to reproduce the figures in the UBI Center Blank Slate UBI report.

Reproducing

Dependencies:

  1. clone or download this repository
  2. Create the anaconda environment with conda env create -f environment.yml from within the cloned directory
  3. conda activate uk

You can now recreate our results. The main calculations can be performed like so:

You can recreate our summary tables with:

And our tables and figures with the jupyter notebook jb/uk_ft_ubi.ipynb. To use the notebook you will need to install a few more packages:

Then run jupyter notebook, open the notebook and run its cells.

Note also that some of the marginal tax rate cells at the bottom of the notebook will not run correctly. They depend on an older version of openfisca-uk.

Modifying the model

The modifications to the OpenFisca-UK microsimulation model are described in the ubi_reform() function in py/calc_ubi.py.

The optimisation process and loss function are described in py/optimize.py and py/loss_functions.py.