I am new to Tkinter,
I have a program which takes CSV as input containing, outlet's geo-location, display it on a map, saving it as HTML.
format of my csv:
outlet_code Latitude Longitude
100 22.564 42.48
200 23.465 41.65
... and so on ...
Below is my python code to take this CSV and put it on a map.
import pandas as pd
import folium
map_osm = folium.Map(location=[23.5747,58.1832],tiles='https://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}',attr= 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>')
df = pd.read_excel("path/to/file.csv")
for index, row in df.iterrows():
folium.Marker(location=[row['Latitude'], row['Longitude']], popup=str(row['outlet_code']),icon=folium.Icon(color='red',icon='location', prefix='ion-ios')).add_to(map_osm)
map_osm
This will take display map_osm
Alternate way is to save map_osm
as HTML
map_osm.save('path/map_1.html')
What I am looking for is a GUI which will do the same thing.
i.e prompt user to input the CSV, then execute my code below and display result or at least save it in a location.
Any leads will be helpful