ebmgh.com

California Water Atlas now Online

A great resource makes its online debut, thanks to the David Rumsey Map Collection.

Originally published in 1979, The California Water Atlas, a monument of 20th century cartographic publishing, has been scanned and put online for free public access by the David Rumsey Map Collection. Linda Vida, Director of The Water Resources Center Archives of the University of California asked David Rumsey and Cartography Associates to scan and make available to the public this extraordinary book. The copyright holder, the California Governor’s Office of Planning and Research, agreed to allow free public access online. 

Disciples of Edward Tufte will find much to like here. The pages here are a great example of the use of “small multiples”. Finding out about this great book inspired me to seek out and buy my own copy. It’s kind of shocking that a state agency would put this kind of effort into creating what is essentially a coffee-table book. Highly informative, data-dense, and quantitative, but still: a coffee table book. It’s hard to imagine DWR producing a similar tome in 2010. The tone of the text (which was written by a number of different experts, and is quite good) feels like such a far cry today’s DWR, which seems to be a perpetual booster for more and bigger infrastructure.

How can water be managed so as to meet as fully as possible the needs of diverse and legitimate interests at all levels and in all geographic areas? There are no easy answers. Sound water policy and action programs require that account be taken not only of the scientific and technical aspects of water management but also of the numerous historic, economic, social, environmental, legal, institutional, and political interests involved. The sections of the atlas that follow treat these many factors and their interrelationships in detail. Only through enlightened public understanding of these complex issues can we hope to integrate divergent viewpoints and contending interests into a wise policy of water management which will have sufficient resiliency to cope with climatic change and other developments in our society which could substantially alter California’s efforts to achieve a balance between water supply and water demand.

Amen.

February 24, 2010 at 4:18 pm Comments (0)

Bike Courier Justice in LA

This story makes me smile. Apparently, you’d better watch out for LA’s vigilante bike messengers.

Bike couriers chase down bicycle thief in wild downtown pursuit

February 22, 2010 |  3:40 pm


Two bike messengers saved the day for a Los Angeles man Monday when they chased a bike thief for five blocks downtown and then knocked him to the ground, causing him to flee, police said.


As [bike] thefts have increased, some people have taken matters into their own hands. Last month, bike messengers downtown caught two suspected thieves, teenage boys who attended a local Catholic high school, and stripped them down to their boxer shorts before taking their cellphones, backpacks and clothes.

February 24, 2010 at 9:39 am Comments (0)

Desalination and Water Purification at MIT OpenCourseWare

Of interest to those involved in the technical side of sustainable water supply: materials from a course taught in Spring 2009 at MIT on Desalination and Water Purification.

MIT never ceases to amaze. They put all of these materials online for anyone in the world to read, download, and use, all for free. Looking at the course outlines and reading list is often the most interesting part.

http://ocw.mit.edu/OcwWeb/Mechanical-Engineering/2-500Spring-2009/CourseHome/index.htm

February 24, 2010 at 9:30 am Comments (0)

Returning an Error from an Excel User-Defined Function

It’s often useful to write your own custom functions for Excel. These are often called User-Defined Functions, or UDFs. It’s actually not that hard if you know a bit of programming. It’s all done in VBA, or Visual Basic for Applications. I’ve probably written hundreds of these in the last 7 or 8 years, but one trick I always forget is how to return a customized error message.

If a line in your function produces a run-time error, you won’t get a popup message like you would for a Subroutine. Instead, code execution ends immediately, and you get the error #VALUE! in the cell on the worksheet.

It is often useful to return a more descriptive error. To do this, you can use On Error to trap the error, and return one of Excel’s built in error types. To do this, use the VBA function CVErr and a constant to set the built-in error type. These are (via the online help under “Cell Error Values”):

Constant

Error number

Cell error value

xlErrDiv0

2007

#DIV/0!

xlErrNA

2042

#N/A

xlErrName

2029

#NAME?

xlErrNull

2000

#NULL!

xlErrNum

2036

#NUM!

xlErrRef

2023

#REF!

xlErrValue

2015

#VALUE!

 

For your UDF to return custom errors, you must declare the function so that it returns the data type Variant. See also this Microsoft knowldgebase article on Error Trapping with Visual Basic for Applications.

Here’s an example of a UDF that returns the error #N/A. In this case, the function is a slightly more sophisticated version of the built-in function FIND, which returns the starting position of a one text string within another string. I wanted a function that would return the nth position, rather than just the first occurrence.

Function FindNth(find_text As String, within_text As String, n As Long) As Variant

'Finding the nth occurrence of a text string within another text string

'Uses Excel's built-in Worksheet Find function iteratively

'(probably faster than a brute-force approach using a loop)

'If find_text is not found, returns the error #N/A

 

  Dim pos As Variant

  Dim i As Long

  Dim result As Long

 

  i = 0

  result = 0

 

  Do

    On Error GoTo ErrLine

    pos = Application.WorksheetFunction.Find(find_text, within_text)

    result = result + pos

    i = i + 1

    If i = n Then Exit Do

    within_text = Right(within_text, Len(within_text) - pos)

  Loop

 

  FindNth = result

  Exit Function

 

ErrLine: FindNth = CVErr(xlErrNA)

 

End Function

 

For example:

=FINDNTH(" ", "Mira Vista Avenue", 2)

 

Returns 11, the position of the second occurrence of a space in “Mira Vista Avenue”.

=FINDNTH("x", "Microsoft", 3)

 

Returns #N/A, since it is looking for the 3rd letter x in “Microsoft”, and can’t find it.

In this example, the function should probably return #VALUE! to copy the FIND function’s built-in behavior. But I wanted to differentiate between a VBA run-time error and an error returned by the function, and #N/A seemed to fit the bill.

February 17, 2010 at 10:00 am Comments (0)

Will island nations have sovereignty after they’re gone?

Interesting article in the January 2010 issue of Ocean & Coastal Management: Vanishing Island States and Sovereignty. Full text here. The abstract:

Sea level rise could bring about an event that has not previously been seen in modern history, that of the physical disappearance of some low-lying Island States. The objective of this paper is to examine what are the likely scenarios for some of these islands in the course of the next century, and analyse for each scenario if these Island States could continue to claim an Exclusive Economic Zone or not. Also, it will analyse the possibility that Island States could continue having some sort of status analogous to statehood even if it was to lose all territory. Finally, the idea of a “government-in-exile” will be discussed, where the State could retain its identity waiting for a future re-emergence of the island.

The result seems to be: the law doesn’t say, and it’s not really clear. Still, the authors examine a number of plausible scenarios, including one where islands build their way out of trouble, by constructing what the authors term “Dutch-style flood defenses”. The only problem: for a country like the Maldives, it would cost 90% of their GDP to construct them.

February 8, 2010 at 5:07 pm Comments (0)

Wetlands, Sea Level Rise, and Coastal Development in a Nutshell

I think this is brilliant. From a paper by James Titus, sea level rise program director at EPA:

Does the U.S. Government Realize that the Sea is Rising? How to Restructure Federal Programs so that Wetland and Beaches Survive (PDF, 68 pp., 1.6 MB) – Golden Gate University Law Review, Vol. 30, Number 4 (2000).


 

 

February 2, 2010 at 11:34 am Comments (0)