Surface Water Information--Data Scripts
adaps2excel
Name:
adaps2excel - Create an MS-Excel 2003 spreadsheet of ADAPS unit or daily values
Information:
This script creates one or more spreadsheets (Excel 2003) for selected data sets from ADAPS. It is useful for data requests or your own data analysis work.
Usage:
Simply type "adaps2excel" and answer the prompts. The user is initially prompted for retrieval of either daily values or computed unit values. Next is date range selection (by water year or with a specific date range.) Then the user is prompted to enter site numbers one by one. For each site entered the user then selects a data descriptor from the list provided. If daily values were requested there is then a final selection of the DV stat code(s) (max, min, mean, etc.) from a list of available stat codes for that station/DD. The user can continue to enter additional stations/DDs to do multiple retrievals at one time. All retrievals, however, are put into separate Excel files, including each DV statistic for a given station/DD (e.g. a man/min/mean retrieval will be put in three output files.)
Output files are named as follows:
-
siteID.dates.DD.uvdata.xls - computed UV retrievals
siteID.dates.DD.statcode.DVdata.xls - DV retrievals
Note: Identically named tab-delimited rdb rext fiels are also included. These can be manually imported into Excel version new than 2003 if Excel 2003 row/column limits are exceeded by the data.
Script Language:
ksh
Requirements:
Original Author(s):
Wade Walker, Colorado WSC
- Note the original author is noted on this page for the purposes of giving credit only. Please address questions/comments to OSW (GS-W OSW Scripts@usgs.gov).
Known Problems/Limitations/Need Improvements:
- No command line option.
- Does not combine data from multiple sites/DDs/DV stat codes into one file, but rather creates a separate file for each. Users must cut/paste in Excel to combine.
- Utilizes Excel 2003 column/row limits and will not fully convert files into Excel spreadsheets that exceed those limits (will cut them off at those limits). This is a limit imposed by the Perl module the script utilizes and is not easily fixed. rdb files are included for manual import into newer Excel versions (that have larger row/column limits) as a work-around.
Installation:
- Download and unzip the file to your NWIS server
- Make executable (chmod +x adaps2excel)
- Run by typing 'adaps2excel'. You will be prompted for everything.
Scripts:
- Version 5.0: (posted 9/27/12)
—Updated for NWIS 5.0/Oracle
- adaps2excel download (Zip file =
4.4K)
Back to Scripts