The interface Module
- interpolate(data: DataFrame, interpolate_vars: list, method: str, tvar: str, by_var: str, ma_num: int = 4)[source]
General function for calling interpolation. Will be updated as additional interpolation methods are developed
- Parameters:
data¶ – A pandas data frame, containing geospatial data with missingness included
interpolate_vars¶ – list of variable names to interpolate
method¶ – A string containing the interpolation method to use. Valid vales: - “ma”: moving average method, see
interpolate_ma
tvar¶ – variable containing the time dimension
by_var¶ – single variable uniquely identifying each spatial division. If this information is contained in more than one variable in the intitial data, a separate ID column should be created.
ma_num¶ – Only used when method = “ma”. The default size f the moving average window to use. Defaults to 3.
- Returns:
None, replaces missing values in the data frame in place