2016-12-07 3 views
1

Ich möchte einige Punkte (geographische Länge, Breite) auf einer Karte von Taiwan mit plotly library anzeigen. Das Problem ist, wo kann ich eine solche Karte von Taiwan finden und laden und gibt es eine Probe?Karte mit plotly python

+0

starten hier: https : //plot.ly/ipython-notebooks/basemap-maps/ –

Antwort

1

Hallo Ich habe wie diese erstellt Tutorials für Probleme haben, können Sie darauf zugreifen auf: https://github.com/SayaliSonawane/Plotly_Offline_Python/tree/master/Satellite%20Map

Sie Satellitenkarte im Freien Stil verwenden können, diese Art von Handlung zu erstellen:

import plotly 
import pandas as pd 
from plotly.graph_objs import Scattermapbox,Data,Layout 

# Open mapbox account and pass your access token over here 
# Mapbox account sign up and access token is free. 
# Mapbox information: https://www.mapbox.com/help/how-access-tokens-work/#rotating-tokens 

mapbox_access_token = 'Enter_your_access_token' 
data = Data([Scattermapbox(
     lat= dataframe_name['Latitude'], 
     lon= dataframe_name['Longitude'], 
     # text: provide column which will display hover information 
     text = [str(n) for n in dataframe_name['ADR_Line_2']], 
     mode='markers', 
     marker = dict(color = 'rgb(0, 128, 0)',size=10), 
     hoverinfo='skip' 
    ) ]) 



layout = Layout(
     title = "title_for_plot", 
     font=dict(family='Courier New, monospace', size=18, color='rgb(0,0,0)'), 
     autosize=False, 
     hovermode='closest', 
     showlegend=False, 
     width=1800, 
     height=1000, 
     mapbox=dict(
      accesstoken=mapbox_access_token, 
      #width=1415, 
      bearing=0, 
      pitch=0, 
      style = 'outdoors' 
     ), 
    )      

plotly.offline.plot({"data":data, "layout":layout},filename = 'taiwan_map.html')