popdist_weighted_mean.Rd
Interpolate population/inverse-distance-weighted measures for each x coordinate using measures taken at surrounding y coordinates. Ending measures are double weighted by population and distance so that surrounding measures taken in nearby areas and those with greater populations are given more weight in final average.
popdist_weighted_mean(x_df, y_df, measure_col, x_id = "id",
x_lon_col = "lon", x_lat_col = "lat", y_lon_col = "lon",
y_lat_col = "lat", pop_col = "pop", dist_function = "Haversine",
dist_transform = "level", decay = 2)
DataFrame with coordinates that need weighted measures
DataFrame with coordinates at which measures were taken
String name of measure column in y_df
String name of unique identifer column in x_df
String name of column in x_df with longitude values
String name of column in x_df with latitude values
String name of column in y_df with longitude values
String name of column in y_df with latitude values
String name of column in x_df with population values
String name of distance function: "Haversine" (default) or "Vincenty"
String value of distance weight transform: "level" (default) or "log"
Numeric value of distance weight decay: 2 (default)
Dataframe of population/distance-weighted values