improving access to water information: nwis web … to advance scientific data and information...
TRANSCRIPT
U.S. Department of the Interior
U.S. Geological Survey USGS Texas Water Science Center Technical Talk–
Nov. 1, 2012
Sally Holl
USGS Texas Water Science Center
Austin, Texas
Improving Access to Water Information:
NWIS Web Services Snapshot for ArcGIS
http://txpub.usgs.gov/snapshot
2
Objectives
Overview: NWIS & NWISWeb
The Challenge
The Solution
Use Cases
The Future
Where to get the software and source code
Outline
“The Snapshot tool
is one of the
easiest to learn
tools that I’ve
seen…”
- Ipswich
Community
Watershed
Volunteer,
7-30-2012
“A wonderfully useful USGS tool”
USGS Community for Data Integration
A dynamic community of practice working
together to advance scientific data and
information management and integration
capabilities in the USGS
https://my.usgs.gov/confluence/display/cdi/
Working groups
Citizen Science, Data Management, Semantic Web,
Mobile Applications, Cloud Computing, + more
6
Ground-Water Site-Inventory System (GWSI)
Automated Data Processing System (ADAPS) (time series database)
Water-Quality System (QWDATA)
Water Use Subsystems (SWUDS, AWUDS)
Device Conversion and Delivery System (DECODES)
Project Networks
National Water Information System (NWIS)
National Water Information System (NWIS):
The “gold standard” for water information
http://waterdata.usgs.gov/
9
NWISWeb – What is it?
Provides access to select USGS data Real-time data
Site information
Current and historical Streamflow
Daily means
Daily, monthly, and annual statistics
Peak flows
Field Measurements including channel geometry
Ground-water levels
Water-quality
Does not include all data stored in NWIS
http://waterdata.usgs.gov/
12
How does a scientist retrieve, manage, and
map information from NWIS?
The Challenge: Retrieving and
Preprocessing NWIS Water Quality
Data
Feedback to Web Services
Developers
Retrieve Data in ArcGIS
Manage Data in a
Geodatabase
End user education
Retrieves and manages data from USGS
NWIS Water Services
Streamlines data retrieval and management
for ArcMap users
Educates end users on the NWIS database
Serves as an example of a custom app that
uses USGS web services – use our code
(http://github.com/usgs) or build your own!
The Solution:
NWIS Web Services Snapshot
14
Web Services
We now have web services
Allows one machine to talk to another
Retrieve data more frequently Instantaneous values
Daily values
Site data
Water-quality
Ideal for custom built applications
15
In the
bottom left
corner of
almost every
page. http://waterdata.usgs.gov/nwis/news/?automated_retrieval_info
Send your programmer
here to get started
http://waterservices.usgs.gov/
Water Services
Water Services
http://waterservices.usgs.gov/
Water Services
http://waterservices.usgs.gov/
19
Download USGS and EPA data
Compatible formats
Most of the formatting has been done
Still need to merge the files
Released in April 2012
Water Quality Portal http://www.waterqualitydata.us/
Water-Quality Web Services
NWIS Web Services Snapshot
1. Retrieve sites in your study area.
2. Retrieve data to a relational geodatabase.
3. Use existing tools to query, analyze, plot, edit, expand, visualize, and export NWIS data.
21
Microsoft .NET Framework version 3.5
ESRI ArcMap10.0
Internet connection
Assumes user is familiar with Microsoft
Windows and ArcMap.
System & Skill Requirements: Users
22
System Requirements: Developers
Minimum system requirements for working with the
Snapshot source code:
Microsoft Visual Studio 2010
.NET Framework 3.5
ESRI ArcMap 10
Additional recommended resources (not required):
ESRI SDK for ArcMap 10
Retrieve the install package from
http://txpub.usgs.gov/snapshot
Installation
Installation file
24
1. Save and unzip the installation .zip file
anywhere on your computer
2. Double click the .esriAddIn installation file
* System administrator rights are not needed
3. Add the NWIS_Sites.lyr file to ArcMap and
connect it to the sitefile feature class
Enterprise install option on a shared network
drive through the Add-In Manager
Installation
Geodatabase
Design
Populated by queries to http://www.waterqualitydata.us
Populated by queries to http://waterservices.usgs.gov
uv_result
I1 siteno
xml_param xml_date_and_time xml_qualifiers xml_value
dv_result
I1 siteno
xml_param xml_stat xml_date_and_time xml_qualifiers xml_value
qw_result
I1 record_no_xml
parm_cd dat_log_ln_nm remark_nm parm_alias_nm result_meth_spec_nm parm_frac_tx dqi_name parm_stat_tx result_val_tp parm_wt_tx parm_tm_tx parm_temp_tx parm_size_tx result_lab_cm_tx result_depth_ref_tx result_va parm_unt_tx meas_qual_cd
sitefile
FK1,FK2,FK3,I1 SITENO
STNAME AGENCY SITE_TP_CD LAT LNG NWISWEB
Snapshot_DL_Date
OBJECTID
Snapshot_Query Snapshot_Date
qw_sample
I2 SITENO
FK1,I1 record_no_xml site_no_xml samp_type_nm medium_nm medium_sub_nm sample_start_dt sample_start_time sample_start_tz sample_end_dt samp_rel_depth_nm samp_depth_ref_tx project_cd coll_ent_nm sample_cm_tx aqfr_nm hyd_cond_nm hyd_event_nm result_count
rel_qw_site_sample
rel_site_uv
rel_site_dv
rel_qw_sample_result
Instantaneous Values
Daily Values
WQ Samples
Site
Information
WQ Results
Data Request Log
28
Water Quality Code Selection Tool
Search by CAS number, USGS
Parameter Code, or Characteristic
Name
WEB SERVICE waterservices.usgs.gov
http://waterservices.usgs.gov/nwis
/site?format=mapper,1.0&bBox=83.0,
36.5,81.0,38.5&siteStatus=active..
The Snapshot Workflow
1. Interface options
determine URL for
querying web service
2. Web service returns
XML data stream of
matching results
<?xml version="1.0" encoding="UTF-8” ?>
<mapper>
<sites>
<site sno="02479965" sna="BIG CREEK
<site sno="02479960" sna=“LONGHOR
<site sno="02479975" sna=“LITTLE JAS
<site sno="02479975" sna=“COLD RUN
<site sno="02479975" sna=“BULL MOO
3. XML is parsed,
geodatabase populated,
and map refreshed
XML Parser
Geodatabase ↔ Sites Layer Linking
31
Requesting data from a web service
http://www.waterqualitydata.us/
Result/search?siteid=USGS-
06832500&pCode=00400&mim
eType=xml
32
Requesting data from a web service
http://www.waterqualitydata.us/
Result/search?siteid=USGS-
06832500&pCode=00400&mim
eType=xml
33
Requesting data from a web service
http://www.waterqualitydata.us/
Result/search?siteid=USGS-
06832500&pCode=00400&mim
eType=xml
36
Retrieving site information and daily values
http://txpub.usgs.gov/snapshot/Video/NHPSiteDV.
swf
Retrieving and querying water quality
information
http://txpub.usgs.gov/snapshot/Video/NHPWaterQ
uality.swf
Animating gage data
http://txpub.usgs.gov/snapshot/video/NHPAnimation.s
wf
Demonstration
38
Education
UT Austin “GIS in Water Resources”
ACC GIS Course
Citizen Science
Ipswich community watershed group
USGS Projects
SPARROW model validation in the Gulf region
High Plains groundwater flow model
Upper Guadalupe brush management
FY12: Public Release
Bumgarner, J.R., and Thompson, F.E., 2012, Simulation of streamflow and the
effects of brush management on water yields in the upper Guadalupe River
watershed, south-central Texas, 1995–2010: USGS SIR 2012–5051, 25 p.
Major River
Basin (MRB)
region 5
Prediction of
nutrient loads
and yields to
the Gulf of
Mexico in
monitored and
unmonitored
streams
Water quality data for SPARROW
model validation
Daily groundwater levels from NWIS augmented the High
Plains Aquifer Water-Level Monitoring Study data. Selected
levels are being used to calibrate the Northern High Plains
Aquifer groundwater flow model (http://txpub.usgs.gov/HPWA).
Transform to a web-based application
Inclusion on the Geospatial Platform
Retrieve EPA Storet data
Potential integration with National Atlas
stream tracer web application
Improve water quality parameter search with
ontology experts
Leverage EGRET data analysis R package to
work with data in the Snapshot geodatabase
Standards-compliant metadata generation
The Future
44
Streamlines water data retrieval and
management for USGS and public ArcMap
users
Educates end users about the NWIS database
Serves as an example of a custom app that
uses USGS web services (Source code:
http://github.com/usgs)
NWIS Web Services Snapshot for ArcGIS
Feedback to Web Services
Developers
Retrieve Data in ArcGIS
Manage Data in a
Geodatabase
End user education
http://txpub.usgs.gov/snapshot
Where to get the software and code
46
Developers:
David McCulloch
Joseph Vrabel
David Maltby
Brian Reece
Documentation:
Florence Thompson
Christy-Ann Archuleta
Victoria Stengel
NWIS Database Expert:
Michael Canova
Website:
Justin Robertson
Deanna Terry
Project Manager:
Sally Holl
Project Members
Kevin Gallagher
Linda Gundersen
Cheryl Morris
Terry D’Erchia
Scott McEwen
Liz Sellers
Jen Carlino
Sky Bristol
Carma San Juan
Sylvia Wilson
Michaela Johnson
Daniel Pearson
Jennifer Lanning-
Rush
Natalie Latysh
Abby Benson
Alex Dismore
Nate Booth
Joe Kalfsbeek
John Bumgarner
Tim Kern
Haylee Schweizer
Peter Schell
David Maidment
Daryll Pope
Natalie Houston
David Blodgett
Susan Buto
Toby Welborn
Rose Medina
Stephanie Kula
Nancy Damar
Scott Lewein
Ron Sepic
John Gordon
Ken Dreyer
Acknowledgements
USGS Community for Data Integration