1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Google Cloud Datalabのチャート実行メモ

Posted at

はじめに

Google Cloud Datalabで使用できるチャートについて公式では視覚的にわからなかったので実行メモ。

公式
https://googledatalab.github.io/pydatalab/google.datalab%20Commands.html

元データ

%%bq query --name total_births
SELECT 
  CAST(source_year AS string) AS year, 
  COUNT(is_male) AS birth_count
FROM `publicdata.samples.natality`
  GROUP BY year
ORDER BY year DESC
LIMIT 15

annotation

%chart annotation --fields year,birth_count --data total_births

エラー:First column must contain date, or date and time. 

area

%chart area --fields year,birth_count --data total_births

image.png

bubbles

%chart bubbles --fields year,birth_count --data total_births

エラー:Data table should have at least 3 columns

calendar

%chart calendar --fields year,birth_count --data total_births

エラー:id data table format: column #0 must be of type'date|datetime'.

columns

%chart columns --fields year,birth_count --data total_births

image.png

combo

%chart combo --fields year,birth_count --data total_births

image.png

geo

%chart geo --fields year,birth_count --data total_births

image.png

heatmap

%chart heatmap --fields year,birth_count --data total_births

image.png

line

%chart line --fields year,birth_count --data total_births

image.png

map

%chart map --fields year,birth_count --data total_births

image.png

org

%chart org --fields year,birth_count --data total_births

image.png

paged_table

%chart paged_table --fields year,birth_count --data total_births

image.png

pie

%chart pie --fields year,birth_count --data total_births

image.png

sankey

%chart sankey --fields year,birth_count --data total_births

エラー:id data table format: must have at least 3 columns.

scatter

%chart scatter --fields year,birth_count --data total_births

image.png

stepped_area

%chart stepped_area --fields year,birth_count --data total_births

image.png

table

%chart table --fields year,birth_count --data total_births

image.png

timeline

%chart timeline --fields year,birth_count --data total_births

エラー:id data table format: must have 3 or 4 data columns.

treemap

%chart treemap --fields year,birth_count --data total_births

エラー:lumn 1 must be of type string

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?