Essayez d'utiliser la bibliothèque folium qui affiche des données sur une carte dans google colab ..
folium_01.py
import folium
map_ = folium.Map(location=[35.681384, 139.766073], zoom_start=18)
map_
Résultat d'exécution
Échantillon 2 (Mac la station sur la ligne Keikyu)
folium_02.py
import folium
#Définissez la latitude et la longitude du temple Izumidakeji à Yokohama sur la ligne Keikyu
kk_ekis = [
['Temple d'Izumidake',35.638692,139.74002],
['Shinagawa',35.630152,139.74044],
['Kita Shinagawa',35.622716,139.739152],
['Shinbaba',35.61762,139.741366],
['Aomono Yokocho',35.609351,139.742905],
['Samesu',35.605144,139.742547],
['Rivière témoin',35.598453,139.738803],
['Côte d'Omori',35.587695,139.735465],
['Île de la Paix',35.579074,139.734996],
['Ville d'Omori',35.572622,139.732169],
['Umeyashiki',35.567042,139.728341],
['Keikyu Kamata',35.560685,139.723731],
['Couleurs diverses',35.549911,139.715199],
['Banque Rokugo',35.540893,139.707789],
['Keikyu Kawasaki',35.532833,139.700896],
['Crête Haccho',35.523113,139.691488],
['Marché de Tsurumi',35.51783,139.686592],
['Keikyu Tsurumi',35.50729,139.678098],
['Devant Kazukien',35.500413,139.67301],
['Blé cru',35.495297,139.666969],
['Keikyu Shinkoyasu',35.487106,139.65554],
['Koyasu',35.484959,139.645635],
['Kanagawa Shinmachi',35.481462,139.640158],
['Nakakido',35.477312,139.634489],
['Kanagawa',35.471399,139.627467],
['Yokohama',35.466188,139.622715]]
#Attachez le Mac de chaque station à la carte
for kk_eki in kk_ekis:
folium.Marker([kk_eki[1], kk_eki[2]], popup=kk_eki[0]).add_to(map_)
map_
Recommended Posts