dataprep icon indicating copy to clipboard operation
dataprep copied to clipboard

DataPrep.Connector: Yelp does not support many query parameters (categories, sort_by, price, ...)

Open jnwang opened this issue 5 years ago • 1 comments

Describe the bug I was trying to get the top-10 yoga stores (sorted by ratings) in Vancouver. The Yelp config file does not contain "categories" or "sort_by". I downloaded the config file as a local file and added "categories" and "sort_by" into the "params" field. It worked, but it gave me strange results. The top-10 returned by _count = 50 and _count = 100 are different.

from dataprep.connector import Connector

conn_yelp = Connector("./yelp", _auth={"access_token":yelp_access_token}, _concurrency = 5)

 # Check all supported categories: https://www.yelp.ca/developers/documentation/v3/all_category_list
df = await conn_yelp.query("businesses", categories = "yoga", location = "Vancouver", sort_by = "rating", _count = 50)
df 
Screen Shot 2020-12-27 at 11 12 53 PM
from dataprep.connector import Connector

conn_yelp = Connector("./yelp", _auth={"access_token":yelp_access_token}, _concurrency = 5)

 # Check all supported categories: https://www.yelp.ca/developers/documentation/v3/all_category_list
df = await conn_yelp.query("businesses", categories = "yoga", location = "Vancouver", sort_by = "rating", _count = 100)
df 
Screen Shot 2020-12-27 at 11 13 41 PM

Desktop (please complete the following information):

  • OS: MacOS Catalina
  • Browser: Chrome
  • Platform: Jupyter Notebook
  • Platform Version 6.0.1
  • Python Version 3.7.4
  • Dataprep Version 0.2.4

It would be better to support all query parameters listed on this page: https://www.yelp.ca/developers/documentation/v3/business_search

jnwang avatar Dec 28 '20 05:12 jnwang

CleanShot 2021-01-05 at 15 54 55 This is what I got, with the develop branch and "yelp@develop" config. It seems like the order is consistent on my side.

dovahcrow avatar Jan 05 '21 23:01 dovahcrow