The RiverLevels widget provides an easy way to monitor the amount of water flowing in your favorite streams and rivers right from your Dashboard. The RiverLevels widget is of particular interest to whitewater kayakers and canoeists.

Once any United States Geological Survey (USGS) stream-gauge station is selected, it is automatically refreshed to always provide you with the latest graph of the water-level. As of version 1.2 you can choose between two graph styles: discharge in cubic feet per second (CFS) and water-height in feet.

This widget is Free software, licensed under the GNU General Public License (GPL) version 3 or later.

Thanks for the bug reports. The Widget is working fine on my system (10.5.1 on MacBook Pro) in the Dashboard, DashCode, and Safari. If anyone who is having a problem can open the widget in DashCode and let me know what error[s] are occurring, then it will help me make a fix.

I downloaded your river levels widget, but could not get it to operate. I’m using an iMac desktop runing system version10.4.11. I’m unable to locate an info button to flip the widget. Is there and earlier pre-Leopard version available?

I am wondering if you’d be interested in modifying your widget code for use in various CMS’s like WordPress and Drupal? If you’re not interested or don’t have the time, might you have some suggestions on how to go about it?

@pdxwebhead, I hadn’t thought of making the widget into a CMS plugin, but you are more than welcome to do so. The latest version of the source is available on GitHub at http://github.com/adamfranco/riverlevels.wdgt/. Like all Dashboard widgets, this one is just a little HTML page, though there are a few calls that are made that do not work in most browsers, mostly related to the widget object.

You could probably create a widget object that implemented the following methods and the rest of the widget would work:

widget.openURL(url) – could be implemented as window.location = url;widget.setPreferenceForKey(key, value)widget.preferenceForKey(key)

That said, implementing that API may be quite challenging due to the need to store preferences on a server somewhere. Additionally, there is the challenge of cross-site XMLHTTPRequests for fetching station data. As well, since web-pages are generally reloaded often (unlike dashboard widgets), there isn’t the need for the dynamic refreshing of the graph.

Were I to make this into a plugin for WordPress or Drupal where the site administrator is choosing the station, I’d probably rewrite the whole thing in PHP and just display a static <img src='http://....'/> tag for the selected station. If you pursue this, good luck! I’d love to hear how it turns out.