A Python Package to calculate indexes related to poverty and inequality.
For anybody who want to calculate indexes related to poverty and inequality using a python package.
pip install poverty
-
Headcount Index
-
Poverty Index
-
Squared Poverty Index
-
Sen Index
-
Sen-Shorrocks-Thon Index
-
Watts Index
-
Gini Coefficient
-
Lorenz Curve
import poverty as pt #Base line for poverty >>>poverty_line=125 #List containing expenditure >>>expenditure=[100,110,150,160] #To calculate Headcount Index >>>pt.calc_head(expenditure,poverty_line) #To calculate Poverty Index >>>pt.pov_index(expenditure,poverty_line) #To calculate Squared Poverty Index >>>pt.squared_pov_index(expenditure,poverty_line) #To calculate Sen Index >>>pt.sen_index(expenditure,poverty_line) #To calculate Sen-Shorrocks-Thon index >>>pt.sst_index(expenditure,poverty_line) #To calculate Watts Index >>>pt.watts_index(expenditure,poverty_line) #To calculate Gini Coefficient >>>pt.gini(expenditure) #To draw Lorenz Curve >>>pt.draw_lorenz(expenditure)
Feel free to browse the project and give feedback (comments, issues, pull requests).