-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeb-Map-with-IIT-Location.py
More file actions
40 lines (20 loc) · 1006 Bytes
/
Web-Map-with-IIT-Location.py
File metadata and controls
40 lines (20 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import folium
import pandas
data = pandas.read_excel("data.xlsx", sheet_name='Sheet1')
iit_ranking = list(data["IIT Ranking"])
college_name = list(data["IIT College"])
Nirf_score = list(data["NIRF Score"])
lat = list(data["Latitude"])
lon = list(data["Longitude"])
pic = list(data["Image"])
fg = folium.FeatureGroup("map")
fg.add_child(folium.GeoJson(data =(open("india_states.json","r",encoding="utf-8-sig").read())))
for rank , name , score , lati , longi , ima in zip(iit_ranking, college_name, Nirf_score, lat, lon, pic):
fg.add_child(folium.Marker(location=[lati , longi], popup = "<b>College Name : </b>"+str(name)+
"<br> <b> Rank among IIT in India : </b>"+str(rank)+
"<br> <b>NIRF Score : </b>"+ str(score)+
"<br> <img src="+ima+
"height = 142 , width = 290>", icon = folium.Icon(color="red")))
map = folium.Map(Location = [20.0000,75.0000],zoom_start = 8)
map.add_child(fg)
map.save("MAPPING.html")