ags_dist | R Documentation |
Defines a distance metric for the AGS
ags_dist(x, y, landw = 10^6, kreisw = 10^3, gemw = 1, ceiling = 99999999)
x , y |
vectors of AGS values |
landw |
weight of the Bundesland (Land) integers |
kreisw |
weight of the Kreis (district) integers |
gemw |
weight of the Gemeinde (municipality) integers |
ceiling |
truncate all distances at this value |
The distance metric is defined as
abs(x[1:2]- y[1:2])*landw + abs(x[3:5]- y[3:5])*kreisw + abs(x[6:8]- y[6:8])*gemw,
where z[a:b] means all digits between a and b for integer z.
With the default weights, this sum is the absolute difference between x and y.
A numerical vector.
ags_dist(14053,14059)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.