Git Product home page Git Product logo

bigquery-maps-api's Introduction

Google Maps API and BigQuery Codelab

Synopsis

This is not an official Google product.

This project demonstrates how to perform simple geospatial queries against a Google BigQuery table that contains latitude, longitude data in columns. It also shows how to use the Google Maps Platform's Maps JavaScript API to present a visual interface for the queries and the query results. The code accompanies a codelab which can be found on the Codelabs page at the Google Developers site. The files are arranged in sequential order to demonstrate progress through the codelab, but if you want you can jump straight in to the finished example.

Motivation

The project and accompanying Codelab aim to illustrate some ways to work with and visualize geospatial and location data in BigQuery tables without needing specialized libraries, ETL workflows or spatial data formats.

Installation

The repo consists of static HTML files that can be run from a local computer or any web server.

To get it working, you'll need to sign up for BigQuery and the Google Maps API. See the codelab for more detailed instructions, but the basic steps to get this running are:

  • Sign up for a Google Cloud Platform account and create or use an existing project.
  • Enable the BigQuery API and the Google Maps Javascript API in the Developer Console.
  • Enable the Maps JavaScript API) for your project.
  • Create a new API Key for use with the Google Maps Platform, with a Browser restriction.
  • Choose a BigQuery dataset to query. There are several public datasets with latitude/longitude data.
  • modify the code to replace the placeholders for API keys, and BigQuery dataset and table name parameters with your own specific values for these.
  • Install the default Cloud HTTP function, wrap the BigQuery API calls through Python Client APIs. Go to GCP cloud shell, run the following commands:
PROJECT_ID=YOUR_PROJECT_ID
cd $HOME
git clone https://github.com/rick-c-goog/bigquery-maps-api.git
cd $HOME/gmp-dds-bq-example
gcloud config set project $PROJECT_ID  
./start.sh

If something goes wrong, run ./start/sh again.

Cloud Function Validation steps: Go to Cloud Function console screen, make sure cloud function, gmp-bq-function created successfully( green check on left side).

API Reference

For a general overview of Google BigQuery see What Is BigQuery?

You may find it helpful to refer to the Google Maps Platform documentation, the Google BigQuery reference, and the BigQuery Python Client API reference.

License

This project is licensed under the Apache 2.0 license.

bigquery-maps-api's People

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.