Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Google Visualization API Essentials
Google Visualization API Essentials

Google Visualization API Essentials: Make sense of your data: make it visual with the Google Visualization API

Arrow left icon
Profile Icon Traci Lynn Ruthkoski
Arrow right icon
€27.89 €30.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (1 Ratings)
eBook Apr 2013 252 pages 1st Edition
eBook
€27.89 €30.99
Paperback
€38.99
eBook + Subscription
€24.99 Monthly
Arrow left icon
Profile Icon Traci Lynn Ruthkoski
Arrow right icon
€27.89 €30.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (1 Ratings)
eBook Apr 2013 252 pages 1st Edition
eBook
€27.89 €30.99
Paperback
€38.99
eBook + Subscription
€24.99 Monthly
eBook
€27.89 €30.99
Paperback
€38.99
eBook + Subscription
€24.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Google Visualization API Essentials

Chapter 1. Tools and Setup

It may come as a surprise to learn that using Google Visualization (Chart) Tools requires very little prior knowledge. One of the most satisfying aspects of working with this set of tools is the ease of leveraging a cloud platform. In other words, there is no requirement for high performance personal hardware and software setup that requires constant care and feeding on a laptop or desktop. While not ideal, it is even possible to develop projects from a tablet interface. In addition, with the interactive nature of the environment, real-time programming capability is a big plus during development.

In this chapter, the following topics are covered:

  • Knowledge prerequisites
  • Interacting with Google Visualization Tools

Knowledge prerequisites

With Google Visualization Tools, a developer with knowledge of HTML5 and some JavaScript can utilize approximately 90 percent of the functionality of the Application Programming Interface (API). Some methods of creating visualizations do not even require writing code at all, but instead rely on the Graphic User Interface (GUI) of common Google Drive (previously known as Google Docs) tools. The remaining 10 percent of the functionality comes from the ability to interface with custom data sources. Google often makes its Java Libraries, in this case the Data Source Libraries, available for developers to use. A developer requiring such a capability can build custom data source connectors to a database on a web server. However, data connectors provided in the Visualization API, including communications through a SQL-like query language and jQuery, are generally adequate for most visualization projects.

Skill summary

To work in depth with the Visualization APIs, the following programming skills are highly recommended:

  • HTML5
  • JavaScript
  • Java (specific uses only)

System requirements

In short, the Visualization API requires very little beyond a text editor and Internet access to create visualizations. However, additional tools make development much easier. Suggested tools or services when working with the Visualization API are as follows:

A Google account is required for the purposes of this book. Without a Google account, many of the tutorials and examples will not work properly.

Interacting with Google Visualization Tools

The key to understanding and then navigating the Google tool options is to first understand that everything is designed with integration in mind. In fact, much of Google's environment is already integrated to some degree. In this respect, the Google environment is truly an ecosystem of tools and capabilities. Some tools are focused on users that do not want to write code to create visualizations, while other tools allow a seasoned programmer to manipulate data with the API in very creative ways. The rest of this chapter is dedicated to an overview of the tools that are most commonly used as entry points for creating Google visualizations.

Charts for Google Spreadsheets

For anyone new to creating data visualizations with Google tools or those who are lacking in programming abilities, Google Spreadsheets is the ideal starting point. Spreadsheets allow developers at any experience level to easily create a wide variety of visualizations from Google's Spreadsheet platform through a point-and-click user interface. The primary limitation to this method is the lack of style and data formatting flexibility.

Tip

Fast facts: Google Spreadsheets Charts

  • Experience level: Beginner to intermediate
  • Programming languages: Google CodeScript (not required)
  • Advantages: Easy to use, fast deployment, and code not required
  • Limitations: Style options, data format flexibility, and scaling limits
  • Documentation: http://www.google.com/google-d-s/spreadsheets/

Getting started – creating a new spreadsheet

Once logged in to Google Drive, create a chart using Google Spreadsheets. Create the spreadsheet in Google Drive by selecting Create | Spreadsheet.

Getting started – creating a new spreadsheet

