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

Is it possible to create a google cloud datalab instance not using datalab-network?
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?

Categories

HOME
fabricjs
assembly
ng-idle
apache-jena
battery
apiblueprint
can
database-normalization
onclick
lanczos
bing-maps
accessibility
distribution
appcelerator-studio
jxl
comsol
gource
magnetic-cards
android-intent
digital-signature
sse
cfml
delphi-xe5
boost-icl
lilypond
undertow
ember-cli
exploit
object-storage
tosca
android-maps
testcomplete
corenlp-server
anki
login-script
carriage-return
baidu-map
connection-pool
metaprogramming
ogc
magento-1.9.3
movilizer
tcc
angular-http
uiimage
opencmis
httrack
xbmc
cnc
google-cse
payara-micro
mouseleave
gpg-signature
filenet
juice-ui
rocks
redistributable
segment-io
cifilter
lean
omniauth-facebook
angular-ui-typeahead
findfirst
cycle2
toran-proxy
themoviedb-api
jdi
flock
google-books
dronekit-android
apache-commons-daemon
avahi
canvg
aspectj-maven-plugin
cakephp-2.7
android-cookiemanager
filesplitting
universal-image-loader
paste
menubar
synapse
getopt
bin
gtm-oauth2
mbunit
nebula
actiondispatch
traceability
video-codecs
stacky
server-administration
http-status-code-410
argouml
onmousemove
monotouch.dialog
pyunit
garbage
azman
jsr286
fsevents
filemerge
cloudfiles
ajax-polling
django-piston
filesystemobject
complex-event-processing
fail-fast-fail-early
sqlobject
httpcookie
leader
appliance

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