LSMS_Library 0.2.10.dev0__py3-none-any.whl → 0.7.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lsms_library/ISSUES.md +9 -0
- lsms_library/Makefile +43 -4
- lsms_library/__init__.py +205 -7
- lsms_library/calendars.py +220 -0
- lsms_library/categorical_mapping/ai_agent.py +14 -1
- lsms_library/categorical_mapping/categorical_mapping_helper.py +19 -0
- lsms_library/categorical_mapping/harmonize_assets.org +145 -0
- lsms_library/categorical_mapping/kinship.yml +590 -0
- lsms_library/cli.py +647 -0
- lsms_library/config.py +125 -0
- lsms_library/countries/.dvc/config +1 -1
- lsms_library/countries/.dvcignore +7 -0
- lsms_library/countries/Afghanistan/_/Makefile +10 -14
- lsms_library/countries/Afghanistan/_/afghanistan.py +42 -6
- lsms_library/countries/Albania/2002/_/data_info.yml +57 -0
- lsms_library/countries/Albania/2002/_/sample.py +21 -0
- lsms_library/countries/Albania/2003/_/data_info.yml +56 -0
- lsms_library/countries/Albania/2003/_/sample.py +27 -0
- lsms_library/countries/Albania/2004/_/data_info.yml +52 -0
- lsms_library/countries/Albania/2004/_/sample.py +33 -0
- lsms_library/countries/Albania/2005/_/data_info.yml +58 -0
- lsms_library/countries/Albania/2005/_/sample.py +32 -0
- lsms_library/countries/Albania/2008/_/data_info.yml +49 -0
- lsms_library/countries/Albania/2008/_/sample.py +30 -0
- lsms_library/countries/Albania/2012/_/data_info.yml +49 -0
- lsms_library/countries/Albania/2012/_/sample.py +30 -0
- lsms_library/countries/Albania/_/data_scheme.yml +35 -0
- lsms_library/countries/Armenia/1996/_/data_info.yml +27 -0
- lsms_library/countries/Armenia/_/data_scheme.yml +18 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/.gitignore +6 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/abstracte.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/abstractr.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/ppabse.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/ppabsr.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/queshhe.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/Documentation/quespope.pdf.dvc +5 -0
- lsms_library/countries/Azerbaijan/1995/_/1995.py +7 -0
- lsms_library/countries/Azerbaijan/1995/_/data_info.yml +69 -0
- lsms_library/countries/Azerbaijan/_/CONTENTS.org +50 -0
- lsms_library/countries/Azerbaijan/_/data_scheme.yml +35 -0
- lsms_library/countries/Benin/2018-19/_/2018-19.py +103 -0
- lsms_library/countries/Benin/2018-19/_/data_info.yml +249 -0
- lsms_library/countries/Benin/_/CONTENTS.org +75 -0
- lsms_library/countries/Benin/_/benin.py +10 -0
- lsms_library/countries/Benin/_/data_scheme.yml +59 -0
- lsms_library/countries/Bulgaria/1995/Documentation/.gitignore +1 -0
- lsms_library/countries/Bulgaria/1995/Documentation/BG95SUM.LOG.dvc +5 -0
- lsms_library/countries/Burkina_Faso/2014/_/2014.py +7 -0
- lsms_library/countries/Burkina_Faso/2014/_/data_info.yml +171 -0
- lsms_library/countries/Burkina_Faso/2014/_/food_acquired.py +3 -8
- lsms_library/countries/Burkina_Faso/2018-19/_/2018-19.py +133 -0
- lsms_library/countries/Burkina_Faso/2018-19/_/data_info.yml +246 -0
- lsms_library/countries/Burkina_Faso/2018-19/_/food_acquired.py +2 -5
- lsms_library/countries/Burkina_Faso/2021-22/_/2021-22.py +102 -0
- lsms_library/countries/Burkina_Faso/2021-22/_/data_info.yml +227 -0
- lsms_library/countries/Burkina_Faso/2021-22/_/food_acquired.py +2 -5
- lsms_library/countries/Burkina_Faso/_/CONTENTS.org +50 -4
- lsms_library/countries/Burkina_Faso/_/Makefile +15 -17
- lsms_library/countries/Burkina_Faso/_/burkina_faso.py +60 -6
- lsms_library/countries/Burkina_Faso/_/categorical_mapping.org +401 -0
- lsms_library/countries/Burkina_Faso/_/data_scheme.yml +75 -0
- lsms_library/countries/Burkina_Faso/_/food_acquired.py +1 -6
- lsms_library/countries/Burkina_Faso/_/panel_ids.json +1 -0
- lsms_library/countries/Burkina_Faso/_/panel_ids.py +93 -0
- lsms_library/countries/Burkina_Faso/_/updated_ids.json +1 -0
- lsms_library/countries/Cambodia/2019-20/_/data_info.yml +61 -0
- lsms_library/countries/Cambodia/2019-20/_/food_acquired.py +3 -7
- lsms_library/countries/Cambodia/_/CONTENTS.org +128 -3
- lsms_library/countries/Cambodia/_/Makefile +12 -17
- lsms_library/countries/Cambodia/_/cambodia.py +42 -6
- lsms_library/countries/Cambodia/_/data_scheme.yml +24 -0
- lsms_library/countries/Cambodia/_/food_acquired.py +1 -6
- lsms_library/countries/China/1995-97/_/1995-97.py +30 -0
- lsms_library/countries/China/1995-97/_/data_info.yml +41 -18
- lsms_library/countries/China/_/CONTENTS.org +53 -0
- lsms_library/countries/China/_/data_scheme.yml +28 -3
- lsms_library/countries/CotedIvoire/1985-86/_/data_info.yml +88 -0
- lsms_library/countries/CotedIvoire/1986-87/_/data_info.yml +88 -0
- lsms_library/countries/CotedIvoire/1987-88/_/data_info.yml +88 -0
- lsms_library/countries/CotedIvoire/1988-89/_/data_info.yml +88 -0
- lsms_library/countries/CotedIvoire/2018-19/_/2018-19.py +43 -0
- lsms_library/countries/CotedIvoire/2018-19/_/data_info.yml +252 -0
- lsms_library/countries/CotedIvoire/2018-19/_/food_expenditures.py +36 -9
- lsms_library/countries/CotedIvoire/2018-19/_/nonfood_expenditures.py +36 -9
- lsms_library/countries/CotedIvoire/_/CONTENTS.org +151 -0
- lsms_library/countries/CotedIvoire/_/Makefile +12 -16
- lsms_library/countries/CotedIvoire/_/cotedivoire.py +80 -81
- lsms_library/countries/CotedIvoire/_/data_scheme.yml +64 -0
- lsms_library/countries/Ethiopia/2011-12/_/2011-12.py +25 -0
- lsms_library/countries/Ethiopia/2011-12/_/data_info.yml +129 -0
- lsms_library/countries/Ethiopia/2011-12/_/sample.py +49 -0
- lsms_library/countries/Ethiopia/2011-12/_/shocks.py +9 -12
- lsms_library/countries/Ethiopia/2013-14/_/2013-14.py +121 -0
- lsms_library/countries/Ethiopia/2013-14/_/data_info.yml +148 -0
- lsms_library/countries/Ethiopia/2013-14/_/sample.py +52 -0
- lsms_library/countries/Ethiopia/2013-14/_/shocks.py +9 -12
- lsms_library/countries/Ethiopia/2015-16/Documentation/SOURCE.org +3 -0
- lsms_library/countries/Ethiopia/2015-16/_/2015-16.py +27 -0
- lsms_library/countries/Ethiopia/2015-16/_/data_info.yml +152 -0
- lsms_library/countries/Ethiopia/2015-16/_/sample.py +52 -0
- lsms_library/countries/Ethiopia/2015-16/_/shocks.py +9 -12
- lsms_library/countries/Ethiopia/2018-19/_/data_info.yml +152 -0
- lsms_library/countries/Ethiopia/2018-19/_/sample.py +45 -0
- lsms_library/countries/Ethiopia/2018-19/_/shocks.py +9 -12
- lsms_library/countries/Ethiopia/2021-22/Data/cons_agg_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/crop_cf_wave5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/eth_householdgeovariables_y5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/eth_plotgeovariables_y5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/food_cf_wave5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect01a_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect01b_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect02_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect03_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect04_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect05_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect06_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect07_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect08_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect09_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect10_ph_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect10a_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect10a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect10b_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect11_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect11_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect11_ph_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12_com_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12b1_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12b2_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12c_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12c_q1_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12d_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12e_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect12f_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect13_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect14_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect15a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect15b_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect1_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect1_ph_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect1_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect2_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect2_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect3_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect3_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect3b_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect4_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect4_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect5_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect5a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect5b_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect6a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect6b2_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect6b3_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect6b4_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect6c_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect7_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect7a_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect7b_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect8_1_ls_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect8_2_ls_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect8_3_ls_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect8_4_ls_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect8_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect9_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect9_ph_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect9a_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect_cover_hh_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect_cover_ls_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect_cover_ph_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Data/sect_cover_pp_w5.dta.dvc +5 -0
- lsms_library/countries/Ethiopia/2021-22/Documentation/LICENSE +29 -0
- lsms_library/countries/Ethiopia/2021-22/Documentation/SOURCE +1 -0
- lsms_library/countries/Ethiopia/2021-22/Documentation/SOURCE.org +3 -0
- lsms_library/countries/Ethiopia/2021-22/_/data_info.yml +161 -0
- lsms_library/countries/Ethiopia/2021-22/_/food_acquired.py +20 -0
- lsms_library/countries/Ethiopia/2021-22/_/sample.py +48 -0
- lsms_library/countries/Ethiopia/_/CONTENTS.org +130 -1
- lsms_library/countries/Ethiopia/_/Makefile +24 -20
- lsms_library/countries/Ethiopia/_/_age_helpers.py +146 -0
- lsms_library/countries/Ethiopia/_/categorical_mapping.org +49 -0
- lsms_library/countries/Ethiopia/_/data_scheme.yml +61 -0
- lsms_library/countries/Ethiopia/_/ethiopia.py +156 -52
- lsms_library/countries/Ethiopia/_/fct_tools.py +4 -4
- lsms_library/countries/Ethiopia/_/food_acquired.py +2 -18
- lsms_library/countries/Ethiopia/_/food_items.org +82 -80
- lsms_library/countries/Ethiopia/_/nutrition.py +1 -1
- lsms_library/countries/Ethiopia/_/panel_ids.json +1 -0
- lsms_library/countries/Ethiopia/_/panel_ids.py +60 -0
- lsms_library/countries/Ethiopia/_/shocks.py +5 -12
- lsms_library/countries/Ethiopia/_/updated_ids.json +1 -0
- lsms_library/countries/GhanaLSS/1987-88/_/data_info.yml +9 -4
- lsms_library/countries/GhanaLSS/1987-88/_/food_acquired.py +11 -14
- lsms_library/countries/GhanaLSS/1987-88/_/mapping.py +11 -5
- lsms_library/countries/GhanaLSS/1988-89/_/data_info.yml +9 -4
- lsms_library/countries/GhanaLSS/1988-89/_/food_acquired.py +10 -13
- lsms_library/countries/GhanaLSS/1988-89/_/mapping.py +11 -5
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/.gitignore +12 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/Aggregat.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3DEOMAN.DOC.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3INTMAN.DOC.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPartA.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPartB.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPrice.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3REPORT.DOC.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3SUPMAN.DOC.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3USERSG.DOC.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3qcomm.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/Povprof.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/overview_glss3.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/1991-92/_/data_info.yml +13 -1
- lsms_library/countries/GhanaLSS/1991-92/_/food_acquired.py +7 -9
- lsms_library/countries/GhanaLSS/1991-92/_/mapping.py +17 -5
- lsms_library/countries/GhanaLSS/1998-99/_/data_info.yml +13 -1
- lsms_library/countries/GhanaLSS/1998-99/_/food_acquired.py +12 -15
- lsms_library/countries/GhanaLSS/1998-99/_/mapping.py +19 -7
- lsms_library/countries/GhanaLSS/2005-06/_/data_info.yml +12 -1
- lsms_library/countries/GhanaLSS/2005-06/_/food_acquired.py +10 -15
- lsms_library/countries/GhanaLSS/2005-06/_/mapping.py +15 -3
- lsms_library/countries/GhanaLSS/2012-13/Documentation/.gitignore +1 -0
- lsms_library/countries/GhanaLSS/2012-13/Documentation/Notes on how glss6 compares with other glss.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2012-13/_/data_info.yml +15 -2
- lsms_library/countries/GhanaLSS/2012-13/_/food_acquired.py +13 -18
- lsms_library/countries/GhanaLSS/2012-13/_/mapping.py +10 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/7GLSS7 SECTION 10.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/7GLSS7_Community Quest.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/COVER PAGE _PRICE.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/DIARY.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7 Final Manual.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7_MODULE A_30_9_16_for print.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7_MODULE B _14_10_16.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GPS Module 13_28_4_17.docx.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/Supervisors' manual_GLSS7.doc.dvc +5 -0
- lsms_library/countries/GhanaLSS/2016-17/_/data_info.yml +15 -3
- lsms_library/countries/GhanaLSS/2016-17/_/food_acquired.py +6 -8
- lsms_library/countries/GhanaLSS/2016-17/_/mapping.py +10 -0
- lsms_library/countries/GhanaLSS/TODO +39 -0
- lsms_library/countries/GhanaLSS/_/CONTENTS.org +126 -0
- lsms_library/countries/GhanaLSS/_/Makefile +17 -18
- lsms_library/countries/GhanaLSS/_/data_scheme.yml +18 -4
- lsms_library/countries/GhanaLSS/_/food_acquired.py +5 -17
- lsms_library/countries/GhanaLSS/_/ghanalss.py +144 -62
- lsms_library/countries/GhanaLSS/_/household_roster.py +5 -14
- lsms_library/countries/GhanaLSS/_/panel_ids.json +1 -0
- lsms_library/countries/GhanaLSS/_/panel_ids.py +104 -0
- lsms_library/countries/GhanaLSS/_/updated_ids.json +1 -0
- lsms_library/countries/GhanaLSS/dvc.yaml +1 -0
- lsms_library/countries/GhanaSPS/2009-10/_/food_acquired.py +3 -5
- lsms_library/countries/GhanaSPS/2009-10/_/other_expenditures.py +2 -4
- lsms_library/countries/GhanaSPS/2013-14/Documentation/.gitignore +3 -0
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Community Survey_WAVE II.docx.dvc +6 -0
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Part A_WAVE II.docx.dvc +6 -0
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Part B_WAVE II.docx.dvc +6 -0
- lsms_library/countries/GhanaSPS/2013-14/_/food_acquired.py +3 -5
- lsms_library/countries/GhanaSPS/2013-14/_/other_expenditures.py +2 -4
- lsms_library/countries/GhanaSPS/2017-18/Documentation/Questionnaire/.gitignore +1 -0
- lsms_library/countries/GhanaSPS/2017-18/Documentation/Questionnaire/HH_Questionnaire_23_10.docx.dvc +5 -0
- lsms_library/countries/GhanaSPS/2017-18/_/food_acquired.py +3 -5
- lsms_library/countries/GhanaSPS/2017-18/_/other_expenditures.py +2 -4
- lsms_library/countries/GhanaSPS/_/Makefile +11 -15
- lsms_library/countries/GhanaSPS/_/food_acquired.py +1 -11
- lsms_library/countries/GhanaSPS/_/ghanasps.py +120 -45
- lsms_library/countries/Guatemala/2000/_/data_info.yml +70 -0
- lsms_library/countries/Guatemala/2000/_/food_acquired.py +2 -6
- lsms_library/countries/Guatemala/_/Makefile +14 -19
- lsms_library/countries/Guatemala/_/data_scheme.yml +27 -0
- lsms_library/countries/Guatemala/_/food_acquired.py +0 -5
- lsms_library/countries/Guatemala/_/guatemala.py +40 -7
- lsms_library/countries/Guinea-Bissau/2018-19/_/2018-19.py +124 -0
- lsms_library/countries/Guinea-Bissau/2018-19/_/data_info.yml +251 -0
- lsms_library/countries/Guinea-Bissau/_/CONTENTS.org +34 -0
- lsms_library/countries/Guinea-Bissau/_/categorical_mapping.org +12 -0
- lsms_library/countries/Guinea-Bissau/_/data_scheme.yml +62 -0
- lsms_library/countries/Guinea-Bissau/_/guinea-bissau.py +11 -0
- lsms_library/countries/Guyana/1992/_/1992.py +7 -0
- lsms_library/countries/Guyana/1992/_/data_info.yml +82 -0
- lsms_library/countries/Guyana/_/data_scheme.yml +26 -0
- lsms_library/countries/Harmonized_LSMS-ISA_Ag/lsms_ag.parquet.dvc +5 -0
- lsms_library/countries/India/1997-98/_/data_info.yml +35 -2
- lsms_library/countries/India/_/data_scheme.yml +23 -4
- lsms_library/countries/Iraq/2006-07/_/data_info.yml +76 -3
- lsms_library/countries/Iraq/2012/_/data_info.yml +18 -1
- lsms_library/countries/Iraq/_/data_scheme.yml +13 -2
- lsms_library/countries/Kazakhstan/1996/_/data_info.yml +62 -0
- lsms_library/countries/Kazakhstan/1996/dvc.yaml +1 -0
- lsms_library/countries/Kazakhstan/1996/var/.gitkeep +0 -0
- lsms_library/countries/Kazakhstan/_/data_scheme.yml +30 -0
- lsms_library/countries/Kazakhstan/dvc.yaml +1 -0
- lsms_library/countries/KenyaLPS/2003-2005/Documentation/LICENSE +7 -0
- lsms_library/countries/KenyaLPS/2003-2005/Documentation/SOURCE +13 -0
- lsms_library/countries/KenyaLPS/2007-2009/Data/.gitignore +4 -0
- lsms_library/countries/KenyaLPS/2007-2009/Data/KLPS2_E-Module_PUBLIC_2021-05.tab.dvc +5 -0
- lsms_library/countries/KenyaLPS/2007-2009/Data/KLPS2_I-Module_PUBLIC_2021-05.tab.dvc +5 -0
- lsms_library/countries/KenyaLPS/2007-2009/Data/KLPS2_SampleMaster_PUBLIC_2015-12.tab.dvc +5 -0
- lsms_library/countries/KenyaLPS/2007-2009/Data/KLPS2_Status_PUBLIC_2015-12.tab.dvc +5 -0
- lsms_library/countries/KenyaLPS/2011-2014/Data/KLPS3_E-Plus-Module_PUBLIC_2022-02.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2011-2014/Data/KLPS3_I-Module_PUBLIC_2022-02.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2011-2014/Data/KLPS3_SampleMaster_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2011-2014/Data/KLPS3_Status_PUBLIC_2022-02.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_C-Module_CONTROL_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_C-Module_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_E-Module_CONTROL_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_E-Module_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_F-Module_CONTROL_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_F-Module_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_H-Module_CONTROL_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_H-Module_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_SampleMaster_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2015/Data/KLPS1_Status_PUBLIC_2015-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2017-2022/Data/KLPS4-Kids-SampleMaster_PUBLIC_2025-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2017-2022/Data/KLPS4-Kids-Status_PUBLIC_2025-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2017-2022/Data/KLPS4_E-Module_PUBLIC_2025-12.dta.dvc +5 -0
- lsms_library/countries/KenyaLPS/2017-2022/Data/KLPS4_I-Module_PUBLIC_2025-12.dta.dvc +5 -0
- lsms_library/countries/Kosovo/2000/_/data_info.yml +62 -3
- lsms_library/countries/Kosovo/_/data_scheme.yml +23 -3
- lsms_library/countries/Liberia/2018-19/_/2018-19.py +13 -0
- lsms_library/countries/Liberia/2018-19/_/data_info.yml +27 -1
- lsms_library/countries/Liberia/_/data_scheme.yml +23 -2
- lsms_library/countries/Malawi/2004-05/_/data_info.yml +86 -2
- lsms_library/countries/Malawi/2004-05/_/food_acquired.py +4 -10
- lsms_library/countries/Malawi/2004-05/dvc.yaml +1 -0
- lsms_library/countries/Malawi/2004-05/var/.gitkeep +0 -0
- lsms_library/countries/Malawi/2010-11/_/data_info.yml +167 -10
- lsms_library/countries/Malawi/2010-11/_/food_acquired.py +17 -10
- lsms_library/countries/Malawi/2010-11/dvc.yaml +1 -0
- lsms_library/countries/Malawi/2010-11/var/.gitkeep +0 -0
- lsms_library/countries/Malawi/2013-14/_/data_info.yml +137 -10
- lsms_library/countries/Malawi/2013-14/_/food_acquired.py +22 -17
- lsms_library/countries/Malawi/2013-14/dvc.yaml +1 -0
- lsms_library/countries/Malawi/2013-14/var/.gitkeep +0 -0
- lsms_library/countries/Malawi/2016-17/_/2016-17.py +1 -1
- lsms_library/countries/Malawi/2016-17/_/data_info.yml +172 -16
- lsms_library/countries/Malawi/2016-17/_/food_acquired.py +13 -9
- lsms_library/countries/Malawi/2016-17/dvc.yaml +1 -0
- lsms_library/countries/Malawi/2016-17/var/.gitkeep +0 -0
- lsms_library/countries/Malawi/2019-20/_/2019-20.py +1 -1
- lsms_library/countries/Malawi/2019-20/_/data_info.yml +167 -17
- lsms_library/countries/Malawi/2019-20/_/food_acquired.py +15 -10
- lsms_library/countries/Malawi/2019-20/dvc.yaml +1 -0
- lsms_library/countries/Malawi/2019-20/var/.gitkeep +0 -0
- lsms_library/countries/Malawi/_/CONTENTS.org +109 -4
- lsms_library/countries/Malawi/_/Makefile +14 -18
- lsms_library/countries/Malawi/_/categorical_mapping.org +97 -0
- lsms_library/countries/Malawi/_/data_scheme.yml +39 -11
- lsms_library/countries/Malawi/_/food_acquired.py +15 -19
- lsms_library/countries/Malawi/_/food_prices_quantities_and_expenditures.py +3 -4
- lsms_library/countries/Malawi/_/malawi.py +82 -21
- lsms_library/countries/Malawi/dvc.yaml +1 -0
- lsms_library/countries/Mali/2014-15/_/2014-15.py +2 -2
- lsms_library/countries/Mali/2014-15/_/data_info.yml +140 -48
- lsms_library/countries/Mali/2017-18/_/2017-18.py +5 -2
- lsms_library/countries/Mali/2017-18/_/data_info.yml +131 -10
- lsms_library/countries/Mali/2018-19/_/2018-19.py +136 -0
- lsms_library/countries/Mali/2018-19/_/data_info.yml +197 -23
- lsms_library/countries/Mali/2021-22/_/2021-22.py +137 -2
- lsms_library/countries/Mali/2021-22/_/data_info.yml +191 -32
- lsms_library/countries/Mali/_/CONTENTS.org +74 -0
- lsms_library/countries/Mali/_/Makefile +18 -0
- lsms_library/countries/Mali/_/categorical_mapping.org +9 -0
- lsms_library/countries/Mali/_/data_scheme.yml +37 -8
- lsms_library/countries/Mali/_/mali.py +10 -10
- lsms_library/countries/Mali/_/panel_ids.json +1 -0
- lsms_library/countries/Mali/_/panel_ids.py +158 -0
- lsms_library/countries/Mali/_/updated_ids.json +1 -0
- lsms_library/countries/Nepal/1995-96/_/data_info.yml +35 -0
- lsms_library/countries/Nepal/2003-04/_/data_info.yml +35 -0
- lsms_library/countries/Nepal/2010-11/_/data_info.yml +25 -0
- lsms_library/countries/Nepal/_/CONTENTS.org +81 -0
- lsms_library/countries/Nepal/_/Makefile +26 -0
- lsms_library/countries/Nepal/_/data_scheme.yml +39 -15
- lsms_library/countries/Nepal/_/nepal.py +7 -0
- lsms_library/countries/Niger/2011-12/_/data_info.yml +140 -0
- lsms_library/countries/Niger/2014-15/_/data_info.yml +146 -0
- lsms_library/countries/Niger/2018-19/_/2018-19.py +154 -0
- lsms_library/countries/Niger/2018-19/_/data_info.yml +249 -0
- lsms_library/countries/Niger/2021-22/Data/calorie_conversion_wa_2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_conso_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_ihpc_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_ihpcreg_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_individu_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_menage_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_nsu_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_ponderations_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_prix_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/ehcvm_welfare_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s00_co_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s00_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s01_co_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s01_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s02_co_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s02_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s03_co_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s03_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s04_co_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s04a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s04b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s04c_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s05_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s06_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s07a_1_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s07a_2_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s07b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s08a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09c_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09d_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09e_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s09f_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s10a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s10b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s11_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s12_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s13_1_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s13_2_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s14a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s14b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s15_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s16a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s16b_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s16c_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s16d_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s17_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s19_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s20a_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s20b_1_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s20b_2_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s20b_3_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Data/s20c_me_ner2021.dta.dvc +5 -0
- lsms_library/countries/Niger/2021-22/Documentation/SOURCE.org +3 -0
- lsms_library/countries/Niger/2021-22/_/2021-22.py +161 -0
- lsms_library/countries/Niger/2021-22/_/data_info.yml +242 -0
- lsms_library/countries/Niger/_/CONTENTS.org +42 -0
- lsms_library/countries/Niger/_/Makefile +17 -0
- lsms_library/countries/Niger/_/categorical_mapping.org +116 -0
- lsms_library/countries/Niger/_/data_scheme.yml +71 -0
- lsms_library/countries/Niger/_/niger.py +148 -13
- lsms_library/countries/Niger/_/panel_ids.json +1 -0
- lsms_library/countries/Niger/_/panel_ids.py +207 -0
- lsms_library/countries/Niger/_/updated_ids.json +1 -0
- lsms_library/countries/Nigeria/2010-11/_/data_info.yml +72 -0
- lsms_library/countries/Nigeria/2010-11/_/food_acquired.py +98 -0
- lsms_library/countries/Nigeria/2010-11/_/household_roster.py +74 -35
- lsms_library/countries/Nigeria/2010-11/_/housing.py +55 -0
- lsms_library/countries/Nigeria/2010-11/_/interview_date.py +2 -2
- lsms_library/countries/Nigeria/2010-11/_/nonfood_expenditures.py +8 -11
- lsms_library/countries/Nigeria/2010-11/_/plots.py +1 -1
- lsms_library/countries/Nigeria/2012-13/_/data_info.yml +98 -0
- lsms_library/countries/Nigeria/2012-13/_/food_acquired.py +90 -0
- lsms_library/countries/Nigeria/2012-13/_/household_roster.py +70 -37
- lsms_library/countries/Nigeria/2012-13/_/housing.py +48 -0
- lsms_library/countries/Nigeria/2012-13/_/individual_unit_values.py +5 -7
- lsms_library/countries/Nigeria/2012-13/_/interview_date.py +2 -2
- lsms_library/countries/Nigeria/2012-13/_/nonfood_expenditures.py +8 -11
- lsms_library/countries/Nigeria/2012-13/_/plots.py +1 -1
- lsms_library/countries/Nigeria/2012-13/_/units.py +7 -9
- lsms_library/countries/Nigeria/2015-16/_/data_info.yml +89 -0
- lsms_library/countries/Nigeria/2015-16/_/food_acquired.py +90 -0
- lsms_library/countries/Nigeria/2015-16/_/household_roster.py +62 -35
- lsms_library/countries/Nigeria/2015-16/_/housing.py +46 -0
- lsms_library/countries/Nigeria/2015-16/_/individual_unit_values.py +5 -7
- lsms_library/countries/Nigeria/2015-16/_/interview_date.py +2 -2
- lsms_library/countries/Nigeria/2015-16/_/nonfood_expenditures.py +8 -11
- lsms_library/countries/Nigeria/2015-16/_/plots.py +1 -1
- lsms_library/countries/Nigeria/2015-16/_/units.py +4 -6
- lsms_library/countries/Nigeria/2018-19/_/data_info.yml +82 -0
- lsms_library/countries/Nigeria/2018-19/_/food_acquired.py +103 -0
- lsms_library/countries/Nigeria/2018-19/_/household_roster.py +64 -35
- lsms_library/countries/Nigeria/2018-19/_/housing.py +61 -0
- lsms_library/countries/Nigeria/2018-19/_/individual_unit_values.py +5 -7
- lsms_library/countries/Nigeria/2018-19/_/interview_date.py +2 -2
- lsms_library/countries/Nigeria/2018-19/_/nonfood_expenditures.py +8 -11
- lsms_library/countries/Nigeria/2018-19/_/plots.py +1 -1
- lsms_library/countries/Nigeria/2018-19/_/units.py +4 -6
- lsms_library/countries/Nigeria/2023-24/_/data_info.yml +39 -0
- lsms_library/countries/Nigeria/2023-24/_/household_roster.py +102 -0
- lsms_library/countries/Nigeria/2023-24/_/housing.py +63 -0
- lsms_library/countries/Nigeria/_/CONTENTS.org +63 -0
- lsms_library/countries/Nigeria/_/Makefile +65 -21
- lsms_library/countries/Nigeria/_/_age_helpers.py +143 -0
- lsms_library/countries/Nigeria/_/categorical_mapping.org +377 -0
- lsms_library/countries/Nigeria/_/data_scheme.yml +69 -0
- lsms_library/countries/Nigeria/_/food_acquired.py +12 -0
- lsms_library/countries/Nigeria/_/household_roster.py +1 -1
- lsms_library/countries/Nigeria/_/housing.py +11 -0
- lsms_library/countries/Nigeria/_/interview_date.py +12 -0
- lsms_library/countries/Nigeria/_/nigeria.py +16 -2
- lsms_library/countries/Pakistan/1991/_/1991.py +11 -0
- lsms_library/countries/Pakistan/1991/_/data_info.yml +81 -0
- lsms_library/countries/Pakistan/_/data_scheme.yml +31 -0
- lsms_library/countries/Panama/1997/_/food_acquired.py +4 -8
- lsms_library/countries/Panama/2003/_/food_acquired.py +3 -8
- lsms_library/countries/Panama/2008/_/food_acquired.py +7 -12
- lsms_library/countries/Panama/_/CONTENTS.org +28 -1
- lsms_library/countries/Panama/_/Makefile +12 -17
- lsms_library/countries/Panama/_/food_acquired.py +1 -6
- lsms_library/countries/Panama/_/nutrition.py +2 -2
- lsms_library/countries/Panama/_/panama.py +44 -10
- lsms_library/countries/Panama/_/units.py +2 -3
- lsms_library/countries/Peru/1994/_/data_info.yml +16 -58
- lsms_library/countries/Peru/_/categorical_mapping.org +101 -0
- lsms_library/countries/Peru/_/data_info.yml +1 -1
- lsms_library/countries/Senegal/2018-19/_/2018-19.py +88 -24
- lsms_library/countries/Senegal/2018-19/_/data_info.yml +215 -21
- lsms_library/countries/Senegal/2018-19/_/food_acquired.py +2 -5
- lsms_library/countries/Senegal/2021-22/Data/calorie_conversion_wa_2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_conso_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_ihpc_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_individu_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_menage_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_nsu_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_nsu_sen2021_nat.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_nsu_sen2021_nat2023.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_ponderations_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_prix_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/ehcvm_welfare_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s00_co_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s00_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s01_co_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s01_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s02_co_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s02_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s03_co_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s03_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s04_co_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s04a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s04b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s04c_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s05_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s06_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s07a_1_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s07a_2_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s07b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s08a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09c_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09d_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09e_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s09f_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s10a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s10b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s11_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s12_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s13_1_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s13_2_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s14a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s14b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s15_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s16a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s16b_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s16c_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s16d_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s17_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s18_1_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s18_2_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s18_3_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s19_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s20a_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s20b_1_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s20b_2_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s20b_3_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/Data/s20c_me_sen2021.dta.dvc +5 -0
- lsms_library/countries/Senegal/2021-22/_/2021-22.py +166 -0
- lsms_library/countries/Senegal/2021-22/_/data_info.yml +241 -0
- lsms_library/countries/Senegal/_/Makefile +18 -17
- lsms_library/countries/Senegal/_/categorical_mapping.org +448 -0
- lsms_library/countries/Senegal/_/contents.org +20 -0
- lsms_library/countries/Senegal/_/data_scheme.yml +57 -2
- lsms_library/countries/Senegal/_/food_acquired.py +1 -4
- lsms_library/countries/Senegal/_/panel_ids.json +1 -0
- lsms_library/countries/Senegal/_/panel_ids.py +113 -0
- lsms_library/countries/Senegal/_/senegal.py +60 -6
- lsms_library/countries/Senegal/_/updated_ids.json +1 -0
- lsms_library/countries/Senegal/dvc.yaml +1 -0
- lsms_library/countries/Serbia/2007/_/2007.py +7 -0
- lsms_library/countries/Serbia/2007/_/data_info.yml +46 -4
- lsms_library/countries/Serbia/2007/_/food_acquired.py +2 -5
- lsms_library/countries/Serbia/_/CONTENTS.org +152 -10
- lsms_library/countries/Serbia/_/Makefile +10 -15
- lsms_library/countries/Serbia/_/data_scheme.yml +19 -3
- lsms_library/countries/Serbia/_/food_acquired.py +1 -6
- lsms_library/countries/Serbia/_/serbia.py +1 -3
- lsms_library/countries/Serbia/dvc.yaml +1 -0
- lsms_library/countries/Serbia and Montenegro/2002/_/2002.py +7 -0
- lsms_library/countries/Serbia and Montenegro/2002/_/data_info.yml +32 -3
- lsms_library/countries/Serbia and Montenegro/2003/_/2003.py +7 -0
- lsms_library/countries/Serbia and Montenegro/2003/_/data_info.yml +32 -2
- lsms_library/countries/Serbia and Montenegro/_/data_scheme.yml +18 -2
- lsms_library/countries/South Africa/1993/_/data_info.yml +46 -4
- lsms_library/countries/South Africa/_/data_scheme.yml +18 -2
- lsms_library/countries/Tajikistan/1999/_/1999.py +7 -0
- lsms_library/countries/Tajikistan/1999/_/data_info.yml +74 -0
- lsms_library/countries/Tajikistan/2003/_/data_info.yml +74 -0
- lsms_library/countries/Tajikistan/2007/_/data_info.yml +74 -0
- lsms_library/countries/Tajikistan/2009/_/data_info.yml +74 -0
- lsms_library/countries/Tajikistan/_/data_scheme.yml +26 -0
- lsms_library/countries/Tanzania/2008-15/_/cluster_features.py +24 -0
- lsms_library/countries/Tanzania/2008-15/_/household_roster.py +39 -0
- lsms_library/countries/Tanzania/2008-15/_/housing.py +45 -0
- lsms_library/countries/Tanzania/2008-15/_/interview_date.py +10 -2
- lsms_library/countries/Tanzania/2008-15/_/sample.py +57 -0
- lsms_library/countries/Tanzania/2008-15/_/shocks.py +53 -59
- lsms_library/countries/Tanzania/2019-20/Documentation/.gitignore +1 -0
- lsms_library/countries/Tanzania/2019-20/Documentation/TZA_2019_NPS-SDD_v06_M.xml.dvc +5 -0
- lsms_library/countries/Tanzania/2019-20/_/2019-20.py +7 -0
- lsms_library/countries/Tanzania/2019-20/_/community_prices.py +4 -8
- lsms_library/countries/Tanzania/2019-20/_/data_info.yml +129 -0
- lsms_library/countries/Tanzania/2019-20/_/finances.py +2 -5
- lsms_library/countries/Tanzania/2019-20/_/interview_date.py +1 -1
- lsms_library/countries/Tanzania/2019-20/_/shocks.py +52 -30
- lsms_library/countries/Tanzania/2020-21/_/2020-21.py +7 -0
- lsms_library/countries/Tanzania/2020-21/_/community_prices.py +6 -10
- lsms_library/countries/Tanzania/2020-21/_/data_info.yml +121 -0
- lsms_library/countries/Tanzania/2020-21/_/finances.py +2 -5
- lsms_library/countries/Tanzania/2020-21/_/interview_date.py +1 -1
- lsms_library/countries/Tanzania/2020-21/_/labor_recent.py +2 -5
- lsms_library/countries/Tanzania/2020-21/_/shocks.py +52 -29
- lsms_library/countries/Tanzania/_/CONTENTS.org +276 -45
- lsms_library/countries/Tanzania/_/Makefile +10 -25
- lsms_library/countries/Tanzania/_/categorical_mapping.org +430 -0
- lsms_library/countries/Tanzania/_/data_scheme.yml +56 -0
- lsms_library/countries/Tanzania/_/food_acquired.py +2 -11
- lsms_library/countries/Tanzania/_/food_expenditures.py +1 -1
- lsms_library/countries/Tanzania/_/food_prices_quantities_and_expenditures.py +4 -4
- lsms_library/countries/Tanzania/_/panel_ids.json +1 -1
- lsms_library/countries/Tanzania/_/panel_ids.py +79 -7
- lsms_library/countries/Tanzania/_/shocks.py +41 -17
- lsms_library/countries/Tanzania/_/tanzania.py +298 -65
- lsms_library/countries/Tanzania/_/updated_ids.json +1 -1
- lsms_library/countries/Tanzania_Kegera/2004-05/Documentation/.gitignore +1 -0
- lsms_library/countries/Tanzania_Kegera/2004-05/Documentation/TZA_2004_KHDS_v01_M.xml.dvc +5 -0
- lsms_library/countries/Timor-Leste/2001/_/data_info.yml +42 -0
- lsms_library/countries/Timor-Leste/2007-08/_/data_info.yml +16 -2
- lsms_library/countries/Timor-Leste/_/data_scheme.yml +15 -2
- lsms_library/countries/Togo/2018/_/2018.py +100 -0
- lsms_library/countries/Togo/2018/_/data_info.yml +246 -7
- lsms_library/countries/Togo/2018/_/food_expenditures.py +2 -5
- lsms_library/countries/Togo/2018/_/nonfood_expenditures.py +1 -3
- lsms_library/countries/Togo/_/CONTENTS.org +34 -0
- lsms_library/countries/Togo/_/Makefile +11 -15
- lsms_library/countries/Togo/_/data_scheme.yml +52 -2
- lsms_library/countries/Togo/_/togo.py +114 -26
- lsms_library/countries/Togo/dvc.yaml +1 -0
- lsms_library/countries/Uganda/2005-06/Data/2009_UNPS_Geovars_0910.dta.dvc +5 -0
- lsms_library/countries/Uganda/2005-06/_/assets.py +15 -9
- lsms_library/countries/Uganda/2005-06/_/data_info.yml +38 -3
- lsms_library/countries/Uganda/2005-06/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2005-06/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2005-06/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2005-06/_/plots.py +1 -1
- lsms_library/countries/Uganda/2005-06/_/shocks.py +9 -13
- lsms_library/countries/Uganda/2009-10/_/2009-10.py +45 -0
- lsms_library/countries/Uganda/2009-10/_/assets.py +15 -9
- lsms_library/countries/Uganda/2009-10/_/data_info.yml +96 -15
- lsms_library/countries/Uganda/2009-10/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2009-10/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2009-10/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2009-10/_/plots.py +1 -1
- lsms_library/countries/Uganda/2009-10/_/shocks.py +10 -14
- lsms_library/countries/Uganda/2010-11/_/2010-11.py +28 -0
- lsms_library/countries/Uganda/2010-11/_/assets.py +15 -9
- lsms_library/countries/Uganda/2010-11/_/data_info.yml +61 -5
- lsms_library/countries/Uganda/2010-11/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2010-11/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2010-11/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2010-11/_/plots.py +1 -1
- lsms_library/countries/Uganda/2010-11/_/shocks.py +10 -14
- lsms_library/countries/Uganda/2011-12/_/2011-12.py +24 -0
- lsms_library/countries/Uganda/2011-12/_/assets.py +15 -9
- lsms_library/countries/Uganda/2011-12/_/data_info.yml +57 -4
- lsms_library/countries/Uganda/2011-12/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2011-12/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2011-12/_/plots.py +1 -1
- lsms_library/countries/Uganda/2011-12/_/shocks.py +10 -14
- lsms_library/countries/Uganda/2013-14/Data/unps_geovars_2013_14.dta.dvc +5 -0
- lsms_library/countries/Uganda/2013-14/_/2013-14.py +30 -0
- lsms_library/countries/Uganda/2013-14/_/assets.py +15 -9
- lsms_library/countries/Uganda/2013-14/_/data_info.yml +41 -0
- lsms_library/countries/Uganda/2013-14/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2013-14/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2013-14/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2013-14/_/plots.py +1 -1
- lsms_library/countries/Uganda/2013-14/_/shocks.py +10 -14
- lsms_library/countries/Uganda/2015-16/Data/unps_geovars_2015_16.dta.dvc +5 -0
- lsms_library/countries/Uganda/2015-16/_/2015-16.py +26 -0
- lsms_library/countries/Uganda/2015-16/_/assets.py +15 -9
- lsms_library/countries/Uganda/2015-16/_/data_info.yml +37 -0
- lsms_library/countries/Uganda/2015-16/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2015-16/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2015-16/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2015-16/_/nonfood_expenditures.py +2 -5
- lsms_library/countries/Uganda/2015-16/_/plots.py +1 -1
- lsms_library/countries/Uganda/2015-16/_/shocks.py +12 -16
- lsms_library/countries/Uganda/2018-19/Data/unps_geovars_2018_19.dta.dvc +5 -0
- lsms_library/countries/Uganda/2018-19/_/2018-19.py +27 -0
- lsms_library/countries/Uganda/2018-19/_/assets.py +15 -9
- lsms_library/countries/Uganda/2018-19/_/data_info.yml +39 -1
- lsms_library/countries/Uganda/2018-19/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2018-19/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2018-19/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2018-19/_/plots.py +1 -1
- lsms_library/countries/Uganda/2018-19/_/shocks.py +12 -17
- lsms_library/countries/Uganda/2019-20/Documentation/LICENSE.org +28 -0
- lsms_library/countries/Uganda/2019-20/_/2019-20.py +25 -0
- lsms_library/countries/Uganda/2019-20/_/assets.py +16 -10
- lsms_library/countries/Uganda/2019-20/_/data_info.yml +47 -1
- lsms_library/countries/Uganda/2019-20/_/earnings.py +2 -5
- lsms_library/countries/Uganda/2019-20/_/education_expenses.py +2 -5
- lsms_library/countries/Uganda/2019-20/_/enterprise_income.py +2 -5
- lsms_library/countries/Uganda/2019-20/_/plots.py +1 -1
- lsms_library/countries/Uganda/2019-20/_/shocks.py +10 -13
- lsms_library/countries/Uganda/TODO +33 -0
- lsms_library/countries/Uganda/_/CONTENTS.org +226 -0
- lsms_library/countries/Uganda/_/Makefile +23 -24
- lsms_library/countries/Uganda/_/_age_helpers.py +141 -0
- lsms_library/countries/Uganda/_/assets.py +5 -5
- lsms_library/countries/Uganda/_/categorical_mapping.org +70 -0
- lsms_library/countries/Uganda/_/data_scheme.yml +47 -15
- lsms_library/countries/Uganda/_/earnings.py +4 -10
- lsms_library/countries/Uganda/_/enterprise_income.py +5 -11
- lsms_library/countries/Uganda/_/fct_addition.py +1 -1
- lsms_library/countries/Uganda/_/food_acquired.py +2 -7
- lsms_library/countries/Uganda/_/food_prices_quantities_and_expenditures.py +17 -11
- lsms_library/countries/Uganda/_/income.py +8 -1
- lsms_library/countries/Uganda/_/interview_date.py +3 -11
- lsms_library/countries/Uganda/_/nonfood_expenditures.py +6 -7
- lsms_library/countries/Uganda/_/nonfood_label.py +3 -2
- lsms_library/countries/Uganda/_/nutrition.py +1 -1
- lsms_library/countries/Uganda/_/regions_are_markets.py +2 -2
- lsms_library/countries/Uganda/_/shocks.py +2 -10
- lsms_library/countries/Uganda/_/uganda.py +154 -105
- lsms_library/countries/Uganda/dvc.yaml +1 -0
- lsms_library/countries/dvc.yaml +1 -0
- lsms_library/country.py +2638 -319
- lsms_library/data_access.py +1329 -0
- lsms_library/data_info.yml +123 -6
- lsms_library/demands.py +54 -14
- lsms_library/diagnostics.py +1463 -0
- lsms_library/dvc_permissions.py +73 -17
- lsms_library/feature.py +151 -0
- lsms_library/local_tools.py +775 -235
- lsms_library/paths.py +178 -0
- lsms_library/transformations.py +566 -18
- lsms_library/util/__init__.py +15 -0
- lsms_library/util/generate_dvc_stages.py +300 -0
- lsms_library/util/geo_audit.py +621 -0
- lsms_library/util/run_stage.py +126 -0
- lsms_library/yaml_utils.py +54 -0
- lsms_library-0.7.1.dist-info/METADATA +172 -0
- {lsms_library-0.2.10.dev0.dist-info → lsms_library-0.7.1.dist-info}/RECORD +863 -550
- {lsms_library-0.2.10.dev0.dist-info → lsms_library-0.7.1.dist-info}/WHEEL +1 -1
- lsms_library-0.7.1.dist-info/entry_points.txt +3 -0
- lsms_library/categorical_mapping/spelling.yml +0 -2
- lsms_library/countries/Afghanistan/2016-17/_/household_characteristics.py +0 -26
- lsms_library/countries/Afghanistan/_/household_characteristics.py +0 -12
- lsms_library/countries/Azerbaijan/1995/Documentation /abstracte.pdf +0 -0
- lsms_library/countries/Azerbaijan/1995/Documentation /abstractr.pdf +0 -0
- lsms_library/countries/Azerbaijan/1995/Documentation /ppabse.pdf +0 -0
- lsms_library/countries/Azerbaijan/1995/Documentation /ppabsr.pdf +0 -28214
- lsms_library/countries/Azerbaijan/1995/Documentation /queshhe.pdf +0 -0
- lsms_library/countries/Azerbaijan/1995/Documentation /quespope.pdf +0 -0
- lsms_library/countries/Bulgaria/1995/Documentation/BG95SUM.LOG +0 -8834
- lsms_library/countries/Burkina_Faso/2014/_/household_characteristics.py +0 -54
- lsms_library/countries/Burkina_Faso/2014/_/other_features.py +0 -23
- lsms_library/countries/Burkina_Faso/2018-19/_/household_characteristics.py +0 -47
- lsms_library/countries/Burkina_Faso/2018-19/_/other_features.py +0 -26
- lsms_library/countries/Burkina_Faso/2021-22/_/household_characteristics.py +0 -46
- lsms_library/countries/Burkina_Faso/2021-22/_/other_features.py +0 -27
- lsms_library/countries/Burkina_Faso/_/household_characteristics.py +0 -16
- lsms_library/countries/Burkina_Faso/_/other_features.py +0 -19
- lsms_library/countries/Cambodia/2019-20/_/household_characteristics.py +0 -27
- lsms_library/countries/Cambodia/2019-20/_/other_features.py +0 -22
- lsms_library/countries/Cambodia/_/household_characteristics.py +0 -12
- lsms_library/countries/Cambodia/_/other_features.py +0 -20
- lsms_library/countries/CotedIvoire/1985-86/_/household_characteristics.py +0 -22
- lsms_library/countries/CotedIvoire/1986-87/_/household_characteristics.py +0 -24
- lsms_library/countries/CotedIvoire/1987-88/_/household_characteristics.py +0 -24
- lsms_library/countries/CotedIvoire/1988-89/_/household_characteristics.py +0 -24
- lsms_library/countries/CotedIvoire/2018-19/_/household_characteristics.py +0 -86
- lsms_library/countries/Ethiopia/2011-12/_/household_characteristics.py +0 -23
- lsms_library/countries/Ethiopia/2011-12/_/other_features.py +0 -31
- lsms_library/countries/Ethiopia/2013-14/_/household_characteristics.py +0 -23
- lsms_library/countries/Ethiopia/2013-14/_/other_features.py +0 -31
- lsms_library/countries/Ethiopia/2015-16/Documentation/SOURCE +0 -3
- lsms_library/countries/Ethiopia/2015-16/_/household_characteristics.py +0 -23
- lsms_library/countries/Ethiopia/2015-16/_/other_features.py +0 -31
- lsms_library/countries/Ethiopia/2018-19/_/household_characteristics.py +0 -24
- lsms_library/countries/Ethiopia/2018-19/_/other_features.py +0 -31
- lsms_library/countries/Ethiopia/_/household_characteristics.py +0 -50
- lsms_library/countries/Ethiopia/_/other_features.py +0 -66
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/Aggregat.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3DEOMAN.DOC +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3INTMAN.DOC +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPartA.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPartB.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3QPrice.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3REPORT.DOC +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3SUPMAN.DOC +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3USERSG.DOC +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/G3qcomm.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/Povprof.doc +0 -0
- lsms_library/countries/GhanaLSS/1991-92/Documentation/Glss3 qsts and manuals docs/overview_glss3.doc +0 -0
- lsms_library/countries/GhanaLSS/2012-13/Documentation/Notes on how glss6 compares with other glss.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/7GLSS7 SECTION 10.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/7GLSS7_Community Quest.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/COVER PAGE _PRICE.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/DIARY.doc +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7 Final Manual.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7_MODULE A_30_9_16_for print.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GLSS7_MODULE B _14_10_16.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/GPS Module 13_28_4_17.docx +0 -0
- lsms_library/countries/GhanaLSS/2016-17/Documentation/Supervisors' manual_GLSS7.doc +0 -0
- lsms_library/countries/GhanaLSS/_/household_characteristics.py +0 -51
- lsms_library/countries/GhanaLSS/_/other_features.py +0 -54
- lsms_library/countries/GhanaSPS/2009-10/_/household_characteristics.py +0 -25
- lsms_library/countries/GhanaSPS/2009-10/_/other_features.py +0 -27
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Community Survey_WAVE II.docx +0 -0
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Part A_WAVE II.docx +0 -0
- lsms_library/countries/GhanaSPS/2013-14/Documentation/ISSER_Yale_Part B_WAVE II.docx +0 -0
- lsms_library/countries/GhanaSPS/2013-14/_/household_characteristics.py +0 -24
- lsms_library/countries/GhanaSPS/2013-14/_/other_features.py +0 -31
- lsms_library/countries/GhanaSPS/2017-18/Documentation/Questionnaire/HH_Questionnaire_23_10.docx +0 -0
- lsms_library/countries/GhanaSPS/2017-18/_/household_characteristics.py +0 -24
- lsms_library/countries/GhanaSPS/2017-18/_/other_features.py +0 -28
- lsms_library/countries/GhanaSPS/_/household_characteristics.py +0 -51
- lsms_library/countries/GhanaSPS/_/other_features.py +0 -50
- lsms_library/countries/Guatemala/2000/_/household_characteristics.py +0 -29
- lsms_library/countries/Guatemala/2000/_/other_features.py +0 -35
- lsms_library/countries/Guatemala/_/household_characteristics.py +0 -26
- lsms_library/countries/Guatemala/_/other_features.py +0 -17
- lsms_library/countries/Malawi/2004-05/_/household_characteristics.py +0 -26
- lsms_library/countries/Malawi/2004-05/_/other_features.py +0 -18
- lsms_library/countries/Malawi/2010-11/_/household_characteristics.py +0 -19
- lsms_library/countries/Malawi/2010-11/_/other_features.py +0 -20
- lsms_library/countries/Malawi/2013-14/_/household_characteristics.py +0 -19
- lsms_library/countries/Malawi/2013-14/_/other_features.py +0 -23
- lsms_library/countries/Malawi/2016-17/_/household_characteristics.py +0 -20
- lsms_library/countries/Malawi/2016-17/_/other_features.py +0 -28
- lsms_library/countries/Malawi/2019-20/_/household_characteristics.py +0 -20
- lsms_library/countries/Malawi/2019-20/_/other_features.py +0 -29
- lsms_library/countries/Malawi/_/household_characteristics.py +0 -24
- lsms_library/countries/Malawi/_/other_features.py +0 -17
- lsms_library/countries/Niger/2018-19/_/household_characteristics.py +0 -40
- lsms_library/countries/Nigeria/2010-11/_/food_expenditures.py +0 -185
- lsms_library/countries/Nigeria/2012-13/_/food_expenditures.py +0 -167
- lsms_library/countries/Nigeria/2015-16/_/food_expenditures.py +0 -168
- lsms_library/countries/Nigeria/2018-19/_/food_expenditures.py +0 -176
- lsms_library/countries/Nigeria/_/food_expenditures.py +0 -24
- lsms_library/countries/Nigeria/_/food_items.json +0 -1
- lsms_library/countries/Nigeria/_/food_items.org +0 -420
- lsms_library/countries/Nigeria/_/food_items0.org +0 -138
- lsms_library/countries/Nigeria/_/household_characteristics.py +0 -11
- lsms_library/countries/Panama/1997/_/household_characteristics.py +0 -35
- lsms_library/countries/Panama/1997/_/other_features.py +0 -26
- lsms_library/countries/Panama/2003/_/household_characteristics.py +0 -36
- lsms_library/countries/Panama/2003/_/other_features.py +0 -27
- lsms_library/countries/Panama/2008/_/household_characteristics.py +0 -36
- lsms_library/countries/Panama/2008/_/other_features.py +0 -30
- lsms_library/countries/Panama/_/household_characteristics.py +0 -22
- lsms_library/countries/Panama/_/other_features.py +0 -22
- lsms_library/countries/Senegal/2018-19/_/household_characteristics.py +0 -42
- lsms_library/countries/Senegal/2018-19/_/other_features.py +0 -30
- lsms_library/countries/Senegal/_/household_characteristics.py +0 -25
- lsms_library/countries/Senegal/_/other_features.py +0 -17
- lsms_library/countries/Serbia/2007/_/household_characteristics.py +0 -28
- lsms_library/countries/Serbia/2007/_/other_features.py +0 -24
- lsms_library/countries/Serbia/_/household_characteristics.py +0 -24
- lsms_library/countries/Serbia/_/other_features.py +0 -20
- lsms_library/countries/Tanzania/2008-15/_/household_characteristics.py +0 -58
- lsms_library/countries/Tanzania/2008-15/_/other_features.py +0 -27
- lsms_library/countries/Tanzania/2019-20/Documentation/TZA_2019_NPS-SDD_v06_M.xml +0 -87449
- lsms_library/countries/Tanzania/2019-20/_/household_characteristics.py +0 -32
- lsms_library/countries/Tanzania/2019-20/_/other_features.py +0 -40
- lsms_library/countries/Tanzania/2020-21/_/household_characteristics.py +0 -31
- lsms_library/countries/Tanzania/2020-21/_/other_features.py +0 -25
- lsms_library/countries/Tanzania/_/household_characteristics.py +0 -48
- lsms_library/countries/Tanzania/_/other_features.py +0 -34
- lsms_library/countries/Tanzania_Kegera/2004-05/Documentation/TZA_2004_KHDS_v01_M.xml +0 -83466
- lsms_library/countries/Togo/2018/_/household_characteristics.py +0 -50
- lsms_library/countries/Uganda/2005-06/_/household_characteristics.py +0 -20
- lsms_library/countries/Uganda/2005-06/_/housing.py +0 -29
- lsms_library/countries/Uganda/2005-06/_/other_features.py +0 -37
- lsms_library/countries/Uganda/2009-10/_/household_characteristics.py +0 -17
- lsms_library/countries/Uganda/2009-10/_/housing.py +0 -31
- lsms_library/countries/Uganda/2009-10/_/other_features.py +0 -36
- lsms_library/countries/Uganda/2010-11/_/household_characteristics.py +0 -17
- lsms_library/countries/Uganda/2010-11/_/housing.py +0 -32
- lsms_library/countries/Uganda/2010-11/_/other_features.py +0 -36
- lsms_library/countries/Uganda/2011-12/_/household_characteristics.py +0 -17
- lsms_library/countries/Uganda/2011-12/_/housing.py +0 -31
- lsms_library/countries/Uganda/2011-12/_/other_features.py +0 -36
- lsms_library/countries/Uganda/2013-14/_/household_characteristics.py +0 -17
- lsms_library/countries/Uganda/2013-14/_/housing.py +0 -31
- lsms_library/countries/Uganda/2013-14/_/other_features.py +0 -37
- lsms_library/countries/Uganda/2015-16/_/household_characteristics.py +0 -19
- lsms_library/countries/Uganda/2015-16/_/housing.py +0 -33
- lsms_library/countries/Uganda/2015-16/_/other_features.py +0 -35
- lsms_library/countries/Uganda/2018-19/_/household_characteristics.py +0 -23
- lsms_library/countries/Uganda/2018-19/_/housing.py +0 -32
- lsms_library/countries/Uganda/2018-19/_/other_features.py +0 -31
- lsms_library/countries/Uganda/2019-20/_/household_characteristics.py +0 -20
- lsms_library/countries/Uganda/2019-20/_/housing.py +0 -31
- lsms_library/countries/Uganda/2019-20/_/other_features.py +0 -36
- lsms_library/countries/Uganda/_/household_characteristics.py +0 -39
- lsms_library/countries/Uganda/_/housing.py +0 -36
- lsms_library/countries/Uganda/_/other_features.py +0 -51
- lsms_library-0.2.10.dev0.dist-info/METADATA +0 -290
- /lsms_library/countries/Albania/2008/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Albania/2012/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Azerbaijan/1995/{Documentation /LICENSE .org → Documentation/LICENSE.org} +0 -0
- /lsms_library/countries/Azerbaijan/1995/{Documentation → Documentation}/SOURCE.org +0 -0
- /lsms_library/countries/Burkina_Faso/2014/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Burkina_Faso/2014/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Burkina_Faso/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Burkina_Faso/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Burkina_Faso/2021-22/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Burkina_Faso/2021-22/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Cambodia/2019-20/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Cambodia/2019-20/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/China/1995-97/Documentation/{LICENSE .org → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1985-86/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1985-86/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1986-87/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1986-87/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1987-88/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1987-88/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1988-89/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/1988-89/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/CotedIvoire/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/CotedIvoire/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Ethiopia/2011-12/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Ethiopia/2013-14/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Ethiopia/2015-16/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Ethiopia/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Ethiopia/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1987-88/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1987-88/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1988-89/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1988-89/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1991-92/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1991-92/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1998-99/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/1998-99/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2005-06/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2005-06/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2012-13/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2012-13/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2016-17/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaLSS/2016-17/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/GhanaSPS/2009-10/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/GhanaSPS/2009-10/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Liberia/2018-19/Documentation/{LICENSE .org → LICENSE.org} +0 -0
- /lsms_library/countries/Liberia/2018-19/Documentation/{Reports .org → Reports.org} +0 -0
- /lsms_library/countries/Malawi/2004-05/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Malawi/2004-05/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Malawi/2010-11/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Malawi/2010-11/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Malawi/2013-14/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Malawi/2013-14/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Malawi/2016-17/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Malawi/2016-17/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Malawi/2019-20/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Malawi/2019-20/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Mali/2014-15/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Mali/2014-15/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Mali/2017-18/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Mali/2017-18/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Mali/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Mali/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Mali/2021-22/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Mali/2021-22/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nepal/1995-96/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nepal/2003-04/Documentation/{Source .org → Source.org} +0 -0
- /lsms_library/countries/Niger/2014-15/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Niger/2014-15/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Niger/2018-19/Documentation/{LICENSE .org → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2010-11/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2010-11/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nigeria/2012-13/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2012-13/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nigeria/2015-16/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2015-16/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nigeria/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Nigeria/2023-24/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Nigeria/2023-24/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Rwanda/2000-01/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Rwanda/2005-06/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Tanzania/2008-15/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Tanzania/2008-15/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Tanzania/2019-20/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Tanzania/2019-20/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Tanzania/2020-21/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Tanzania/2020-21/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Tanzania_Kegera/2004-05/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Tanzania_Kegera/2004-05/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Tanzania_Kegera/2010-11/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Tanzania_Kegera/2010-11/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Togo/2018/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Togo/2018/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2005-06/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2005-06/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2009-10/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2009-10/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2010-11/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2010-11/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2011-12/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2011-12/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2013-14/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2013-14/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2015-16/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2015-16/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2018-19/Documentation/{LICENSE → LICENSE.org} +0 -0
- /lsms_library/countries/Uganda/2018-19/Documentation/{SOURCE → SOURCE.org} +0 -0
- /lsms_library/countries/Uganda/2019-20/Documentation/{SOURCE → SOURCE.org} +0 -0
- {lsms_library-0.2.10.dev0.dist-info → lsms_library-0.7.1.dist-info/licenses}/LICENSE.txt +0 -0
lsms_library/ISSUES.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Open Issues
|
|
2
|
+
|
|
3
|
+
Items that need attention. Resolved items are removed; use `git log` for history.
|
|
4
|
+
Actionable items should also be filed on GitHub (`gh issue list --repo ligon/LSMS_Library`).
|
|
5
|
+
## 2026-04-12 14:02:27Z Nepal – sample
|
|
6
|
+
|
|
7
|
+
- Waves: 1995-96, 2003-04, 2010-11
|
|
8
|
+
- Error: `PathMissingError: The path '/home/ligon/Projects/LSMS_Library/lsms_library/countries/Nepal/1995-96/Data/../Data/c1_nlss_public.dta' does not exist in the target repository '/home/ligon/Projects/LSMS_Library/lsms_library/countries/Nepal/1995-96/Data/../Data/c1_nlss_public.dta' neither as a DVC output nor as a Git-tracked file.`
|
|
9
|
+
|
lsms_library/Makefile
CHANGED
|
@@ -4,21 +4,42 @@
|
|
|
4
4
|
|
|
5
5
|
.SILENT: help
|
|
6
6
|
|
|
7
|
+
empty :=
|
|
8
|
+
space := $(empty) $(empty)
|
|
9
|
+
|
|
10
|
+
PYTHON ?= python3
|
|
11
|
+
DVC ?= $(PYTHON) -m dvc
|
|
12
|
+
format ?= parquet
|
|
13
|
+
|
|
14
|
+
slug = $(shell printf '%s' "$(1)" | tr '[:upper:]' '[:lower:]' | tr ' -' '__')
|
|
15
|
+
DEFAULT_WAVE_RAW := $(if $(strip $(wave)),$(firstword $(wave)),all_waves)
|
|
16
|
+
DEFAULT_WAVE := $(subst $(space),_,$(strip $(DEFAULT_WAVE_RAW)))
|
|
17
|
+
OUT_FILE ?= countries/build/$(country)/$(DEFAULT_WAVE)/$(table).$(format)
|
|
18
|
+
stage_name = $(call slug,$(country))_$(call slug,$(DEFAULT_WAVE_RAW))_$(call slug,$(table))
|
|
19
|
+
|
|
20
|
+
|
|
7
21
|
COUNTRIES := $(shell ls .. | grep -e ^[A-Z] | grep / | sed -e 's/\//,/g')
|
|
8
22
|
|
|
9
23
|
help:
|
|
10
24
|
echo "USAGE:"
|
|
11
|
-
echo "Either <test> or <build> datasets or estimate <demands>"
|
|
25
|
+
echo "Either <test> or <build> datasets, <materialize>/<persist> tables, <register> stages, or estimate <demands>"
|
|
12
26
|
echo "for a particular country using, e.g.,"
|
|
13
27
|
echo " make test country=Malawi"
|
|
14
28
|
echo "or"
|
|
15
29
|
echo " make build country=Malawi"
|
|
16
30
|
echo "or"
|
|
17
|
-
echo " make demands country=Malawi"
|
|
31
|
+
echo " make demands country=Malawi market=Region"
|
|
32
|
+
echo "or"
|
|
33
|
+
echo " make materialize country=Malawi wave=2019-20 table=household_roster"
|
|
34
|
+
echo "or"
|
|
35
|
+
echo " make persist country=Malawi wave=2019-20 table=household_roster"
|
|
36
|
+
echo "or"
|
|
37
|
+
echo " make register country=Uganda wave=2023-24 table=household_roster"
|
|
18
38
|
echo ""
|
|
19
39
|
echo "where country is one of:"
|
|
20
40
|
echo $(COUNTRIES)
|
|
21
41
|
|
|
42
|
+
|
|
22
43
|
build:
|
|
23
44
|
echo $(country)
|
|
24
45
|
+make -C ../$(country)/_
|
|
@@ -26,8 +47,26 @@ build:
|
|
|
26
47
|
test:
|
|
27
48
|
./harmony.py $(country)
|
|
28
49
|
|
|
29
|
-
|
|
30
|
-
|
|
50
|
+
materialize:
|
|
51
|
+
$(PYTHON) -m lsms_library.cli materialize \
|
|
52
|
+
$(if $(strip $(wave)),$(foreach w,$(wave),--wave $(w) ),$(if $(strip $(all_waves)),--all-waves ,))\
|
|
53
|
+
--country $(country) \
|
|
54
|
+
--table $(table) \
|
|
55
|
+
--format $(format) \
|
|
56
|
+
--out $(OUT_FILE)
|
|
57
|
+
|
|
58
|
+
register:
|
|
59
|
+
$(PYTHON) -m lsms_library.cli register \
|
|
60
|
+
--country $(country) \
|
|
61
|
+
--wave $(wave) \
|
|
62
|
+
--table $(table) \
|
|
63
|
+
--format $(format)
|
|
64
|
+
|
|
65
|
+
persist:
|
|
66
|
+
cd countries && $(DVC) repro materialize@$(stage_name)
|
|
67
|
+
|
|
68
|
+
demands:
|
|
69
|
+
$(PYTHON) -m lsms_library.demands $(country) $(if $(market),--market $(market),)
|
|
31
70
|
|
|
32
71
|
clean:
|
|
33
72
|
+make -C ../$(country)/_ clean
|
lsms_library/__init__.py
CHANGED
|
@@ -1,13 +1,211 @@
|
|
|
1
|
+
"""LSMS Library: a harmonized interface to Living Standards Measurement Study data.
|
|
2
|
+
|
|
3
|
+
The library provides a uniform API across 40+ LSMS-ISA and related
|
|
4
|
+
household surveys from the World Bank Microdata Library. Its design
|
|
5
|
+
principle is to harmonize the *interface*, not the data: surveys differ
|
|
6
|
+
in structure, and the library preserves survey-specific detail while
|
|
7
|
+
offering a common way to read it.
|
|
8
|
+
|
|
9
|
+
Typical usage
|
|
10
|
+
-------------
|
|
11
|
+
Instantiate a :class:`Country` and call its table methods as attributes.
|
|
12
|
+
Table names (``food_acquired``, ``household_roster``, ``shocks``, ...)
|
|
13
|
+
come from the country's ``data_scheme.yml``.
|
|
14
|
+
|
|
15
|
+
.. code-block:: python
|
|
16
|
+
|
|
17
|
+
import lsms_library as ll
|
|
18
|
+
|
|
19
|
+
uga = ll.Country('Uganda')
|
|
20
|
+
uga.waves # ['2005-06', '2009-10', ...]
|
|
21
|
+
uga.data_scheme # ['household_roster', 'food_acquired', ...]
|
|
22
|
+
|
|
23
|
+
roster = uga.household_roster() # harmonized DataFrame across waves
|
|
24
|
+
food = uga.food_expenditures() # derived from food_acquired
|
|
25
|
+
chars = uga.household_characteristics() # derived from household_roster
|
|
26
|
+
|
|
27
|
+
:class:`Feature` assembles the same table across every country that
|
|
28
|
+
declares it, with a ``country`` index level prepended:
|
|
29
|
+
|
|
30
|
+
.. code-block:: python
|
|
31
|
+
|
|
32
|
+
df = ll.Feature('household_roster')() # every country
|
|
33
|
+
df = ll.Feature('shocks')(['Ethiopia', 'Niger']) # subset
|
|
34
|
+
|
|
35
|
+
Returned DataFrames are indexed by some subset of ``(country, t, v, i,
|
|
36
|
+
pid, j)`` — wave (``t``), cluster (``v``), household (``i``), person
|
|
37
|
+
(``pid``), item (``j``) — depending on the table.
|
|
38
|
+
|
|
39
|
+
Public API
|
|
40
|
+
----------
|
|
41
|
+
- :class:`Country` — top-level per-country interface. Exposes ``waves``,
|
|
42
|
+
``data_scheme``, and one method per table in the scheme. Derived
|
|
43
|
+
tables (``household_characteristics``, ``food_expenditures``,
|
|
44
|
+
``food_prices``, ``food_quantities``) are dispatched via
|
|
45
|
+
``__getattr__`` without needing to be in ``data_scheme.yml``.
|
|
46
|
+
- :class:`Wave` — single-wave view of a country, used internally by
|
|
47
|
+
:class:`Country` but occasionally handy for debugging.
|
|
48
|
+
- :class:`Feature` — cross-country aggregator for a given table name.
|
|
49
|
+
- ``tools`` (alias for :mod:`lsms_library.local_tools`) — ``get_dataframe``
|
|
50
|
+
for reading ``.dta``/``.csv``/``.parquet`` with local → DVC → WB NADA
|
|
51
|
+
fallback, ``to_parquet`` for writing caches under ``data_root()``, and
|
|
52
|
+
the ``df_data_grabber`` helper used by wave-level scripts.
|
|
53
|
+
- :func:`authenticate` — interactive DVC/S3 credential unlock. Usually
|
|
54
|
+
runs automatically on import when a World Bank Microdata API key is
|
|
55
|
+
available.
|
|
56
|
+
- :mod:`lsms_library.transformations` — derivation helpers for
|
|
57
|
+
roster-to-characteristics and food-to-expenditures.
|
|
58
|
+
|
|
59
|
+
Data access and caching
|
|
60
|
+
-----------------------
|
|
61
|
+
Reads use a fallback chain: local file on disk → DVC filesystem → World
|
|
62
|
+
Bank NADA download. Parquet caches are written under ``data_root()``,
|
|
63
|
+
which defaults to ``~/.local/share/lsms_library/{Country}/`` and can be
|
|
64
|
+
overridden via ``LSMS_DATA_DIR`` or the ``data_dir`` key in
|
|
65
|
+
``~/.config/lsms_library/config.yml``.
|
|
66
|
+
|
|
67
|
+
As of v0.7.0, :meth:`Country` methods check the parquet cache before
|
|
68
|
+
consulting DVC, giving 10–17× cross-process speedups. The cache has no
|
|
69
|
+
automatic staleness check — set ``LSMS_NO_CACHE=1`` or run
|
|
70
|
+
``lsms-library cache clear --country {Country}`` after editing source
|
|
71
|
+
configs or scripts.
|
|
72
|
+
|
|
73
|
+
Environment variables
|
|
74
|
+
---------------------
|
|
75
|
+
- ``MICRODATA_API_KEY`` — World Bank Microdata Library API key (also
|
|
76
|
+
readable from ``~/.config/lsms_library/config.yml``). Required for
|
|
77
|
+
direct downloads; also unlocks the S3 read cache at import time.
|
|
78
|
+
- ``LSMS_DATA_DIR`` — override the parquet cache root.
|
|
79
|
+
- ``LSMS_NO_CACHE`` — disable the v0.7.0 top-of-function cache read.
|
|
80
|
+
- ``LSMS_BUILD_BACKEND=make`` — force rebuild from source, bypassing
|
|
81
|
+
both the cache and the DVC stage layer.
|
|
82
|
+
- ``LSMS_SKIP_AUTH`` — suppress the import-time authentication attempt.
|
|
83
|
+
|
|
84
|
+
Further reading
|
|
85
|
+
---------------
|
|
86
|
+
- ``CLAUDE.md`` at the repository root for contributor-facing design
|
|
87
|
+
notes, the canonical schema (``lsms_library/data_info.yml``), and the
|
|
88
|
+
list of cross-cutting gotchas.
|
|
89
|
+
- ``.claude/skills/add-feature/`` for adding a new table to a country,
|
|
90
|
+
with sub-skills for ``sample``, ``shocks``, ``assets``,
|
|
91
|
+
``panel-ids``, ``food-acquired``, and ``pp-ph`` (post-planting /
|
|
92
|
+
post-harvest countries).
|
|
93
|
+
- ``CONTRIBUTING.org`` for the new-wave workflow.
|
|
94
|
+
|
|
95
|
+
Data terms of use
|
|
96
|
+
-----------------
|
|
97
|
+
Underlying microdata must be obtained from the World Bank Microdata
|
|
98
|
+
Library (https://microdata.worldbank.org/) under their terms of use.
|
|
99
|
+
The library's S3 bucket is a read cache over the authoritative WB NADA
|
|
100
|
+
downloads, unlocked automatically when a valid API key is present.
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
from importlib.metadata import PackageNotFoundError
|
|
104
|
+
from importlib.metadata import version as _get_version
|
|
105
|
+
|
|
106
|
+
try:
|
|
107
|
+
__version__ = _get_version("LSMS_Library")
|
|
108
|
+
except PackageNotFoundError:
|
|
109
|
+
__version__ = "0.0.0"
|
|
110
|
+
del _get_version
|
|
111
|
+
|
|
112
|
+
from pathlib import Path
|
|
113
|
+
import os
|
|
114
|
+
import warnings
|
|
115
|
+
|
|
116
|
+
import logging
|
|
117
|
+
from sys import stderr
|
|
1
118
|
from . import country
|
|
2
|
-
from .
|
|
119
|
+
from .country import Country, Wave
|
|
120
|
+
from .feature import Feature
|
|
3
121
|
from . import local_tools as tools
|
|
4
|
-
from .categorical_mapping import ai_agent
|
|
5
122
|
from . import transformations
|
|
6
123
|
from .dvc_permissions import authenticate
|
|
124
|
+
try:
|
|
125
|
+
from dvc.ui import ui as dvc_ui
|
|
126
|
+
from dvc.logger import LoggerHandler, setup as dvc_log_setup
|
|
127
|
+
from functools import wraps
|
|
128
|
+
import sys
|
|
7
129
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
130
|
+
if hasattr(dvc_ui, "rich_console"):
|
|
131
|
+
try:
|
|
132
|
+
dvc_ui.rich_console.file = stderr
|
|
133
|
+
except (AttributeError, ImportError):
|
|
134
|
+
# Defensive against DVC rich-console API drift; programmer bugs
|
|
135
|
+
# (TypeError, NameError) propagate.
|
|
136
|
+
pass
|
|
137
|
+
if hasattr(dvc_ui, "error_console"):
|
|
138
|
+
try:
|
|
139
|
+
dvc_ui.error_console.file = stderr
|
|
140
|
+
except (AttributeError, ImportError):
|
|
141
|
+
# Defensive against DVC rich-console API drift.
|
|
142
|
+
pass
|
|
143
|
+
original_init = LoggerHandler.__init__
|
|
144
|
+
|
|
145
|
+
@wraps(original_init)
|
|
146
|
+
def _patched_logger_handler_init(self, stream, *args, **kwargs):
|
|
147
|
+
if stream is sys.stdout:
|
|
148
|
+
stream = stderr
|
|
149
|
+
original_init(self, stream, *args, **kwargs)
|
|
150
|
+
|
|
151
|
+
LoggerHandler.__init__ = _patched_logger_handler_init # type: ignore[assignment]
|
|
152
|
+
|
|
153
|
+
dvc_log_setup()
|
|
154
|
+
for logger_name in ("dvc", "dvc_objects", "dvc_data", ""):
|
|
155
|
+
logger_obj = logging.getLogger(logger_name)
|
|
156
|
+
for handler in logger_obj.handlers:
|
|
157
|
+
if isinstance(handler, LoggerHandler) and getattr(handler, "stream", None) is not stderr:
|
|
158
|
+
handler.stream = stderr
|
|
159
|
+
except (ImportError, AttributeError):
|
|
160
|
+
# DVC optional or its UI module changed shape; proceed without
|
|
161
|
+
# UI tweaks. Programmer bugs surface unchanged.
|
|
162
|
+
pass
|
|
163
|
+
|
|
164
|
+
from .config import s3_creds_path as _s3_creds_path
|
|
165
|
+
creds_file = _s3_creds_path()
|
|
166
|
+
|
|
167
|
+
SKIP_AUTH = os.getenv("LSMS_SKIP_AUTH", "").lower() in {"1", "true", "yes"}
|
|
13
168
|
|
|
169
|
+
if not SKIP_AUTH and not creds_file.exists():
|
|
170
|
+
# Try non-interactive S3 unlock first. This only decrypts the local
|
|
171
|
+
# s3_reader_creds.gpg — no network call required. WB API key validation
|
|
172
|
+
# (which requires a network round-trip to microdata.worldbank.org) is
|
|
173
|
+
# deferred until the first actual data access via permissions() in
|
|
174
|
+
# data_access.py. This keeps ``import lsms_library`` fast.
|
|
175
|
+
try:
|
|
176
|
+
from .data_access import _auto_unlock_s3 as _unlock
|
|
177
|
+
_unlocked = _unlock()
|
|
178
|
+
if not _unlocked:
|
|
179
|
+
# Local GPG decryption failed or no .gpg file — fall back to
|
|
180
|
+
# interactive passphrase prompt.
|
|
181
|
+
raise RuntimeError("auto-unlock did not produce S3 credentials")
|
|
182
|
+
except (ImportError, RuntimeError, OSError):
|
|
183
|
+
# Auto-unlock skipped (missing dep), failed (no .gpg / bad
|
|
184
|
+
# passphrase / gpg binary missing). Fall through to interactive
|
|
185
|
+
# authenticate(); programmer bugs propagate.
|
|
186
|
+
try:
|
|
187
|
+
authenticate()
|
|
188
|
+
except (RuntimeError, OSError) as exc:
|
|
189
|
+
# Auth flow failure (network, subprocess, missing creds).
|
|
190
|
+
# Warn but don't crash import.
|
|
191
|
+
warnings.warn(
|
|
192
|
+
f"Automatic DVC authentication failed: {exc}. "
|
|
193
|
+
"Set LSMS_SKIP_AUTH=1 to suppress, or set "
|
|
194
|
+
"MICRODATA_API_KEY for non-interactive access."
|
|
195
|
+
)
|
|
196
|
+
elif not SKIP_AUTH and creds_file.exists():
|
|
197
|
+
# User-config creds are already in place, so the auto-unlock branch
|
|
198
|
+
# above is short-circuited. We still need to populate the legacy
|
|
199
|
+
# in-tree ``lsms_library/countries/.dvc/s3_creds`` path so that
|
|
200
|
+
# legacy wave scripts using ``dvc.api.open()`` (which don't pass a
|
|
201
|
+
# ``credentialpath`` override) can find credentials. Without this,
|
|
202
|
+
# a fresh clone with valid user-config creds still hits
|
|
203
|
+
# ``NoCredentialsError`` on Uganda's earnings, enterprise_income,
|
|
204
|
+
# food_acquired etc. via the legacy DVC API path.
|
|
205
|
+
try:
|
|
206
|
+
from .data_access import _sync_legacy_dvc_creds as _sync
|
|
207
|
+
_sync()
|
|
208
|
+
except (ImportError, OSError):
|
|
209
|
+
# Sync failure is non-fatal --- legacy `dvc.api.open()` callers
|
|
210
|
+
# will surface a clear NoCredentialsError if it matters.
|
|
211
|
+
pass
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"""Calendar conversion helpers.
|
|
2
|
+
|
|
3
|
+
This module currently exposes one calendar -- Ethiopian -- because it's
|
|
4
|
+
the only non-Gregorian calendar that surfaces in raw LSMS data we care
|
|
5
|
+
about. Other calendars (Hijri, Coptic) can be added on demand.
|
|
6
|
+
|
|
7
|
+
Ethiopian calendar quick reference
|
|
8
|
+
==================================
|
|
9
|
+
|
|
10
|
+
* The Ethiopian calendar is roughly 7-8 years behind the Gregorian:
|
|
11
|
+
Eth Year 1, 1, 1 = 29 Aug 8 CE Julian (= 27 Aug 8 CE Gregorian).
|
|
12
|
+
* It has 13 months -- 12 of 30 days each, plus a 13th month called
|
|
13
|
+
Pagume of 5 days (6 in Ethiopian leap years).
|
|
14
|
+
* Ethiopian leap years are every 4 years where ``year % 4 == 3``.
|
|
15
|
+
* The Ethiopian new year (Meskerem 1) falls on Gregorian September 11
|
|
16
|
+
in normal years, September 12 in years where the *preceding*
|
|
17
|
+
Ethiopian year was a leap year (i.e., the prior Pagume had 6 days).
|
|
18
|
+
|
|
19
|
+
Month name reference (Amharic transliterations seen in raw data):
|
|
20
|
+
|
|
21
|
+
1. Meskerem (~Sep 11 - Oct 10 Greg)
|
|
22
|
+
2. Tikimt (~Oct 11 - Nov 9)
|
|
23
|
+
3. Hidar (~Nov 10 - Dec 9)
|
|
24
|
+
4. Tahsas (~Dec 10 - Jan 8)
|
|
25
|
+
5. Tir (~Jan 9 - Feb 7)
|
|
26
|
+
6. Yekatit (~Feb 8 - Mar 9)
|
|
27
|
+
7. Megabit (~Mar 10 - Apr 8)
|
|
28
|
+
8. Miyazya (~Apr 9 - May 8)
|
|
29
|
+
9. Ginbot (~May 9 - Jun 7)
|
|
30
|
+
10. Sene (~Jun 8 - Jul 7)
|
|
31
|
+
11. Hamle (~Jul 8 - Aug 6)
|
|
32
|
+
12. Nehase (~Aug 7 - Sep 5)
|
|
33
|
+
13. Pagume (~Sep 6 - Sep 10, 5 days; 6 in leap years)
|
|
34
|
+
|
|
35
|
+
The conversion uses Julian Day Numbers as the pivot. The forward
|
|
36
|
+
direction (Eth -> JDN) is closed-form arithmetic; the JDN -> Greg step
|
|
37
|
+
is Edward G. Richards' standard formula (Mapping Time, 2013, 25.18.5).
|
|
38
|
+
|
|
39
|
+
References:
|
|
40
|
+
* Ethiopian Calendar -- Wikipedia
|
|
41
|
+
* https://github.com/Senamiku/ethiopian-date-converter
|
|
42
|
+
* Richards, E. G. (2013), "Calendars", in S. E. Urban & P. K. Seidelmann
|
|
43
|
+
(eds.) *Explanatory Supplement to the Astronomical Almanac*, 3rd ed.
|
|
44
|
+
"""
|
|
45
|
+
from __future__ import annotations
|
|
46
|
+
|
|
47
|
+
from datetime import date
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Julian Day Number of Eth 1/1/1 = 29 Aug 8 CE Julian = 27 Aug 8 CE Greg
|
|
51
|
+
_ETH_EPOCH_JDN = 1724221
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# Canonical Ethiopian month order (1-indexed; 0th slot kept for clarity).
|
|
55
|
+
ETHIOPIAN_MONTHS: list[str] = [
|
|
56
|
+
"", # 0 unused
|
|
57
|
+
"Meskerem", "Tikimt", "Hidar", "Tahsas", "Tir",
|
|
58
|
+
"Yekatit", "Megabit", "Miyazya", "Ginbot", "Sene",
|
|
59
|
+
"Hamle", "Nehase", "Pagume",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Lowercase variant -> month integer. Includes common transliteration
|
|
64
|
+
# spellings and short forms encountered in LSMS-Ethiopia raw data
|
|
65
|
+
# (`hh_s1q04g_2` in 2013-14 GHS Wave 2).
|
|
66
|
+
_ETH_MONTH_LOOKUP: dict[str, int] = {
|
|
67
|
+
# Canonical
|
|
68
|
+
"meskerem": 1, "tikimt": 2, "hidar": 3, "tahsas": 4, "tir": 5,
|
|
69
|
+
"yekatit": 6, "megabit": 7, "miyazya": 8, "ginbot": 9, "sene": 10,
|
|
70
|
+
"hamle": 11, "nehase": 12, "pagume": 13,
|
|
71
|
+
# Common alternate spellings
|
|
72
|
+
"meskarem": 1, "meskerm": 1, "tekemt": 2, "tikemt": 2,
|
|
73
|
+
"tahesas": 4, "tahisas": 4, "ter": 5, "yekatet": 6,
|
|
74
|
+
"meyazia": 8, "miyaza": 8, "miazia": 8, "ginbo": 9,
|
|
75
|
+
"sine": 10, "senie": 10, "nehasse": 12, "pagumen": 13, "puagme": 13,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def parse_ethiopian_month(name) -> int | None:
|
|
80
|
+
"""Map an Ethiopian month name (Amharic transliteration) to 1..13.
|
|
81
|
+
|
|
82
|
+
Returns ``None`` for unrecognised input or NaN/missing.
|
|
83
|
+
"""
|
|
84
|
+
if name is None:
|
|
85
|
+
return None
|
|
86
|
+
if not isinstance(name, str):
|
|
87
|
+
# Numeric input that already encodes the month number directly.
|
|
88
|
+
try:
|
|
89
|
+
v = int(float(name))
|
|
90
|
+
except (TypeError, ValueError):
|
|
91
|
+
return None
|
|
92
|
+
return v if 1 <= v <= 13 else None
|
|
93
|
+
s = name.strip().lower()
|
|
94
|
+
if not s:
|
|
95
|
+
return None
|
|
96
|
+
return _ETH_MONTH_LOOKUP.get(s)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def is_ethiopian_leap_year(year: int) -> bool:
|
|
100
|
+
"""Ethiopian leap years: ``year % 4 == 0``.
|
|
101
|
+
|
|
102
|
+
Per Wikipedia ("Ethiopian calendar"), Eth 8, 12, ..., 1996, 2000,
|
|
103
|
+
2004, 2008, 2012 are leap. Pagume (the 13th month) has 6 days in
|
|
104
|
+
those years and 5 days otherwise.
|
|
105
|
+
|
|
106
|
+
Note: this differs from the Gregorian leap rule -- Eth 2100 will be
|
|
107
|
+
leap (% 4 == 0) while Greg 2100 is not (century-no-400-rule), so
|
|
108
|
+
the calendars drift by one day in 2100+ -- but for the LSMS-Ethiopia
|
|
109
|
+
data range (1900-2099) the rules align.
|
|
110
|
+
"""
|
|
111
|
+
return year % 4 == 0
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def ethiopian_to_jdn(year: int, month: int, day: int) -> int:
|
|
115
|
+
"""Convert an Ethiopian (year, month, day) to Julian Day Number.
|
|
116
|
+
|
|
117
|
+
Validates that the inputs form a real Ethiopian date; raises
|
|
118
|
+
``ValueError`` otherwise.
|
|
119
|
+
"""
|
|
120
|
+
if not (1 <= month <= 13):
|
|
121
|
+
raise ValueError(f"Ethiopian month must be 1..13, got {month}")
|
|
122
|
+
if month == 13:
|
|
123
|
+
max_day = 6 if is_ethiopian_leap_year(year) else 5
|
|
124
|
+
else:
|
|
125
|
+
max_day = 30
|
|
126
|
+
if not (1 <= day <= max_day):
|
|
127
|
+
raise ValueError(
|
|
128
|
+
f"Ethiopian day {day} out of range for "
|
|
129
|
+
f"month {month} (max={max_day}, year={year})"
|
|
130
|
+
)
|
|
131
|
+
# Leap-day count: number of Eth leap years in [1, year-1] (the
|
|
132
|
+
# current year's leap day, if any, has not yet occurred at month 1
|
|
133
|
+
# day 1 — Pagume 6 falls at the *end* of the year).
|
|
134
|
+
return (
|
|
135
|
+
_ETH_EPOCH_JDN
|
|
136
|
+
+ 365 * (year - 1)
|
|
137
|
+
+ ((year - 1) // 4)
|
|
138
|
+
+ 30 * (month - 1)
|
|
139
|
+
+ day - 1
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def jdn_to_gregorian(jdn: int) -> date:
|
|
144
|
+
"""Convert a Julian Day Number to a Gregorian ``datetime.date``.
|
|
145
|
+
|
|
146
|
+
Uses Edward G. Richards' formula (Mapping Time, 2013), valid for
|
|
147
|
+
any JDN representing a Gregorian date after the calendar's start.
|
|
148
|
+
"""
|
|
149
|
+
a = jdn + 32044
|
|
150
|
+
b = (4 * a + 3) // 146097
|
|
151
|
+
c = a - (146097 * b) // 4
|
|
152
|
+
d = (4 * c + 3) // 1461
|
|
153
|
+
e = c - (1461 * d) // 4
|
|
154
|
+
m = (5 * e + 2) // 153
|
|
155
|
+
g_day = e - (153 * m + 2) // 5 + 1
|
|
156
|
+
g_month = m + 3 - 12 * (m // 10)
|
|
157
|
+
g_year = 100 * b + d - 4800 + m // 10
|
|
158
|
+
return date(g_year, g_month, g_day)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
def ethiopian_to_gregorian(year: int, month: int, day: int) -> date:
|
|
162
|
+
"""Convert an Ethiopian (year, month, day) to a Gregorian ``date``.
|
|
163
|
+
|
|
164
|
+
>>> ethiopian_to_gregorian(2000, 1, 1)
|
|
165
|
+
datetime.date(2007, 9, 11)
|
|
166
|
+
>>> ethiopian_to_gregorian(2007, 13, 6) # Pagume 6 in a leap year
|
|
167
|
+
datetime.date(2015, 9, 11)
|
|
168
|
+
>>> ethiopian_to_gregorian(2008, 1, 1) # day after the leap Pagume
|
|
169
|
+
datetime.date(2015, 9, 12)
|
|
170
|
+
"""
|
|
171
|
+
return jdn_to_gregorian(ethiopian_to_jdn(year, month, day))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def disambiguate_two_digit_eth_year(
|
|
175
|
+
yy: int, *, interview_eth_year: int, reported_age: int | None = None,
|
|
176
|
+
) -> int | None:
|
|
177
|
+
"""Resolve a 2-digit Ethiopian year to its 4-digit form.
|
|
178
|
+
|
|
179
|
+
LSMS-Ethiopia 2013-14 GHS Wave 2 records year of birth as a 2-digit
|
|
180
|
+
integer (e.g. ``89`` for Eth 1989, ``1`` for Eth 2001). The
|
|
181
|
+
century is implicit; this helper picks the candidate that yields a
|
|
182
|
+
plausible age in [0, 120], using ``reported_age`` as a tiebreaker
|
|
183
|
+
when both centuries are plausible.
|
|
184
|
+
|
|
185
|
+
Returns ``None`` if neither candidate yields a plausible age, or if
|
|
186
|
+
the input is already 4-digit and out of range.
|
|
187
|
+
"""
|
|
188
|
+
if yy is None:
|
|
189
|
+
return None
|
|
190
|
+
try:
|
|
191
|
+
yy = int(yy)
|
|
192
|
+
except (TypeError, ValueError):
|
|
193
|
+
return None
|
|
194
|
+
# 2-digit input: try both centuries. Already-4-digit input passes
|
|
195
|
+
# through but is still subject to the plausibility check below.
|
|
196
|
+
if yy < 100:
|
|
197
|
+
candidates = [1900 + yy, 2000 + yy]
|
|
198
|
+
else:
|
|
199
|
+
candidates = [yy]
|
|
200
|
+
plausible: list[int] = []
|
|
201
|
+
for c in candidates:
|
|
202
|
+
a = interview_eth_year - c
|
|
203
|
+
if 0 <= a <= 120:
|
|
204
|
+
plausible.append(c)
|
|
205
|
+
if not plausible:
|
|
206
|
+
return None
|
|
207
|
+
if len(plausible) == 1:
|
|
208
|
+
return plausible[0]
|
|
209
|
+
# Both centuries yield a plausible age (typical for yy in 0..13 with
|
|
210
|
+
# interview around Eth 2006). Pick the candidate closest to the
|
|
211
|
+
# reported age when available; otherwise prefer the more recent.
|
|
212
|
+
if reported_age is not None:
|
|
213
|
+
try:
|
|
214
|
+
ra = int(reported_age)
|
|
215
|
+
except (TypeError, ValueError):
|
|
216
|
+
ra = None
|
|
217
|
+
if ra is not None and 0 <= ra <= 120:
|
|
218
|
+
return min(plausible, key=lambda c: abs((interview_eth_year - c) - ra))
|
|
219
|
+
# Default: pick the more recent (largest) century-candidate.
|
|
220
|
+
return max(plausible)
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"""GPT-based helper for suggesting categorical harmonization mappings.
|
|
2
|
+
|
|
3
|
+
Experimental tooling that sends a DataFrame of raw survey labels to an
|
|
4
|
+
OpenAI chat model and asks it to propose canonical "Preferred Label"
|
|
5
|
+
matches. Used as a drafting aid for maintainers filling out the
|
|
6
|
+
``#+NAME: harmonize_food`` and ``#+NAME: unit`` tables in a country's
|
|
7
|
+
``categorical_mapping.org``. Output is always reviewed by a human before
|
|
8
|
+
being committed — the library itself never calls this module at runtime.
|
|
9
|
+
|
|
10
|
+
Requires the ``openai`` package and an API key (set via the ``api_key``
|
|
11
|
+
module-level variable or looked up from ``authinfo``). Not part of the
|
|
12
|
+
public API and not loaded by :mod:`lsms_library.__init__` unless
|
|
13
|
+
explicitly imported.
|
|
14
|
+
"""
|
|
2
15
|
import pandas as pd
|
|
3
16
|
from ligonlibrary import authinfo
|
|
4
17
|
import openai
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
"""String-similarity helpers for drafting categorical mapping tables.
|
|
2
|
+
|
|
3
|
+
Lightweight NLP utilities used when bootstrapping a country's
|
|
4
|
+
``categorical_mapping.org`` from raw survey labels. The main operations
|
|
5
|
+
are:
|
|
6
|
+
|
|
7
|
+
- :func:`regularize_string` — strip accents, lowercase, and spell-check
|
|
8
|
+
via TextBlob so that "Sécheresse" and "secheresse" land in the same
|
|
9
|
+
bucket before similarity scoring.
|
|
10
|
+
- :func:`preprocess` / :func:`get_label_vector` — turn a list of raw
|
|
11
|
+
labels into feature vectors keyed on cleaned tokens.
|
|
12
|
+
- :func:`get_cosine_similarity` — score two label vectors so the
|
|
13
|
+
maintainer can propose the highest-ranked canonical label for each
|
|
14
|
+
raw variant.
|
|
15
|
+
|
|
16
|
+
Like :mod:`.ai_agent`, this is a drafting aid for maintainers — the
|
|
17
|
+
library does not call these functions at runtime, and the output is
|
|
18
|
+
always reviewed by a human before being committed.
|
|
19
|
+
"""
|
|
1
20
|
import pandas as pd
|
|
2
21
|
import numpy as np
|
|
3
22
|
import re
|