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

BJT (bipolar junction transistor)

A bipolar junction transistor is a three terminal semiconductor current controlled device with two P-N junctions. The three terminals are emitter(E), base(B) and collector(C). the emitter junction is heavily doped, base is less doped and made very thin and collector terminal is moderately doped. Collector has grater size than emitter and base terminal is thinner than both. (The thinner the base, the stronger the E-C electric field, and the larger the impact of a small current injected into the base. Explained clearly in active mode operation below) emitter terminal is moderate in size. A BJT has two types of transistors: NPN transistor PNP transistor NPN transistor : In an NPN transistor a p-type material is sandwiched between two n-type materials. [gallery ids="979,978" type="rectangular"] PNP transistor : In a PNP transistor a n-type material is sandwiched between two p-type materials. [gallery ids="989,990" type="rectangular"] Oper...

photodiode

Introduction : A photo diode is a semi-conductor device, with a p-n junction and an intrinsic layer between p and n layers. It can be used as a light detector, which involves the conversion of light into current or voltage depending on mode of operation. [gallery ids="867,866" type="rectangular"] construction :   Working : When a photon of sufficient energy strikes the diode, it creates an electron-hole pair. This mechanism is also known as the inner photoelectric effect. If it occurs at the junction these carriers are swept from the junction by the built-in electric field of the depletion region. Thus holes move toward the anode, and electrons toward the cathode, and a photo current is produced. The total current through the photo diode is the sum of the dark current (current that is generated in the absence of light) and the photo current, so the dark current must be minimized to maximize the sensitivity of the device. Mainly it is operated in two modes 1.  Photo ...

P-N junction diode

A P-N junction diode is a basic diode. It is the combination of P-type and N-type semiconductor. symbol : P-N junction and potential barrier : A P-N junction is the basic building block of many semiconductor devices like diodes and transistors. P -n  junctions are formed by joining  n -type and  p -type semiconductor materials. Since the  n -type region has a high electron concentration and the  p -type a high hole concentration this difference in concentration creates density mismatch across junction which results to creation of potential barrier. The value of potential barrier v b  is 0.3 for germanium and 0.7 for silicon. Working : Forward bias: Application of positive charge at p-side pushes holes towards potential barrier and similarly negative charge at N-side pushes electrons towards barrier if input voltage is grater than potential barrier then electrons diffuse from the  n -type side to the p-type side. Similarly, holes flow by diffusion from the p-type side to the n-type side...