Skip to content

Instantly share code, notes, and snippets.

@freestok
Created June 18, 2020 00:37
heat_map = folium.Map(location=[43.455737, -84.760162], zoom_start=7,
max_zoom=14, tiles='cartodbpositron')
with open('dataInput//donors.csv','r', newline='') as f:
reader = csv.reader(f)
next(reader) # skip column headers
data = [[float(row[13]), float(row[12])] for row in reader if row[12] != '']
heat = plugins.HeatMap(data, blur=25)
heat_map.add_child(heat)
heat_map.save('heatmap.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment