Apode is a package that contains a set of indicators that are applied in economic analysis. It contains measures of poverty, inequality, polarization, wealth and concentration.
You need Python 3.8 to run Apode.
Clone this repo and then inside the local directory execute
$ pip install -e .
Objects are created using:
ad = ApodeData(DataFrame, income_column)
Where income_column is the name of a column in the dataframe.
Methods that calculate indicators:
ad.poverty(method,*args)
ad.ineq(method,*args)
ad.welfare(method,*args)
ad.polarization(method,*args)
ad.concentration(method,*args)
Graphical representations:
ad.plot.hist()
ad.plot.tip(**kwargs)
ad.plot.lorenz(**kwargs)
ad.plot.pen(**kwargs)
To use Apode, follow these steps:
x = [23, 10, 12, 21, 4, 8, 19, 15, 11, 9]
df = pd.DataFrame({'x':x})
ad = ApodeData(df1, income_column="x") pline = 10 # Poverty line
p = ad.poverty('headcount',pline=pline)
pFor more examples, please refer to the Tutorial.
Thanks to the following people who have contributed to this project:
If you want to contact me you can reach me at ngrion@gmail.com. If you have issues please report them as a issue here.
Distributed under the MIT License. See LICENSE for more information.
- Cowell, F. (2011) Measuring Inequality. London School of Economics Perspectives in Economic Analysis. 3rd ed. Edición. Oxford University Press http://darp.lse.ac.uk/papersDB/Cowell_measuringinequality3.pdf
- Cowell, F. (2016) “Inequality and Poverty Measures”, in Oxford Handbook of Well-Being And Public Policy, edited by Matthew D. Adler and Marc Fleurbaey
- Haughton, J. and S. Khandker (2009). Handbook on Poverty + Inequality. World Bank Training Series. https://openknowledge.worldbank.org/bitstream/handle/10986/11985/9780821376133.pdf
- POBREZA Y DESIGUALDAD EN AMÉRICA LATINA. https://www.cedlas.econo.unlp.edu.ar/wp/wp-content/uploads/Pobreza_desigualdad_-America_Latina.pdf
- Araar Abdelkrim and Jean-Yves Duclos (2007). "DASP: Distributive Analysis Stata Package", PEP, World Bank, UNDP and Université Laval. http://dasp.ecn.ulaval.ca/