surveyweathertool.src.survey.aggregate_geo_waves¶
Module Contents¶
Functions¶
|
Processing of geo data for each of the four nigerian waves. |
|
Master execution function for processing geographic and weather information from survey waves |
- surveyweathertool.src.survey.aggregate_geo_waves.get_geo_weather_wave(filepath: pathlib.Path) pandas.DataFrame¶
Processing of geo data for each of the four nigerian waves.
Parameters¶
filepath (Path): Pathlib Path to Geo+weather data wave file in .dta (STATA) format
Returns¶
pandas.DataFrame: with selected indicator columns including latitude, longitude, and select temperature and precipitation info
Notes¶
LSMS-ISA survey files have small inconsistencies in naming scheme (column name) even in harmonised datasets! So this function renames similar questions with different labels into a single label, so that the data across the waves can be concatenated nicely.
Extensions¶
Function can easily be extended for additional columns from the geo data files. If column name is same across the waves, add it to the ‘cols’ list, and optionally rename in ‘rename_cols’ If column name is unique, then add it into the if-else ladder for each particular file. If there is new wave in future, eg Wave 5, add another if statement for unique name columns.
- surveyweathertool.src.survey.aggregate_geo_waves.execute_geo_wv(wavepaths: list[pathlib.Path], export_name: pathlib.Path)¶
Master execution function for processing geographic and weather information from survey waves
Parameters wavepath (Path) : List of Path to all geo data files from LSMS-ISA indivual survey files