Déchiffrer 2027

FREN

source code

The code and the data

The site’s code and data will be published in open access when the site opens to the public. In the meantime, here is how it works, and what you can already download.

Where publication stands

The repository is still private: the site is in preparation. It will be opened, under a free licence, when the site opens to the public, and its address given here. The data, however, can already be downloaded: see Data.

How the site works

  1. Data in text files, validated at each publication. The grid (118 levers), each candidate’s positions and the cost schedule are readable YAML files. Before each release, a checking program verifies them: quote and source present, date of a statement no later than the current day, direction of change consistent with the values, costing that refers to an existing parameter, no position left uncosted solely because a value lies outside the source’s range. An invalid file blocks publication.
  2. A deterministic costing engine. The cost of a position depends only on the published cost schedule and on its encoding: the same inputs always give the same result. A value outside the range measured by the source is costed by linear extrapolation and marked with an asterisk; two costings that overlap are not added together. The details are on the Method page.
  3. OpenFisca-France 176.1.2 for the model households. The effects on household income are calculated with this free model of French tax and benefit legislation, outside the site, by a script. The site reads the results file and refuses to publish it if it no longer matches the encoding of the positions.
  4. Pages produced in advance. Grid, profiles, costing summaries and method pages are calculated once, at publication, then served as they are. No database is involved in displaying them. Only the online consultation has a server and a database: see Privacy.
  5. Automated tests. The costing engine, the validation rules, the formatting of the pages and the downloadable files are covered by automated tests.

The tools

Next.js and React for the pages, TypeScript, zod for data validation, OpenFisca-France (Python) for the model households. The site is hosted by Vercel.