Giter VIP home page Giter VIP logo

businesses-near-me's Introduction

businesses-near-me

Find up to 60 businesses near you!

What is this?

This is a Python tool run in GitHub Actions that uses Google's Place & Address Validation APIs to find up to 60 businesses of a specific type (cafe, gas station, dentist, etc.) within a radius of 30 miles or less of a specific address. The limitations mentioned here come from the limitations of the APIs themselves, and that's probably a good thing considering how high of a bill these APIs can run someone.

How do I set this up for myself? (5 - 10 minutes)

Get your Google API key

You will need your own Google API key for this tool, and that requires a billing account set up in Google Cloud Platform. HOWEVER, you get $200 in free credits per month. That should cover you for many runs of this tool. Further, when you set up a billing account it automatically sets up budget alerts for you. Read more about getting your own API key here: https://developers.google.com/maps/documentation/places/web-service/cloud-setup. You will only need to follow the "Enable Billing" and "Enable APIs" sections. All you will need from this is your API key itself.

Enable Address Validation API

Within the GCP Console, search for the Address Validation API. From there, enable the API. This will use the same key that you grabbed above so you are done with the GCP Console at this point.

Fork this repository

Click the button on the top right of this repository and select fork to a repository on your account. This is done so that you can use your repository's secrets. Once you fork the repository, head over to the Actions tab. You will see a warning like this:

"Because this repository contained workflow files when it was forked, we have disabled them from running on this fork. Make sure you understand the configured workflows and their expected usage before enabling Actions on this repository."

From there, press the green button that says "I understand my workflows, go ahead and enable them."

Put your Google API key in the forked repository secrets

Go to the Settings tab for your forked repository. Once in Settings, scan the left menu and click on the downward facing carrot to the right of Secrets. Click on Actions. Once in Actions, click the green button in the top right corner that says "New repository secret." Set the Name as GOOGLE_API_KEY and enter the Google API key in the body text below label Secret. Click the "Add secret" button.

Finally, how do I run the tool?

Now that you're all set, go to the Actions tab and select the "Run Script" option from the left menu.

Inputs

Outputs

Once the workflow has run successfully, click on the Summary option in the left menu of the run. You will see a bussinesses-output in the Artifacts section towards the bottom of the page. That is your CSV file with up to 60 businesses near you. Hope you enjoy my little side project!

Future Updates/Development

  • Make business type input a dropdown menu with set values to avoid user error. This is important because the type is part of the API call and entering an invalid one will cause the tool to fail.
  • Put this tool on GitHub Pages or GitHub Apps for ease of use. I'm thinking of a button that the user presses that kicks off a workflow that logs the user into GitHub. Once user is authenticated, workflow forks the repo and stores the Google API key as a secret in their forked repo. From there, the page would just ask for the 3 inputs mentioned above.

businesses-near-me's People

Contributors

peyto15 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.