Wave¶
Wave ¶
A single survey wave within a country.
Typically obtained via bracket notation on a
:class:Country::
wave = uga['2019-20']
df = wave.household_roster()
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
str
|
Wave label (e.g. |
required |
wave_folder
|
str
|
Subdirectory name on disk (may differ from year for multi-round surveys). |
required |
country
|
Country
|
Parent country instance. |
required |
resources
property
¶
Load the data_info.yml that describes table structure, merges, etc.
column_mapping ¶
Retrieve column mappings for a given dataset request and map into a dictionary to be ready for df_data_grabber.
Input: request: str, the request data name in data_scheme (e.g. 'cluster_features', 'household_roster', 'food_acquired', 'interview_date')
Output: final_mapping: dict, {file_name: {'idxvars': idxvar_dic, 'myvars': myvars_dic}}
Example:
{'data_file.dta': {'idxvars': {'cluster': ('cluster',
grab_data ¶
get data from the data file Input: request: str, the request data name (e.g. 'cluster_features', 'household_roster', 'food_acquired', 'interview_date') Output: df: pd.DataFrame, the data requested