In the newly created spreadsheet, copy and paste, or otherwise enter the data to be visualized. Advanced methods of data import and manipulation can also be accomplished using the built-in scripting capabilities of Google Docs or through the Spreadsheets API. It is important to note that when using Spreadsheets to create charts, data must be arranged according to the requirement of the chart. To select a chart and in turn learn about its data formatting requirements, first insert the chart into the spreadsheet by selecting Insert | Chart… from the menu tab options.

Getting started – creating a new spreadsheet

To select the appropriate chart for your data, the Spreadsheet Chart Editor detects the current data layout and then attempts to determine the correct chart selection. Further selection and customization techniques for charts in Google Spreadsheets are covered in Chapter 3, Spreadsheets, Charts, and Fusion Tables.

Fusion Tables

Google Fusion Tables is a tool primarily focused on geospatial visualization, and is available through logging in to Google Drive. If map visualization is desired, Fusion Tables is an ideal tool due to its built-in geocoding capabilities, recognition of standard marker names, and HTML-ready information windows. Fusion Tables is also capable of producing other charts such as line, bar, pie, scatter, and timelines. As a rapidly evolving application, Fusion Tables also presents a variety of experimental features still in testing. Opportunities to experiment with the latest features can be found by selecting the link, View in Experimental, at the top of the browser window, as shown in the following screenshot. Fusion Tables accepts a variety of import formats, including CSV, KML, ODS, XLS, and Google Spreadsheets.

Fusion Tables

Tip

Fast facts: Google Fusion Tables

  • Experience level: Beginner to intermediate
  • Programming languages: Some HTML
  • Advantages: Maps applications, scaling capacity, bulk data handling
  • Limitations: Chart selection, style customization
  • Documentation: http://www.google.com/fusiontables/

Getting started – creating a new Fusion Table

To build a Fusion Tables visualization, create a new Table from the Google Drive Create tab. An alternative method to open the Fusion Table application is to visit http://www.google.com/fusiontables/ and click on the Getting started – creating a new Fusion Table button.

In addition to manual entry, Fusion Tables allows Google Spreadsheets or a local file to be imported as data. Fusion Tables allows uploading of spreadsheets, delimited text files (.csv, .tsv, or .txt), and Keyhole Markup Language files (.kml) as table sources.

Getting started – creating a new Fusion Table

For users with enterprise class map visualization needs, Google offers a for-fee service, Google Map Engine. Map Engine runs with the same services that support regular maps and earth, but are backed by Google's compute cloud for high performance mapping capabilities. Unlike Fusion Tables, Map Engine does not include visualization methods other than map-based options.

You can find more information on Google Map Engine at http://www.google.com/enterprise/mapsearth/products/mapsengine.html.

Scripting code

HTML code that contains references to the Visualization API (or any Google API for that matter) can be run locally, or hosted by any web hosting service. However, one of the easiest methods is to simply use Google's own App Engine to host visualizations. App Engine is a scalable web hosting environment that can be linked to development platforms, such as Eclipse, which offers a seamless web development workflow when using the Google Web Tools plugin for Eclipse.

Google App Engine currently offers developers 10 free, hosted applications, with additional capacity available through pay-as-you-go fees. For developers looking to experiment with Google APIs, including the Visualization API, App Engine paired with Eclipse is a capable yet affordable platform. However, for developers not quite ready to build complex applications, Google maintains a free, real-time API sandbox for development use. Additionally, for developers who are not quite so advanced at this time, online IDE environments are easy and affordable for code development. They also generally offer an automated connection to cloud hosting services, such as Google App Engine.

Tip

Fast facts: Scripting code using the Visualization API

  • Experience level: Intermediate to advanced
  • Advantages: Full customization and scalability
  • Limitations: Developer experience
  • Web hosting: Optional but Recommended
  • Documentation: https://developers.google.com/chart/

You can find more information at the following links:

Code Playground

