Cutting Edge: NOAA builds AJAX-based data viewer

The National Oceanic and Atmospheric Administration's Pacific Marine Environmental Laboratory has released a browser-based application called the Dapper Data Viewer for viewing oceanographic and atmospheric data.

DChart, as it is also known, enjoys a particularly rich feature-set, thanks to the use of an emerging Web application technology called Asynchronous JavaScript and XML (AJAX).

Pacific Marine Environmental Laboratory (PMEL) developer Joe Sirott created DChart with help of other staffers so users could visualize in-situ oceanographic or atmospheric data, a particularly challenging type of data to render in graphical format. The software was first released in December; an updated version was released last month.

A technology generating buzz in the Web application development community, AJAX allows developers to build Web applications that enjoy at least some of the functionality usually found only in desktop programs.

Although Sirott has learned about some of the limits of AJAX, the approach nonetheless provided the needed functionality for the complex requirements of DChart.

The Seattle-based PMEL hosts a wide collection of global weather station readings of temperature, air pressure, wind and other variables. To offer this data to scientists, the NOAA laboratory deploys the open source Network Data Access Protocol (OpenDap), server software widely used in the geoscience community. OpenDap allows users to download only the specific data needed at the time, rather than the entire dataset, conserving resources of server and client alike.

Before DChart was released, scientific users had little in the way of software for actually viewing the data in a visual form. 'While there are many client programs for OpenDap-gridded data, there aren't that many programs that support OpenDap in-situ data,' Sirott explained.

Gridded data is usually formatted in a uniformly spaced, four-dimensional framework with dimensions representing latitude, longitude, depth or height and time. In contrast, in-situ data 'contains measurements of variables at irregular latitude/longitude/depth/time points,' Sirott explained.

With DChart, a user selects one or more stations and then plots the data created at those stations. The program smoothes the herky-jerky nature that hampers most map-based Web sites. Users can interact with the map without having the entire page redrawn. They can also zoom in or out, or drag different parts of the map into the viewing area. A list of the variables 'changes dynamically as the user selects different datasets,' Sirott said.

To develop the program, Sirott first looked at using Macromedia Flash from Adobe Systems Inc. of Mountain View, Calif. He didn't want to lock the application into a vendor-specific language (ActionScript), nor did he wish to rely on a client plug-in, which Flash requires. He also considered using Java applets, though was discouraged by the sluggishness that usually comes with initializing the Java Virtual Machine on the user's machine.

Although not as feature-rich as a full standalone client-side program, AJAX 'allows some desktop functionality,' Sirott said.

AJAX allows the client software to communicate with the remote application server asynchronously, meaning the browser downloads components before the user may request them, allowing the program to change its available options to meet the user's requests without waiting on the server to resend the page.

Although AJAX has a reputation for being unwieldy to work with, Sirott'well versed in Dynamic HTML (DHTML), Javascript and the server-side delivery technologies'found the technology manageable. Some of the work fitting the technology to each type of browser proved tedious, though.

'Even though AJAX is allegedly based on standards such as [Cascading Style Sheets], DHTML and JavaScript, the reality ' is that the implementation of these standards varies quite a bit between browsers,' Sirott said. 'So there's a fair amount of JavaScript code [in DChart] devoted to handling the differences between Internet Explorer and Mozilla Firefox.'

Sirott mentioned that since he started working on DChart, a number of toolkits have been made available which may further ease the task of deploying AJAX.

Another potential downside to AJAX is that it ultimately creates more work for the server, even if that work is less synchronized with the actions of the browser. 'When a user drags the map in DChart, multiple requests can be sent to the back end. This doesn't happen with a traditional Web application,' he said.

Sirott developed the browser component using the Emacs editor and developed the Java servlet back-end operations with JBuilder, from Borland Software Corp. from Scotts Valley, Calif. He used the JFreeChart Java class library to generate charts and NOAA's in-house team developed Scientific Graphics Toolkit to generate plots. The open-source Tomcat provides the servlet container on the server side.

Sirott's team plans to add new features for future editions of DChart, such as multiple plot windows, support for gridded data sets, more plot types and a bookmarking feature that will allow users to save plot points. And although DChart was written specifically for the PMEL in-situ data, the program may be applied elsewhere. In fact, it has already been modified to display data from ocean buoys from another OpenDap-based project, Sirott said.

About the Author

Joab Jackson is the senior technology editor for Government Computer News.

Stay Connected

Sign up for our newsletter.

I agree to this site's Privacy Policy.