python - Using Yelp API to estimate number of businesses in a given city -
python - Using Yelp API to estimate number of businesses in a given city -
i'm experimenting yelp api, using python. i'm interested in estimating number of businesses nowadays in city using yelp api.
example
i tried doing san francisco, follows:
#create yelp_api using private keys search_results = yelp_api.search_query(location="san francisco, california") business_estimate = search_results['total'] #total total number of results obtained my reasoning above was, in leaving other fields blank search broad possible, i.e. search of businesses in san francisco.
however, between executions of above script, business_estimate fluctuated in thousands. e.g. 63000, 55000, 81000
question
my question is, why business_estimate fluctuate much? also, there improve method mine estimating number of businesses in given city method?
for reference, here yelp api documentation: http://www.yelp.ie/developers/documentation/v2/search_api
if interested in number of businesses in area, not seem right rely on yelp, think focuses on consumer facing businesses , not complete. if want info free: have considered using census instead? e.g.: http://www.census.gov/econ/cbp/overview.htm
python bigdata yelp
Comments
Post a Comment