sfu-db / dataprep

Open-source low code data preparation library in python. Collect, clean and visualization your data in python with a few lines of code.
http://dataprep.ai
MIT License
2.02k stars 204 forks source link

DataPrep.Connector: Location is required when latitude and longitude are provided (Yelp) #461

Open jnwang opened 3 years ago

jnwang commented 3 years ago

Describe the bug DataPrep.Connector always requires location to be specified. However, according to the Yelp API documentation, location is not required when latitude and longitude are provided. It would be better to make it consistent with the doc.

from dataprep.connector import Connector

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

df = await conn_yelp.query("businesses", term = "resturant", latitude = "49.28617652439037", longitude = "-123.13819352127699", _count = 10)
Screen Shot 2020-12-27 at 11 24 45 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

dovahcrow commented 3 years ago

Certainly, we can relax the requirement of location to optional, but that's not correct. Eventually, we want to have some enforcement of: either param A or param B exist.