Code Playground is Google's real-time AJAX code development sandbox for discovering, learning, and testing Google API code. The Playground is updated regularly, with feature updates as well as new API examples. It's worth the effort to check this space regularly to see if something new has been released. The Visualization API release notes are also a very helpful resource for this task.

The sandbox has a tree-structured Navigation window in the upper-left corner of the page. Depending on which API example is highlighted, sample code and corresponding live output are displayed in the Edit Code and Output windows respectively. Code in the Edit Code window can be edited in real time, with changes appearing in the Output window after the Code Playground button is clicked.

Code Playground

Code Playground also allows developers to save modifications to existing API examples within the environment. If a developer wants to save the state of HTML displayed in the Edit Code window, there are options to Save as well as Export to view a live version. When logged in with a Google account, the Save option saves the current code state to the Code Playground itself. Export saves the current state to a Google App Engine instance that can be referenced by the ID contained in the URL.

Code Playground

Finally, to view Google's documentation and other resources for the currently highlighted API, select the Code Playground button. To edit all HTML encapsulating the API calls, click on the Code Playground button.

You can find more information at the following links:

Debugging tools

A clear advantage to developing Google APIs in the Code Playground environment is the integrated debugging mode. Code Playground makes use of the Firebug Lite web development tool. To activate debug mode, click on the Debugging tools button. (Note that Chrome users can also use Chrome's built-in JavaScript console.)

Console

Debug mode offers several methods of testing and debugging code. To toggle between the DOM and Console views, select the appropriate tab. To clear the console, select Clear. To get more information on Firebug and Firebug Lite, click on the bug icon.

Console

A feature of Firebug Lite that can be easily missed is the Firebug Lite Settings window. To view Firebug Lite Settings, select Options in the bottom-right corner of the Playground interface. To configure the debugging environment as desired, check or uncheck the options in the list.

Console

Additionally, the command line offers yet another method of testing and debugging the code in the Code Playground environment. Developers can set variables, test scenarios, and otherwise debug code through a command line real-time input. The resulting output, depending on the entries to the command line, is viewed in the debug Console window.

Console

Gadget Editor

If the end purpose of the visualization is to be embedded in a Google Calendar, Gmail, Sites, or other application, encapsulating the visualization within a Google Gadget wrapper can be helpful. A simple method of creating a visualization intended for a Gadget is to first edit the API code, with HTML included, in the Code Playground, and then cut and paste in between the appropriate tags in the Google Gadget Editor.

Gadget Editor

The Gadget Editor itself is a simple HTML editing interface with a preview mode included. A Google Gadget is comprised of two major sections within a set of <Module> tags. The <ModulePrefs> tag contains information about the gadget, including the title, author name, thumbnail location (in the Gadget Gallery at http://www.google.com/ig/directory), and description. To publicly publish a gadget in the Gadget Gallery, the ModulePrefs section must be laid out according to Google's standards (http://www.google.com/ig/submit), as well as follow Google's terms of service (https://developers.google.com/gadgets/terms-nc).

To insert content, place the desired gadget's content to be displayed between the <Content> tags. The general format for content is HTML, but JavaScript can also be used. To save a Gadget, select File | Save. The gadget is now stored on Google servers, but is only available to those with the link and not available publicly. To publish a gadget to the public Gadget Gallery, select File | Publish from the menu options.

Just as the newly created gadget is stored on Google infrastructure when using Gadget Editor, images and other content can also be stored in the same location for the gadget's use. Select File | Upload to upload images for the gadget's use. The image URL resulting from the upload, usually of the form http://hosting.gmodules.com/ig/gadgets/file/12345…/filename.png, can then be used to reference the image in the gadget HTML.

Tip

Fast facts: Gadget Editor

  • Experience level: Intermediate to advanced
  • Advantages: Free Google hosting available and embedding in web pages and apps
  • Limitations: Developer experience
  • Documentation: https://developers.google.com/gadgets/

Tip

WARNING

The future of Google Gadgets is unclear at the time of publishing. Many features of Gadgets are being absorbed by other Google services. However, they are still available as a platform for development.

You can find more information on Google Gadget Editor at https://developers.google.com/gadgets/docs/tools#GGE.

Summary

It is important to remember that there are multiple methods of creating visualizations when working with Google tools. A developer may choose to select one method over another, depending on the complexity and features required by the visualization. It is also important to observe that Google is actively adding functionality to the API collections as well as the user interface applications. Regular visits to the API documentation and Code Playground will generally yield new methods of visualization creation. In summary, at the time of this publication, visualizations using Google tools can be created with:

  • Google Spreadsheets
  • Google Fusion Tables
  • Custom applications that reference the Google Visualization API, created in Code Playground or a third-party platform (for example, Eclipse)

Architecture and types of visualization options is the topic of the next chapter.

Left arrow icon Right arrow icon

Key benefits

  • Wrangle all sorts of data into a visual format, without being an expert programmer
  • Visualize new or existing spreadsheet data through charts, graphs, and maps
  • Full of diagrams, core concept explanations, best practice tips, and links to working book examples

Description

There's a lot of data in our world, and visual representations are often the best method of making sense of it all. Yet, it should not take an army of programmers and analysts to create visualizations in order to make data useful. The Google Visualization API is accessible to novice and advanced programmers alike, making data useful to more people."Google Visualization API Essentials" will show you how to create interactive data displays with very little code. The API, combined with Google Spreadsheets and Fusion Tables, is a complete system, from data management to analytical displays. Not only is it simple to learn, but the Google Visualization API can also be viewed as a first step to learning additional Google APIs."Google Visualization API Essentials" uses both methodology overviews and hands-on examples with real data to introduce chart and graph creation on the Google platform. Topics are presented from various aspects, including Google Spreadsheets and Fusion Tables, and Graphic User Interfaces. An overview of the various API development environments available to developers is also covered. Basic and advanced charts, data source connectivity, style formatting, and publishing options are also explored in depth."Google Visualization API Essentials" brings the arsenal of Google Visualizations into the web developer toolkit.

Who is this book for?

This book will show you how create web-ready data visualizations using Google's infrastructure. Some HTML knowledge is the only requirement, although some JavaScript knowledge is also helpful.

What you will learn

  • Quickly launch a graph, chart, or map as an application, without the heavy-duty development environment
  • Create a variety of interactive graphs from spreadsheet or database data
  • Learn the Google API environment through Visualizations, and then apply the same concepts to other Google APIs
  • Give users control over data viewing with Interactive Chart Dashboards, or let them style the visualization themselves with Chart Editor
  • Discover Google Refine, a data-cleaning tool not just for visualization data
  • Use Google Fusion Tables as a Google Map data source
  • Embed a visualization in Google Spreadsheets using Apps Script API integration
  • Customize visualization colors, fonts, titles, and chart styles
  • Visualize your data over time with timeline and animation features

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 15, 2013
Length: 252 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694377
Vendor :
Google
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 15, 2013
Length: 252 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694377
Vendor :
Google
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 121.97
Google Maps JavaScript API Cookbook
€38.99
Google Visualization API Essentials
€38.99
HTML5 Graphing and Data Visualization Cookbook
€43.99
Total 121.97 Stars icon

Table of Contents

10 Chapters
1. Tools and Setup Chevron down icon Chevron up icon
2. Anatomy of a Visualization Chevron down icon Chevron up icon
3. Spreadsheets, Charts, and Fusion Tables Chevron down icon Chevron up icon
4. Basic Charts Chevron down icon Chevron up icon
5. Formatting Charts Chevron down icon Chevron up icon
6. Data Manipulation and Sources Chevron down icon Chevron up icon
7. Dashboards, Controls, and Events Chevron down icon Chevron up icon
8. Advanced Charts Chevron down icon Chevron up icon
9. Publishing Options Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(1 Ratings)
5 star 0%
4 star 0%
3 star 100%
2 star 0%
1 star 0%
Steve Milligan May 31, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I was disappointed that much of the book simply references online examples. There was a few nuggets that I gained knowledge from.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon