I have a spreadsheet with Toronto real estate info - this includes the latitude and longitude of condos in the area. In fact, it even has a column with the lat & long combined. What I'd like to do is put these coordinates on a map, probably with folium (but I'm open to alternatives). From what I can tell, folium uses the following format:
map_1 = folium.Map(location=[45.372, -121.6972],
zoom_start=12,
tiles='Stamen Terrain')
folium.Marker([45.3288, -121.6625], popup='Mt. Hood Meadows').add_to(map_1)
folium.Marker([45.3311, -121.7113], popup='Timberline Lodge').add_to(map_1)
map_1
So as far as I can tell I need to do two things:
1) Generate a sufficient amount of lines with the content: folium.Marker([x, y]).add_to(map_1)
2) Fill in x and y with the lat/long values from the spreadsheet
So far I've been able to pull in the lat/long column from the csv, but that's as far as I've gotten:
import pandas as pd
import folium
df_raw = pd.read_excel('df_condo_v9_t1.xlsx', sheetname=0, header=0)
df_raw.shape
df_raw.dtypes
df_lat = df_raw['Latlng']
df_lat.head()
If you really need to look at the csv, it's at: https://github.com/vshideler/toronto-condos
Any suggestions would be appreciated!