Git Product home page Git Product logo

google_maps_api's Introduction

使用 Google Maps API 搜尋附近的飲料店

介紹

這個程式使用Colabn notebook編輯器 與 Google Maps API 搜尋指定位置附近的飲料店。您可以輸入您的位置坐標,設定搜尋半徑和關鍵詞,然後程式將返回附近的飲料店的名稱、地址和評分。

使用前提 需申請google maps api

API 的申請、爬 Google Map 店家資料、搞懂 API 限制

  • 在這個實際案例中,我會用 Google Map API 來取得店家資料,並且存成可以分析的資料形式 (csv)
  • 首先,在這之前,需要申請 Google Map API,這個過程可以讓你了解 Google 如何把 API 授權給我們
  • API 限制:這邊可以看到 Google Map API 的限制,我們可以先用免費的方式來使用

安裝必要的套件

請確保您已經安裝了必要的套件,可以使用以下指令安裝:

pip install -U googlemapspip
pip install -U pandas

使用說明

  1. 首先,請在程式中輸入您的 Google Maps API 金鑰。
  2. 設定您的位置坐標 (經度和緯度),以及搜尋半徑和關鍵詞。
  3. 執行程式後,程式將返回附近的飲料店的資訊。
  4. 結果將以 CSV 檔案格式下載到您的本地計算機上。

範例結果

以下是搜尋結果的範例: image

注意事項

  • 請確保您的 Google Maps API 金鑰有效且有足夠的配額。
  • 請注意使用 Google Maps API 時的費用和限制。

希望這能幫助到您!如果您有任何問題,請隨時提問。

google_maps_api's People

Contributors

tn00627974 avatar

Watchers

 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.