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
File details
Details for the file leximpact_socio_fisca_simu_etat-0.0.5.tar.gz
.
File metadata
- Download URL: leximpact_socio_fisca_simu_etat-0.0.5.tar.gz
- Upload date:
- Size: 60.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d6ddff76e54fcc576d89c0b82d8adc2eec9bbabaa245e4976e9781f4be899ac |
|
MD5 | 92c6e68b4a0e2b8ebf88a4c87217b712 |
|
BLAKE2b-256 | a0394e253998a8a289a3909e25d6d3e856bf16ff66a83fed4eb98bca731e68b8 |
File details
Details for the file leximpact_socio_fisca_simu_etat-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: leximpact_socio_fisca_simu_etat-0.0.5-py3-none-any.whl
- Upload date:
- Size: 65.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87ae906903fc4a9a8c5c149b390c12c7eee0dac23516053eec1680fc186e5719 |
|
MD5 | 4471a84e9229606ff9860a9d5cee687f |
|
BLAKE2b-256 | 93f9561c281e50b31810f87b0fb965ba0c746a041185dbe66cb4738be812aa6e |