Run the microsimulation model EUROMOD. The latest model and software versions of EUROMOD are available at https://euromod-web.jrc.ec.europa.eu/download-euromod .
Project description
Euromod Connector
The Euromod Connector for Python is built to facilitate and simplify the usage of the EUROMOD microsimulation model for research and analysis purposes. The Euromod Conector for Python is a library providing tools for running simulations and interacting with EUROMOD. EUROMOD is a tax-benefit microsimulation model for the European Union that enables researchers and policy analysts to calculate, in a comparable manner, the effects of taxes and benefits on household incomes and work incentives for the population of each country and for the EU as a whole. It is a static microsimulation model that applies user-defined tax and benefit policy rules to harmonised microdata on individuals and households, calculates the effects of these rules on household income, and then outputs results at the micro level. The default policy rules are those set to 30 June for a given poicy year and the microdata are processed according to a standard set of protocols. EUROMOD aims to simulate as much as possible of the tax and benefit components of households disposable income and other policy instruments such as income taxes, social contributions, family benefits, housing benefits, social assistance and other income-related benefits.
Installation
Install via PyPi using pip:
$ pip install euromod
Requirements
The Euromod Connector requires two EUROMOD components: 1) the model (coded policy rules) , and 2) the input microdata with the variables that respect the EUROMOD naming conventions. For more information, please, read the sections "Model" and "Input microdata" on the Download Euromod web page.
Simulation
Importing and loading the model:
In[1]: from euromod import Model
In[2]: mod=Model(r"C:\EUROMOD_RELEASES_I6.0+")
Loading the dataset using pandas:
In[3]: import pandas as pd
In[4]: data = pd.read_csv(r"C:\EUROMOD_RELEASES_I6.0+\Input\sl_demo_v4.txt",sep="\t")
Running a simulation on system 'SL_1996' of the country Simpleland 'SL' (Note: this country model is provided by default with the EUROMOD project):
In[5]: out=mod['SL']['SL_1996'].run(data,'sl_demo_v4')
In[6]: out.outputs[0]
Out[1]:
idhh idperson idmother ... ils_dispy il_taxabley il_bsa_base
0 1.0 101.0 0.0 ... 807.018500 0.00000 807.01850
1 1.0 102.0 0.0 ... 0.000000 0.00000 0.00000
2 1.0 103.0 102.0 ... 0.000000 0.00000 0.00000
3 1.0 104.0 102.0 ... 934.294772 149.54786 149.54786
4 2.0 201.0 0.0 ... 1337.268280 1421.58535 1337.26828
... ... ... ... ... ... ...
1255 500.0 50003.0 50002.0 ... 0.000000 0.00000 0.00000
1256 500.0 50004.0 50002.0 ... 0.000000 0.00000 0.00000
1257 500.0 50005.0 50002.0 ... 0.000000 0.00000 0.00000
1258 500.0 50006.0 0.0 ... 839.845300 0.00000 839.84530
1259 500.0 50007.0 0.0 ... 0.000000 0.00000 0.00000
[1260 rows x 43 columns]
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 euromod-0.1.20a0.tar.gz
.
File metadata
- Download URL: euromod-0.1.20a0.tar.gz
- Upload date:
- Size: 404.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74df87f092331d2773328956982ff3203858f1564b6265b4148735862cdcb57b |
|
MD5 | 2fcfa56f1e2d22e002a24f38f54e0ecc |
|
BLAKE2b-256 | 883433a711aa58070a13e9a5656e05df2329fcd393b0091fb7deee79194f5ac2 |
File details
Details for the file euromod-0.1.20a0-py3-none-any.whl
.
File metadata
- Download URL: euromod-0.1.20a0-py3-none-any.whl
- Upload date:
- Size: 406.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ccb849976f7c14a91b9866107226d2162e8b87528e3db54205688b941995844 |
|
MD5 | 32d51328818262cc3e082394e9c65320 |
|
BLAKE2b-256 | 5de2ee98992326bda3ba9b6d25e466b43cd871969d8aeebaf2cbd1f47860b5fd |