Giter VIP home page Giter VIP logo

screlp-cli's Introduction

Screlp

Synopsis

Screlp is a tool that queries the Yelp API and returns the results as a CSV file. It can take a single query and turn it into multiple, smaller-scale queries. In this way, it can retrieve more results than the standard Yelp API will allow.

Setup

To get started, you'll want to ensure all your dependencies are installed by running the command pip3 install -r requirements.txt.

Once you've gotten your modules installed, you'll need to set up your creds.ini file. The blank.ini file included is arranged so that you just copy paste the values from the Yelp API page in the order that they appear. For example, this is how the file should look with made-up values:

ConsumerKey = BLAHBLAHBLAH

ConsumerSecret = HARHARHAR

Token = YADDAYADDAYADDA

TokenSecret = HAHAHAHAHA

Command Line Arguments

  • -a/--address: An address field. Used by pygeocoder module to retrieve decimal degrees coordinates for a given address.
  • -t/--term: Search term. Implemented in the API URL construction as a search parameter.
  • -r/--radius: Search radius. Used to generate multiple coordinates on the map and to limit results from a query.
  • -d/--density: Coordinate grid density. Number provided is one greater than the number of points generated between the origin coordinate and the outer bounds coordinates. In the calculation of the number of coordinate points necessary to generate, it is the x in f(x) = (1+2x)²
  • -c/--category: Category filter. Limits Yelp search results to within a cerrtain business category. Tricky to use properly, has to be taken from a list found here: http://www.yelp.com/developers/documentation/v2/all_category_list

Usage Example

$ python3 screlp.py -a="603 Red River St. Austin, TX 78701" -t="pizza" -r=2 -d=3

The files in this repo's examples folder are the result of this query.

To-Do

  • I'd like to make it so that the script can generate maps of all the results received.
  • I'd also like to have some method of tracking rank of a given result over time/geography.
  • It'd be cool to sell this for, like, a million bucks or whatever, too.

screlp-cli's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.