import pandas as pd
import plotly.express as px
fig = px.scatter_mapbox(
df, # Our DataFrame
lat = "latitude_col_name",
lon = "longitude_col_name",
center = {"lat": 19.43, "lon": -99.13}, # where map will be centered
width = 600, # Width of map
height = 600, # Height of map
hover_data = ["customer_name"], # what to display when hovering mouse over coordinate
)
fig.update_layout(mapbox_style="open-street-map") # adding beautiful street layout to map
fig.show()
import plotly.express as px
import pandas as pd
df = pd.read_csv("location_coordinate.csv")
fig = px.scatter_geo(df,lat='lat',lon='long', hover_name="id")
fig.update_layout(title = 'World map', title_x=0.5)
fig.show()