google-cloud-datalab


%%chart line graph in Datalab based on Bigquery data not rendering


I am running a query against our GAP data in Bigquery and I want to generate a chart from it.
%%sql --module mobileGraph02
SELECT STRFTIME_UTC_USEC(UTC_USEC_TO_DAY((visitStartTime+36000)*1000000),'%Y/%m/%d') AS dateDate,
EXACT_COUNT_DISTINCT(fullVisitorId) AS sessions
FROM TABLE_DATE_RANGE([99949271.ga_sessions_],
TIMESTAMP('2016-02-21'),
TIMESTAMP('2016-02-25'))
GROUP BY dateDate
ORDER BY dateDate
I attempted to create a graph from this based on one of the examples in the 'Interactive Charts with Google Charting APIs' file.
%%chart line --fields dateDate,sessions --data mobileGraph02
And this version:
%%chart line -f dateDate,sessions -d mobileGraph02
The help document in the UI is returning the following:
%%chart line -h
usage: %%chart line [-h] [-f FIELDS] -d DATA
optional arguments:
-h, --help show this help message and exit
-f FIELDS, --fields FIELDS
The field(s) to include in the chart
-d DATA, --data DATA The name of the variable referencing the Table or
Query to chart
I found that the chart itself was not rendering and there was no error message as per this post:
Charts drawn with %%chart command do not render
Datalab doesn't do much validation of the data before passing it to the charting library (that might change one day if https://github.com/GoogleCloudPlatform/datalab/pull/676 gets merged). Errors might have been reported in the browser console, as a result, as the chart library is Javascript code.

Related Links

fail to create repository [datalab-notebooks] for Project
bigquery - current_date() inconsistent result?
Can I export to Google Sheets from Datalab?
Using bq command in datalab - credentials needed
Can I create kernel gateway endpoints in google cloud datalab?
Fastest way to read big amounts of data in Google Datalab?
Datalabs project not found
Datalab front get stuck when opening notebooks, and buttons aren't working
How can I programmatically give Cloud ML access to a bucket?
Running cloud datalab kernel on my own server?
How can I get the Cloud ML service account programmatically in Python?
Google datalab : how to import pickle
Is text the only content type for %%storage magic function in datalab
Do I need to update gcloud components as indicated in docker startup
How to import user-written custom modules in google datalab?
Access to Google Cloud Datalab Fails with ssh Error

Categories

HOME
google-app-engine
fftw
socket.io
gradient
can
parameters
data-visualization
nancy
ksh
event-store
jboss6.x
stackexchange
jackson-modules
apktool
rpgle
exchangewebservices
iis-express
event-flow
mobx
weather
wacom
instantiation
nested-lists
jwplayer6
apiary.io
reason
linq-to-objects
apache-stanbol
softmax
show-hide
dapper-simplecrud
fwrite
ntvs
wcftestclient
rserve
pdf-conversion
quicktime
template-toolkit
meteor-packages
resourcemanager
wso2developerstudio
dup
cifilter
refinerycms
database-relations
thread-sleep
rasterize
jnlua
.bash-profile
ember-cli-rails
ocra
keyup
snackbar
bufferedinputstream
diff3
user-permissions
broadband
showdialog
theos
packet-sniffers
angular-gettext
boost-program-options
punycode
dct
visual-studio-express
eclipse-kepler
c++builder-xe5
mantle
bjyauthorize
jdb
virtualpathprovider
relative
u2netdk
appledoc
svk
dot-emacs
aspmenu
nstokenfield
tui
complex-event-processing
asynchronous-wcf-call
fdf

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App