Giter Site home page Giter Site logo

googlemap's Introduction

Stargazers MIT License LinkedIn

Table of Contents

About the Porject

The project can do a brand or a category nearby search for specific locations, and get the Geodata into an excel document as tabular format. For example, you want to know how many fast-food restaurants (includes addresses) within 5 miles of Ivy League schools.

Prerequisites

Libraries

This was created and tested using Python3.7 and using some libraries including openpyxl, googlemaps, prettyprinter, urllib3. These libraries are needed. To install with pip:

pip install openpyxl
pip install googlemaps
pip install urllib3
pip install prettyprinter

Google Map API

The project also requires Google Map API Key. Please register and fill your API Key into the program.

api_key = 'Enter your Google Map API HERE'

if api_key is False:
    print("API is False")
else:
    serviceurl = 'https://maps.googleapis.com/maps/api/geocode/json?'

Installation

Download my repository

https://github.com/nathanliu100/googlemap/releases/tag/v1.0

Usage

  1. Download the new release file
  2. Go to the 'py' folder and you will see 'ingeneral_Geotargeting.py' file
  3. Open the file and execute the code, you will see this as follow
Create a Workbook As: 
*15 miles = 24140 meters
*10 miles = 16093 meters
*5 miles = 8047 meters
The maximum of the radius: 50,000 meters
Set the Store Name: 
Set the Store's Type: 
Set the radius (meters): 
Enter file name:
the file name should be test.txt, where is in the py folder
! After seeing this as follows, which means you successfully run the program

Step1

! After that, check your py folder, and you will see a demo1.xlsx

Step2

! The excel doc looks like this

Step3

! If you clean up the data as the following format, you will able to do some data analysis 

Step4

! Also attached an example, the chart demonstrates a list of how many individual fast-food stores within 5 miles of Ivy League schools

Step5

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Maintainer

@nathanliu100

License

MIT © Yongliang Liu

googlemap's People

Contributors

nathanliu100 avatar nathanphilliber 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.