Description Usage Arguments Value
View source: R/calc_dist_kernel_shp.R
Calculates the spatial kernel values between all areas in a Shapefile using their distance and population. This uses a gravity kernel structure (either matched or smooth depending on the threshold distance).
1 2 | calc_dist_kernel_shp(dist_mat, dist_c, shp_data, alpha, p, p2, aa,
delta = 0.3)
|
dist_mat |
The distance matrix between all areas. |
dist_c |
The threshold distance for the matched kernel. Note that setting this to an extremely high value will effectively make the gravity kernel a smooth kernel with a single function since the threshold distance will never be crossed. |
shp_data |
The dataframe object containing the population data extracted from the Shapefile object
(generated by the |
alpha |
The destination population power. |
p |
The distance power. |
p2 |
The secondary distance power for the matched kernel. |
aa |
The offset distance. |
delta |
The home cell modifier (to compensate the distance within cells equal to 0). |
Returns one matrix object containing the spatial kernel values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.