Skip to main content


Applied Data Science Capstone by IBM/Coursera

Table of contents

Introduction: Business Problem 

In this project we will try to find an optimal location for a restaurant. Specifically, this report will be targeted for people that are new to Hyderabad, it can be daunting to figure out what restaurants are worth going to and where they are and for the stakeholders interested in opening a restaurant in Hyderabad, India.
Since there are lots of restaurants in Hyderabad we will try to detect locations that are that are with good likes. We would also prefer locations as close to city center as possible.
We will use our data science powers to generate a few most promissing neighborhoods based on this criteria.

Data 

For this assignment, I will be utilizing the Foursquare API to pull the following location data on restaurants in Hyderabad, IND.
  1. Venue Name
  2. Venue ID
  3. Venue Location
  4. Venue Category
  5. Count of Likes
To acquire the data mentioned above, I will need to do the following:
Get geolocator lat and long coordinates for Hyderabad,IND. Use Foursquare API to get a list of all venues in Hyderabad

·         Get venue name,
·         venue ID
·         location
·         category
·         likes

Methodology

Get the location coordinates using geocoder

from geopy.geocoders import Nominatim
# Get latitude and longitude
address = 'Hyderabad'
geolocator = Nominatim(user_agent="foursquare_agent")
location = geolocator.geocode(address)
latitude = location.latitude
longitude = location.longitude
print("Latitude is {} and Longitude is {}".format(latitude,longitude))

Use Foursquare API to fetch location data

search_query = 'restaurant'
radius = 10000
url = 'https://api.foursquare.com/v2/venues/search?client_id={}&client_secret={}&ll={},{}&v={}&query={}&radius={}&limit={}'.format(CLIENT_ID, CLIENT_SECRET, latitude, longitude, VERSION, search_query, radius, LIMIT)
results = requests.get(url).json()
#print(results)
venues=results['response']['venues']
df = json_normalize(venues)
df.head()

Perform Data wrangling and make it to required format



Fetch likes for each restaurant using foursquare API


Analysis

Group the restaurants depending on type






Rate the restaurant food quality as poor, average and good depending on total number of likes


Results and Discussion

Cluster the restaurants using k-means and visualize the results on a map using folium.











Conclusion

The venues have been identified using Foursquare API, categorized, clustered and have been plotted on the map. The map reveals restaurants which are exceptionally good in Hyderabad Based on the visitor’s venue rating and price preferences, he/she can choose amongst the places.

Comments

Popular posts from this blog

Tellegens Theorem

Tellegen theorem states that  the summation of instantaneous powers for the n number of branches in an electrical network is zero. Suppose n number of branches in an electrical network have i 1 , i 2 , i 3 , .............i n respective instantaneous currents through them. These currents satisfy Kirchhoff's Current Law . Again, suppose these branches have instantaneous voltages across them are v 1 , v 2 , v 3 , ........... v n respectively. If these voltages across these elements satisfy Kirchhoff Voltage Law then,

relay

A relay is an electrically operated switch. These are remote control electrical switches that are controlled by another switch. A relay is used to isolate one electrical circuit from another. It allows a low current control circuit to make or break an electrically isolated high current circuit path. The basic relay consists of a coil and a set of contacts. The most common relay coil is a length of magnet wire wrapped around a metal core. When voltage is applied to the coil, current passes through the wire and creates a magnetic field. This magnetic field pulls the contacts together and holds them there until the current flow in the coil has stopped. The diagram below shows the parts of a simple relay. Operation: When a current flows through the coil, the resulting magnetic field attracts an armature that is mechanically linked to a moving contact. The movement either makes or breaks a connection with a fixed contact. When the current is switched off, the armature is usually returned by

Fundamentals of Electromagnetism

Electrostatics Columb’s law  Electric Flux density & Electric field intensity Magnetic Flux density &Magnetic field intensity Gauss law Energy density Continuity equation Magneto statics Biot- savart law Amperes circuit law Magnetic momentum & magnetic flux Boundary conditions Applications (Hall effect) Lorentz force equation conduction, polarization & magnetization Maxwell equations Faraday law, ampere law, gauss law of electric and magnetic fields Law of conservation of charge & boundary conditions Hertzian dipole