Chapter 4. MultiGraphlet Configuration and Usage

Table of Contents
4.1. Overview
4.2. MultiGraphlet Station Specification
4.3. MultiGraphlet Graph Specification
4.3.1. "verticalscale" sections
4.3.2. "vlabels" section
4.3.3. "element" sections
4.4. Data Server
4.4.1. Data Requests
4.4.2. POR Requests
4.4.3. NOTE
4.5. MultiGraphlet Applet Tag
4.6. MultiGraphlet Configuration Checklist
4.7. MultiGraphlet Example

4.1. Overview

In the world of meteorology/climatology, data is often grouped into data sets consisting of observations from a network of monitoring locations, called stations, over a period of time. For example, the climate reference network (CRN) consists (currently) of about 60 fully automated stations throughout the United States, each of which measures temperature, precipitation, and several other quantities once every hour. Each of the observed quantities is called an "element".

MultiGraphlet is a general-purpose graphing applet. It provides the user with an interactive view of weather observation data from a network of monitoring stations. The user can select the station to view data from, and the time period to view. The selection of which elements are graphed, and how they are graphed, is specified in a parameter to the applet.

Typically what would be involved in using graphing software to draw a graph would be to first fetch the appropriate data, then invoke the graphing software and pass the data to it somehow, perhaps as a list of numbers. Since MultiGraphlet gives the user interactive control over what data it displays, however, passing it the data to be graphed when it is invoked won't work, because at the time that MultiGraphlet is invoked, it isn't necessarily known what data the user will want to see. MultiGraphlet works by fetching the data that it needs, when it needs it. So rather than passing MultiGraphlet the data to be graphed, we give it a way to fetch the data itself. That way, once MultiGraphlet is connected to a data set, the user can view not just one graph, but a graph of any data from the data set. This is kind of a software-design analog of the old saying, "Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime." The process of connecting MultiGraphlet to a new data set, in other words arranging for it to display graphs of data from that data set, involves teaching it how to fetch data from that data set.

MultiGraphlet uses HTTP requests to fetch data. These are regular web requests, formulated as URLs, just like what you specify to a web browser when you enter a URL into its "Address" or "Location" field. When MultiGraphlet needs data, it constructs a URL with parameters specifying what data it needs, generates an HTTP request with that URL, and uses the internet to fetch a response to that request. The program that responds to the request is called a "data server". The main step involved in connecting MultiGraphlet to a new data set is to provide a data server for that data set.

In addition to the data server, MultiGraphlet needs a few other things in order to draw graphs from a particular network's data set. In particular, it needs information about the stations in the network, and information about which data elements to graph. The next several sections explain the details of how to specify these things, as well as how to write a data server. A summary of all the steps appears in Section 4.6.