Hello I have the following json file with information about 6.000 restaurants in Las Vegas such as: "name" , "longitude" ,"latitude" .I want to create a map and map pin labels using the "longitude" ,"latitude" of each point and to display the "name" of each restaurant in a map.I use pycharm and python 3.6.5(32 bit).I try to import folium library,it works, but it does not display the name of each restaurant in the map.How can I dispaly the name of each restaurant in a map?Thanks in advance!
The json file yelp_restaurant_Las_Vegas is:
{
"_id" : ObjectId("5a9eb7b2a2f96c346024f239"),
"city" : "Las Vegas",
"neighborhood" : "Southeast",
"name" : "Flight Deck Bar & Grill",
"business_id" : "Pd52CjgyEU3Rb8co6QfTPw",
"longitude" : -115.1708484,
"hours" : {
"Monday" : "8:30-22:30",
"Tuesday" : "8:30-22:30",
"Friday" : "8:30-22:30",
"Wednesday" : "8:30-22:30",
"Thursday" : "8:30-22:30",
"Sunday" : "8:30-22:30",
"Saturday" : "8:30-22:30"
},
"state" : "NV",
"postal_code" : "89119",
"categories" : [
"Nightlife",
"Bars",
"Barbeque",
"Sports Bars",
"American (New)",
"Restaurants"
],
"stars" : 4.0,
"address" : "6730 S Las Vegas Blvd",
"latitude" : 36.0669136,
"review_count" : NumberInt(13),
"is_open" : NumberInt(1),
.
.
.
The code is:
from pymongo import MongoClient
import pandas as pd
import folium
from IPython.display import HTML
client = MongoClient("localhost",27017)
db = client.Desktop
collection1 =db.yelp_restaurant_Las_Vegas
reviews=pd.DataFrame(list(collection1.find()))
mapi_osm = folium.Map(location=())
reviews.apply(lambda row:folium.CircleMarker(location[row["latitude"],row["longitude"]]).add_to(mapi_osm),axis=1)
mapi_osm.save('spst.html')