I have 2 datasets:
df1=
id_first latitude longitude
0 403 45.0714 7.6187
1 403 45.0739 7.6195
2 1249 45.0745 7.6152
3 1249 45.1067 7.6451
4 1249 45.1062 7.6482
5 1531 45.1088 7.6528
6 1531 45.1005 7.6155
7 14318 45.1047 7.6056
df2 =
id_now cluster_group
0 403 0
1 1249 1
2 1531 3
3 14318 3
I want can not create a loop (or smth else) to:
in
df2Value403belong to only one cluster_group(0)go todf1and check all point related to403latitude - 2 points and longitude - 2 points. And plot them.repeat to the whole df1 df2 bu plotting in one graph (different colors for every cluster) - I can manage this actually, but if you can offer smth (?)
P.S. in df2 1531 and 14318 belongs to the same cluster. So anyway, I want to plot its points in one color (or one map).
Try:
n_clusters = 46
for k in range(0, n_clusters):
....
Every color represents cluster_group

