Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

A widget to estimate the cost of hiring in France

Module Web d'estimation du coût d'une embauche en France.

Online demo.

If you want to create your own specific interface, have a look at the API documentation.

The main branch is gh-pages. The advanced branch is in active development to make the simulation more precise through a series of new questions.


Include this line where you want the widget to appear in your page:

 <script src=""></script>

Reminder: this widget is in beta and may be updated at any time. Please send an email to contact[AT] to request being sent potentially breaking update notices.


The widget's style is deliberately neutral to avoid visual integration problems. The host site's styles will affect the widget, and one can finalize the visual integration with a few CSS rules.

Using with Bootstrap

If you use Twitter Bootstrap version 2 CSS, an integration is provided. Simply add the following line after the inclusion of the widget:

<script async src=""></script>

If you use version Bootstrap version 3, no compatibility line should be required.

Browser compatibility

Continuously tested on:

Integration Tests Results

Also known to be compatible with:

  • IE10.
  • Safari 8.
  • Opera 28.

These tests are run manually and may not be as up-to-date as the above.

Not compatible with:

  • IE < 10.
  • Safari < 5.1.
  • Opera < 11.5.


The JS API is exposed in window.Embauche.

At the moment, it depends on the widget being present in the DOM to load the configuration from it.

Please open an issue if you want to consume the API in a different way.


Returns the currently-displayed computed simulation data, as an object containing the OpenFisca-computed values, as identifiers from the OpenFisca legislation mapped to Number values.

window.Embauche.OpenFisca.get([additionalParameters], callback)

Calls the Paie API, parameterised with the current state of the form.

You can adjust the situation to compute by passing an object as the first argument (additionalParameters). The parameters you can use are documented in the Paie API.

This function takes a callback as last argument. This callback will be called with three parameters:

  • An optional error. The failed XMLHttpRequest, or a SyntaxError if the fetched OpenFisca value is not properly formatted.
  • An object containing the OpenFisca-computed values, as identifiers from the OpenFisca legislation mapped to Number values.
  • The full OpenFisca response if you need everything it sends back.

If the callback is not input, returns the OpenFisca GET URL to obtain the results, as documented in the /formula API.


	zone_revitalisation_rurale: true
}, function(error, results) {
	if (error) throw error;
	window.alert('Employer would pay ' + results.salaire_super_brut + ' if this geographic zone was elected as a ZRR.')


This widget is packaged with Webpack and distributed through RawGit CDN.

RawGit does not offer any guarantees, we will distribute on our own servers when we get enough users to justify the investment.


To compile your modifications, clone this repository, cd to it and npm install. You can then run npm run compile whenever you change a file to update files under dist.

Run npm run dev to get webpack's development server and visit the ouput url to work on index.html with automatic page reloading on source change.

To work directly on a module with automatic page reloading , e.g. the cout-embauche-widget, add dist/cout-embauche-widget at the end of the ouput url.


Simply compile the widget and push your changes on GitHub.


This widget is covered by integration tests written with Watai under the test folder. To run them locally, follow the installation guide and run npm test.

These tests are run continuously on CircleCI.



Web interface for a Senegal income tax simulator.



No releases published


No packages published