Simulation package
Project description
French State Budget Simulation API
HTTP API for OpenFisca
Used by LexImpact, a simulator of the French tax-benefit system.
Make use of OpenFisca a rules as code tax benefit system.
Install
pip install leximpact_socio_fisca_simu_etat
How to use
Fill me in please! Don't forget code examples:
from leximpact_socio_fisca_simu_etat.csg_simu import (
ReformeSocioFiscale,
compute_all_simulation,
)
reform = ReformeSocioFiscale(
base=2021,
amendement={
"prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux": 0.068,
},
output_variables=["csg"],
quantile_nb=4,
quantile_compare_variables=["csg"],
)
resultat = compute_all_simulation(reform, annee_de_calcul="2021")
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] reform.amendement : None
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] No cache for 5078a86c7201f132a44472774283e4a774e85b9bd94c88c9e756d3cb2021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] reform.amendement : {'prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux': 0.068}
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] No cache for 3580f21542881d1996a7b3a16a759d8318e58bdc44ac26ab6cfbf8662021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] Temps de traitement total pour la simulation 7.873102587996982 secondes
print(
f"Montant total de la csg : {resultat.result['amendement'].state_budget['csg']:,} €"
)
Montant total de la csg : -147,054,542,277.62744 €
How to develop
Please see contributing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for leximpact_socio_fisca_simu_etat-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6838c419424eb2c921c98622aedb80d5b739986269cf69f1686a00fffe29b7c0 |
|
MD5 | bc8b97d736f14e8ed12e5cbafe498d3b |
|
BLAKE2b-256 | 4763b1ad4652f484ada6ef81f6a3323761b8b9bd88f0df638ae31d8ff159e4c7 |
Close
Hashes for leximpact_socio_fisca_simu_etat-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c0a19118195ba4b5a95ef96bf03038a66185d3d3aa0f0571be3b44eb72b47df |
|
MD5 | 2a51144ab211dd902e36e9c13c000ccc |
|
BLAKE2b-256 | 9536e5ecfb17aad36e3d2c25fa8e1346fb133d73abad4499cd57df4f2bcd4e2e |