Prep

Prep is an export system for preparing data for analysis by other software.  This may be as simple as sending data into Excel, or passing data into Systat, or Mike-11.  Prep is implemented as part of DataTamer Hydro and is run as just another command.

A more interesting aspect of Prep is that is also an OLE DB Provider and this means that other software believes the data is stored in a relational database.  For example, the Data - Data Import menu item in Microsoft Excel 2003 can read data through Prep and drop the results into a worksheet.  The screenshot shows how Prep offers data to Excel.

The data is presented as a set of database tables.  You choose the Prep table when using Excel and the software will put up Hydro's dialog box to let you choose the site, measurement and time range.  The dialog also lets you compute averages over an interval, or repack the data to a given interval.  This makes it easy to import daily or monthly means into a spreadsheet, or produce data spaced at a regular time period.

The other tables are useful when writing programs in a scripting language, often done on Web Servers.  The SiteScan table can tell you what data is available, notably the start and finish times.  The Stats table computes statistics such as mean, median, standard deviation and percentiles.  The three Report tables read recent data from a collection of sites and return fields such as the most recent value, the time and value of recent peak flow, and rainfall totals over a set of recent intervals.

Scripts can make an ADO connection to Prep and then issue SQL Select statements.   For example, the statement to compute statistics for all the flow at a site is:

    Select * from Stats where site='Clearbrook' and measurement='Flow'

Next->