Jump to content

Como gerar um mapa com clusters in Python


Recommended Posts

Eu tenho esse dataframe abaixo e gostaria de saber como consigo fazer um gráfico semelhante ao que inseri em anexo. Vocês podem ajudar com algum material ou algum código que ajude? Veja que eu tenho as propriedades e tbm o cluster correspondente de cada propriedade, mas n sei como gerar um mapa igual a esse que inseri.  Qualquer ajudar é bem vinda!

Obrigado!

import pandas as pd

df = pd.DataFrame({'Properties':[1,2,3,4,5,6],
                    'Latitude':[-24.930473, -24.95575,-24.924161,-24.95579, -24.94557, -24.93267],
                   'Longitude':[-49.994889, -49.990162,-50.004343, -50.007371, -50.01542, -50.00702],
                    'cluster': (1,2,1,2,1,2)})
display(df)



   Properties   Latitude  Longitude  cluster
0           1 -24.930473 -49.994889        1
1           2 -24.955750 -49.990162        2
2           3 -24.924161 -50.004343        1
3           4 -24.955790 -50.007371        2
4           5 -24.945570 -50.015420        1
5           6 -24.932670 -50.007020        2

image.png

Link to comment
Share on other sites

Oi!

 

Cara, vc vai ter que baixar um modelo de mapa e usar uma lib. Eu ja fiz isso uma vez, mas faz tempo. Da uma procurada com o Geopandas.

Eu vou tentar simular um aqui mais pra frente e volto pra te ajudar

  • Curtir 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...