Author: Samarth Goel
This script takes in a list of restaurant names and a location, and outputs a csv file with a fair amount of the restaurant's data.
This script uses the Google Maps API and the Yelp Fusion API. In order to use it, create a Google Maps API Key using the instructions here and a Yelp API Key here and add both a GOOGLE_MAPS_API_KEY
and a YELP_API_KEY
variable to a local .env
file.
To use a list of restaurants as an input, put it in the datasets
folder as a txt
file. An example file, nyc-bib-gourmand.txt
has been provided to demonstrate proper format. After running the script, you can find the outputted csv file in the outputs
folder.
After setting an API key, run generate.ipynb
and set the data
, output_name
, and location
variables at the top of the notebook and run the remaining cells. You can find the resulting csv in the outputs
folder.
- Missing Values
There's a couple of missing values, which are currently set to empty strings. Perhaps querying another search engine and cross-referencing will fix the issue.
- Accurate Cost
While the cost column uses Google's traditional $ - $$$$ system, I want to get a more accurate cost measure in actual dollar amounts. Perhaps adding basic ML to a menu scan (given the menu can be found through the current API) or a scroll of the website to find the menu would work.