List of all variables as an object mapping their variable name to objects containing a description property whose value is their label, matching the /parameters endpoint.
Each variable is then exposed under the /variable/{{name}} URL as an object whose values are documented below.
InputVariable
Before
{
"@type": "Float",
"default": 0,
"entity": "individu",
"label": "Salaire de base, en général appelé salaire brut, la 1ère ligne sur la fiche de paie",
"start_line_number": 479,
"source_code": "class salaire_de_base(Variable):\n column = FloatCol\n entity = Individu\n label = u\"Salaire de base, en général appelé salaire brut, la 1ère ligne sur la fiche de paie\"\n set_input = set_input_divide_by_period\n url = u'http://www.insee.fr/fr/methodes/default.asp?page=definitions/salaire-mensuel-base-smb.htm'\n definition_period = MONTH\n",
"source_file_path": "model/revenus/activite/salarie.py",
"name": "salaire_de_base",
"url": "http://www.insee.fr/fr/methodes/default.asp?page=definitions/salaire-mensuel-base-smb.htm"
},
After
"salaire_de_base": {
"description": "Salaire de base, en général appelé salaire brut, la 1ère ligne sur la fiche de paie",
"valueType": "Float",
"defaultValue": 0,
"definitionPeriod": "month",
"entity": "individu",
"reference": "http://www.insee.fr/fr/methodes/default.asp?page=definitions/salaire-mensuel-base-smb.htm",
"source": "https://github.com/openfisca/openfisca-france/master/model/revenus/activite/salarie.py#L479-489"
},
The comments of the formulas is empty for all but 6 items, 5 of which are TODOs, the last one being an improperly-placed label (PR incoming to fix this). We can drop it.
The doc of the formulas is mostly misplaced labels with duplicate date information. We can drop it from the API, the data should be normalised into the labels.
We are not 100% satisfied with the source property name. href would be ambiguous since it would make the user leave the realm of the API itself.
The parsers do not currently expose the individual dated functions source code.
Many formulas have no start date. We default to datetime.date.min. We are not sure whether this information should be added by the API or set as a default for all formulas within each tax and benefits system, with the API simply exposing the data.
We remove the class source code, since all the information it contains is extracted and exposed as properties.
Proposition 1
/variables
endpointList of all variables as an object mapping their variable name to objects containing a
description
property whose value is theirlabel
, matching the/parameters
endpoint.Each variable is then exposed under the
/variable/{{name}}
URL as an object whose values are documented below.InputVariable
Before
After
Variable
Before
After
DatedVariable
Before
After
Notes
comments
of the formulas is empty for all but 6 items, 5 of which are TODOs, the last one being an improperly-placed label (PR incoming to fix this). We can drop it.doc
of the formulas is mostly misplaced labels with duplicate date information. We can drop it from the API, the data should be normalised into the labels.source
property name.href
would be ambiguous since it would make the user leave the realm of the API itself.datetime.date.min
. We are not sure whether this information should be added by the API or set as a default for all formulas within each tax and benefits system, with the API simply exposing the data.class
source code, since all the information it contains is extracted and exposed as properties.