-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheatmap.py
More file actions
23 lines (18 loc) · 724 Bytes
/
Copy pathheatmap.py
File metadata and controls
23 lines (18 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Cancemi Damiano
#RUN: "python heatmap.py"
import gmplot
files = ["result", "result_final"]
if __name__ == '__main__':
for file in files:
latitude = []
longitude = []
with open('/Users/damianocancemi/PycharmProjects/HPC/'+file+'.txt', 'r') as f:
for line in f:
coords = line.split(",")
latitude.append(float(coords[0]))
longitude.append(float(coords[1]))
gmap = gmplot.GoogleMapPlotter(latitude[0], longitude[0], 4)
gmap.heatmap(latitude, longitude)
if file == "result_final":
gmap.marker(38.300541, -92.527408, title="Center in MISSOURI (38.300541,-92.527408)")
gmap.draw(file+".html")