Skip to content

Instantly share code, notes, and snippets.

@clementbiron
Last active December 12, 2022 16:28
Show Gist options
  • Save clementbiron/14fe80a88c4a2e33e73964434b537710 to your computer and use it in GitHub Desktop.
Save clementbiron/14fe80a88c4a2e33e73964434b537710 to your computer and use it in GitHub Desktop.
OpenFisca web API
fetch('https://api.demo.openfisca.org/latest/parameter/taxes.income_tax_rate')
.then(response => response.json())
.then(historicalTaxRates => {
for (const [date, taxRate] of Object.entries(historicalTaxRates.values)) {
console.log(`On ${date}, if you earned 100, you paid ${100 * taxRate} in income revenue tax`)
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment