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

voltage

Voltage, is is the difference in potential between two points  in an electric field. also called electromotive force. voltage is the   pressure from an electrical circuit’s power source that pushes charged electrons (current).           grater the voltage grater the flow of electric current. Voltage is symbolized by   V or E . The standard unit is the volt. One volt will drive one columb  (6.24 x 10 18 ) charge.such as electronics through a resistance of one ohm. Voltage can be direct or alternating. A direct voltage maintains the same polarity. In an alternating voltage, the polarity reverses direction periodically. The number of complete cycles per second is the frequency which is measured in hertz.

resistor & potentiometer

Resistor is a two terminal passive electrical component that implants electrical resistance. in electronic circuits, resistors are used to reduce current flow. ohm's law : The behavior of an ideal resistor is dictated by the relationship specified by ohm's law. Ohm's law states that the voltage (V) across a resistor is proportional to the current (I), where the constant of proportionality is the resistance (R). resistors in series & parallel : The total resistance of resistors connected in series is the sum of their individual resistance values. The total resistance of resistors connected in parallel is the reciprocal of the sum of the reciprocals of the individual resistors. resistor color code : 1 potentiometer :  it is three terminal variable resistor.

tunnel diode

introduction : A tunnel diode is a highly doped semiconductor device that conducts current by quantum mechanical tunneling. it is also called as esaki diode named after leo esaki who got Nobel  prize in physics for discovering electron tunneling in 1973. Tunneling  Phenomenon: According to classical laws of physics, a particle must have an energy at least equal to the height of a potential-energy barrier if it has to move from one side of the barrier to the other. In other words, energy has to be supplied from some external source so that the electrons on one side of junction climb over the junction barrier to reach the other side. However if the barrier is thin such as in tunnel diode, the Schrodinger equation(Quantum Mechanics) indicates that there is a large probability that an electron will penetrate through the barrier. This will happen without any loss of energy on the part of electron. This quantum mechanical behavior is referred to as tunneling and the high-impurity P-N junctio...