Skip to content

openfisca/tutorial

Repository files navigation

OpenFisca Tutorial

OpenFisca is a versatile microsimulation free software.

Check the online documentation for more details.

This package contains tutorials to test and explore OpenFisca.

Notebooks

The tutorial notebooks of OpenFisca offer you an overview of how to compute with this microsimulation software. Use them to explore how it works !

Just click here to start:

Binder

This repository entails also the configuration files for the Binder which deploys a computational environment with the technology of Jupyter Notebooks.

To install and launch a jupyter notebook locally:

make install
cd notebooks
make run

Python

With the Python tutorials (in French), you will learn how to:

  • use the python API to run calculations
  • get results on the current legislation as well as on reforms
  • export results to .csv files

For more information, see this README (in French).

This directory contains pre-filled input data, called situations, extracted from the French "Livret du pouvoir d'achat".

You can use them 'as is' in the web API or import them in the python API as shown in the python tutorials.

  • openfisca_json_customizer.py takes in an OpenFisca situation and customizes it thanks to a few helper methods.
  • clean_mes_aides_situation.py takes in a Mes Aides situation and turns it into an OpenFisca-France situation.
  • generate_situation_example contains the situation_example package, along with the try_situation_examples.py script. The situation_examples package contains complete cookie cutter situations (single, couple, roommates) that are ready to use in the python API, and the web API (in their json form)

To run one of the following scripts, go to its directory an call it with the python command.

A wiki provides additional information to this tutorial repository.

For technical tips on Python environment, see its FAQ (in French).