Abstract
ERDDAP is a data server developed at NOAA Southwest Fisheries Science
Center that allows users to easily access and download subsets of
gridded and tabular data. At the Scientific Data Integration Group at
NOAA’s Pacific Marine Environmental Laboratory we have focused on ERDDAP
as the primary mechanism by which we serve all of our tabular data.
Besides offering data access in a variety of useful formats, ERDDAP
takes care of normalizing the data structure so that all tabular data
sets have a simple row and column structure. Additionally, time values
are normalized to have a consistent units across all data sets on the
server. The simplified tabular nature of the discrete data in ERDDAP
lends itself nicely to use with the Google Visualization API (Google
Charts). Charts is an API which renders nearly all of the graphics in
the browser client. The basis of all charts is the Google Charts
DataTable which is exactly analogous to a TableDap table in ERDDAP.
Charts are interactive, visually pleasing, free and easy to use and so
connecting ERDDAP data to Google Charts is a natural fit. Even though
ERDDAP has many output formats including several different JSON
renderings, none fit exactly into the specified Charts data types.
Initially, as a result, it was necessary to create custom code (either
in the client or on a server between the client and the ERDDAP server)
to manipulate the ERDDAP data stream to match the Charts API
requirements. However, since Charts has a well-documented specification
for a JSON representation of the required data type and because ERDDAP
is an open source project, it was possible to extend ERDDAP to support
the Charts DataTable as a new data type. Using this new data type, it’s
possible to instantiate a Charts DataTable object directly from the
ERDDAP URL using a simple Ajax call in the client which downloads the
JSON DataTable representation. Because the newly added data type is now
native to ERDDAP, it is possible to use default constraint syntax and
ERDDAP RESTful services (using the ERDDAP user interface if desired) to
build the URL for the exact data subset which is to be visualized by the
desired google chart. In this presentation, we’ll explain what we’ve
done to add the JSON data type to ERDDAP and provide many examples of
client-side rendering of earth science and engineering data using Google
Charts directly from ERDDAP URLs.