Cloud DataLab & Google Spreadsheet for Visualizing data with BigQuery

Google Cloud Datalab is a powerful interactive tool for visualizing data of Google Cloud. It runs locally and connects to cloud services for exploring data.

We also use Cloud DataLab & Google Spreadsheet for Exploring data with Bigquery.

I. Cloud DataLab with BigQuery
1. Setup DataLab

Run Google Cloud Datalab with Docker

docker run -it -p "8081:8080" -v "${HOME}:/content" \
   -e "PROJECT_ID=" \
   gcr.io/cloud-datalab/datalab:local

run-docker-google-datalab

2. Bigquery and Charting

On browser, go to: http://localhost:8081/tree/datalab/docs/notebooks/tutorials/Data
Note: Please SignIn with Google Cloud Account by the Button at the top-left side of menu.
Enter: Interactive Charts with Google Charting APIs.ipynb,
Here are lots of charting which is coming with a Bigquery. So you can create a Chart for visualizing data of your BigQuery.

Example:

Bigquery

%%sql --module languages
SELECT repository_language AS language, COUNT(repository_language) as activity
FROM [publicdata:samples.github_timeline]
WHERE type = 'PushEvent'
  AND repository_language != ''
GROUP BY language
ORDER BY activity DESC
LIMIT 10

Charting

%%chart pie --fields language,activity --data languages
title: Top 10 OSS Programming Languages
height: 400
width: 800
pieStartAngle: 20
slices:
  0:
    offset: .2

google datalab charting

With Google DataLab, you can create a lots of charting type:

    annotation          Generate a annotation chart.
    area                Generate a area chart.
    bars                Generate a bars chart.
    bubbles             Generate a bubbles chart.
    calendar            Generate a calendar chart.
    candlestick         Generate a candlestick chart.
    columns             Generate a columns chart.
    combo               Generate a combo chart.
    gauge               Generate a gauge chart.
    geo                 Generate a geo chart.
    heatmap             Generate a heatmap chart.
    histogram           Generate a histogram chart.
    line                Generate a line chart.
    map                 Generate a map chart.
    org                 Generate a org chart.
    paged_table         Generate a paged_table chart.
    pie                 Generate a pie chart.
    sankey              Generate a sankey chart.
    scatter             Generate a scatter chart.
    stepped_area        Generate a stepped_area chart.
    table               Generate a table chart.
    timeline            Generate a timeline chart.
    treemap             Generate a treemap chart.
II. Google Spreadsheet with BigQuery

Go to Google Sheet, install Add-ons: OWOX BI BigQuery Reports.
Use, Add-ons: OWOX BI BigQuery Reports to create a Add a new report

add-new-report google cloud datalab
add-new-report google cloud datalab

Select a Google Bigquery Project, then create a Query:

Bigquery

SELECT repository_language AS language, COUNT(repository_language) as activity
FROM [publicdata:samples.github_timeline]
WHERE type = 'PushEvent'
  AND repository_language != ''
GROUP BY language
ORDER BY activity DESC
LIMIT 10

bigquery-google-cloud-datalab

Then press Save & Run, We have a table result.
Now on menu bar, select Insert->Chart, We have a list of recommended charts, you can choose them or customization

chart-recommendation-google-bigquery



By grokonez | September 18, 2016.

Last updated on June 4, 2017.



Related Posts


Got Something To Say:

Your email address will not be published. Required fields are marked *

*