Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here
Showcase

midStream – Making real time data publicly available

midStream – Making real time data publicly available

At the Stroud Water Research Center, one of our first priorities for the Arduino based sensors that Shannon Hicks has been developing has been to make the raw data publicly available online in a readily sharable format.  For now, we’re formatting our data as WaterML 1.0 and sharing  it as a WaterOneFlow webservice.

WaterML and the webservice specifications were originally developed by the Consortium of Universities for the Advancement of Hydrologic Science, Inc. (CUAHSI).  Data formatted as WaterML can be ingested into CUAHSI’s Water Data Center, it can also be found and viewed by anyone using HydroDesktop, and it can be visualized by Vizer, the data visualization tool for the Critical Zone Observatories.

Sharing our raw data as WaterML involves two parts:  compiling all of the raw logger data into a single location and then generating the WaterML on demand.  CUAHSI provides tools for both parts of this, but they depend on having data structured in an ODM1.1.1 database, which we don’t.  Luckily for us, folks at the Texas Water Development Board have developed a python tool called WOFpy (WaterOneFlow in Python) to generate WaterML from any back-end database.  This means all we had to do was to bring our data together and create a data access object for WOFpy.

We call the data access object (DAO) we’ve created midStream.  It parses our data from our very simple mySQL database hosted by Dream Host into ODM 1.1 like objects for WOFpy.  Data gets into the database via a php script called by an HTTP GET request from our Arduino loggers.  Initially we had another python program called midStream receiver managing the logger data in a file-based system, but that system proved to be too slow.  All of these projects are available on GitHub.

I’m presently working on a django/python based system to handle the Arduino get requests in a more streamlined way than our current php scripts.  After that, we’re going to begin work to implement the system with a full ODM2.0 database under the hood.  Look for more in the future!

Leave a Reply