はじめに
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
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
combo
%chart combo --fields year,birth_count --data total_births
geo
%chart geo --fields year,birth_count --data total_births
heatmap
%chart heatmap --fields year,birth_count --data total_births
line
%chart line --fields year,birth_count --data total_births
map
%chart map --fields year,birth_count --data total_births
org
%chart org --fields year,birth_count --data total_births
paged_table
%chart paged_table --fields year,birth_count --data total_births
pie
%chart pie --fields year,birth_count --data total_births
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
stepped_area
%chart stepped_area --fields year,birth_count --data total_births
table
%chart table --fields year,birth_count --data total_births
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