R に重複しているポイントがいくつかあります - >私の考えは、それらを円に広げる新しい座標列を作成することです。
ジッターしたくありません。見た目が悪く、誤解を招きます -> データが実際にそのように表示されているのではなく、データが実際にそのように表示されていると閲覧者に思わせます。
丸やひまわりや星型のスプレッドが素敵だと思うので、それをやりたいと思っています。私が持っているものは、地理的な予測のためにうまく機能していないと思います:
座標の例
(入力):
Latitude Longitude
51.52328 -0.1570965
51.52328 -0.1570965
51.52328 -0.1570965
51.52328 -0.1570965
51.52328 -0.1570965
出力:
new_lat new_lng
51.50815 -0.1545583
51.53691 -0.1620067
51.51205 -0.1501359
51.53138 -0.1656516
51.51884 -0.1475074
現時点での私のコード:
#http://geepeeex.com/LongitudesAndLatitudes.htm
#UK (122/78)
radius_size = 0.001
lat_radius_size = radius_size*(122/78)
many_stations$new_lat <- many_stations$Latitude
many_stations$new_lng <- many_stations$Longitude
for (i in unique(many_stations$Station)) {
# Get group-length = N
group_length = length(which(many_stations$Station == i))
#Cos/Sin take degrees not radians
circle_chunk = (360/group_length)
angle = circle_chunk
# If duplicates:
if(group_length>1) {
print(paste('group_length: ',group_length))
# Loop within the group
for (j in which(many_stations$Station == i)) {
print(paste('row: ',j))
many_stations[j,]$new_lng <- many_stations[j,]$Longitude + sin(angle)*radius_size
many_stations[j,]$new_lat <- many_stations[j,]$Latitude + cos(angle)*lat_radius_size
angle = angle + circle_chunk
}
}
}