Skip to content

Instantly share code, notes, and snippets.

@Dhrumilcse
Last active September 22, 2019 21:13
Show Gist options
  • Save Dhrumilcse/be4e10efdbf1db12d8b49d206eb8c299 to your computer and use it in GitHub Desktop.
Save Dhrumilcse/be4e10efdbf1db12d8b49d206eb8c299 to your computer and use it in GitHub Desktop.
#Import Library
import folium
import pandas as pd
#Load Data
data = pd.read_excel("tesla-supercharger-france.xlsx")
latitude = data['Ylatitude']
longitude = data['Xlongitude']
station = data['ad_station']
#Create base map
map = folium.Map(location=[48.754865,2.373034], zoom_start = 6, tiles = "cartodbpositron")
#Plot Marker with custom Icon
for latitude, longitude, station in zip(latitude, longitude, station):
icon_path = "tesla-iconn.png"
icon = folium.features.CustomIcon(icon_image=icon_path ,icon_size=(30,30))
folium.Marker(location=[latitude, longitude], popup=str(station), icon=folium.Icon(color = 'green')).add_to(map)
#Save the map
map.save("map.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment