I did know the law of large numbers (and its violations) but I never reflected about the law of small numbers.
You can learn about following this link. It is mostly about Poisson distribution which is, indeed ubiquitous also in Hydrology. So the reading of this R-related post is certainly interesting and useful also for us.
My reflections and notes about hydrology and being a hydrologist in academia. The daily evolution of my work. Especially for my students, but also for anyone with the patience to read them.
Tuesday, January 29, 2013
No code No paper
This is entirely from: Simply Statistics » R, and I completely agree with it. It applies the very same way to hydrological literature.
"I think it has been beat to death that the incentives in academia lean heavily toward producing papers and less toward producing/maintaining software. There are people that are way, way more knowledgeable than me about building and maintaining software. For example, Titus Brown hit a lot of the key issues in his interview. The open source community is also filled with advocates and researchers who know way more about this than I do.
This post is more about my views on changing the perspective of code/software in the data analysis community. I have been frustrated often with statisticians and computer scientists who write papers where they develop new methods and seem to demonstrate that those methods blow away all their competitors. But then no software is available to actually test and see if that is true. Even worse, sometimes I just want to use their method to solve a problem in our pipeline, but I have to code it from scratch!
I have also had several cases where I emailed the authors for their software and they said it “wasn’t fit for distribution” or they “don’t have code” or the “code can only be run on our machines”. I totally understand the first and last, my code isn’t always pretty (I have zero formal training in computer science so messy code is actually the most likely scenario) but I always say, “I’ll take whatever you got and I’m willing to hack it out to make it work”. I often still am turned down.
So I have a new policy when evaluating CV’s of candidates for jobs, or when I’m reading a paper as a referee. If the paper is about a new statistical method or machine learning algorithm and there is no software available for that method – I simply mentally cross it off the CV. If I’m reading a data analysis and there isn’t code that reproduces their analysis – I mentally cross it off. In my mind, new methods/analyses without software are just vapor ware. Now, you’d definitely have to cross a few papers off my CV, based on this principle. I do that. But I’m trying really hard going forward to make sure nothing gets crossed off.
In a future post I’ll talk about the new issue I’m struggling with – maintaing all that software I’m creating."
"I think it has been beat to death that the incentives in academia lean heavily toward producing papers and less toward producing/maintaining software. There are people that are way, way more knowledgeable than me about building and maintaining software. For example, Titus Brown hit a lot of the key issues in his interview. The open source community is also filled with advocates and researchers who know way more about this than I do.
This post is more about my views on changing the perspective of code/software in the data analysis community. I have been frustrated often with statisticians and computer scientists who write papers where they develop new methods and seem to demonstrate that those methods blow away all their competitors. But then no software is available to actually test and see if that is true. Even worse, sometimes I just want to use their method to solve a problem in our pipeline, but I have to code it from scratch!
I have also had several cases where I emailed the authors for their software and they said it “wasn’t fit for distribution” or they “don’t have code” or the “code can only be run on our machines”. I totally understand the first and last, my code isn’t always pretty (I have zero formal training in computer science so messy code is actually the most likely scenario) but I always say, “I’ll take whatever you got and I’m willing to hack it out to make it work”. I often still am turned down.
So I have a new policy when evaluating CV’s of candidates for jobs, or when I’m reading a paper as a referee. If the paper is about a new statistical method or machine learning algorithm and there is no software available for that method – I simply mentally cross it off the CV. If I’m reading a data analysis and there isn’t code that reproduces their analysis – I mentally cross it off. In my mind, new methods/analyses without software are just vapor ware. Now, you’d definitely have to cross a few papers off my CV, based on this principle. I do that. But I’m trying really hard going forward to make sure nothing gets crossed off.
In a future post I’ll talk about the new issue I’m struggling with – maintaing all that software I’m creating."
Wednesday, January 23, 2013
Object Modelling System Resources
As the readers know from previous posts we (I and my collaborators and students) use OMS3 (and we will use even more in the future embedding in it all of our modelling efforts) in collaboration with OMS3 developer in chief Olaf David and others. Any involvement with OMS must start with browsing the OMS3 web site and the information available there (for instance, but not only, this).
For using it, first download the console, then read the installation notes, and read console FAQ (well we will provide a brief description of its use soon) which remain the main information about the tool.
However, during the BioMA summer school, Olaf, Jim Ascough, Jack Carlson and Giuseppe Formetta gave some further material, which finally you can find below.
For using it, first download the console, then read the installation notes, and read console FAQ (well we will provide a brief description of its use soon) which remain the main information about the tool.
However, during the BioMA summer school, Olaf, Jim Ascough, Jack Carlson and Giuseppe Formetta gave some further material, which finally you can find below.
- The general overview of OMS ver 3
- The basic examples that clarify both the use of the OMS console and what it means to program in OMS
- An example of a components implementing Thornthwaite estimation of Evapotranspiration (In my view a deprecated method).
- An example of use of George Leavesley PRMS model (the non-OMS version and documentation is here)
- An example of use of some components of JGrass-NewAGE
Jgrasstools use OMS3 (even if a version older than 3.1) and one can find relevant information also browsing their site.
Other examples of using OMS3 console and scripting will follow soon.
Monday, January 21, 2013
PostgreSQL your data
Science is matter of hypothesis and data. Hypotheses becomes formal models and then you have to acquire data to prove (a big word indeed) them at the feeble light of statistics. At the beginning you start to colelct data everywhere in your hard disk (I assume that the data were digitised). After a few months you are submerged by them. You thrown them away and restart it from the beginning again.
Fortunately some institution store the data in databases and the reboot is relatively easy. However, this cover the primary data sets, and does not cover the data that yourself produce by running your models and doing your inferences.
So, sooner or later, you have to face the reality that you should store your stuff in a more ordered way, and build your own database. This opens various questions. It is really necessary to use a database software (C'mon learning another tool!) ? Obviously not: a database, in its general meaning can be just an ordered set of data. So you can just use your filesystem for it (I say it: but I do not really believe it). However, then you have to remind where the data are, and use the search utility of your operating system to find what you are searching (assumed that you documented every step you made in a searchable way). Databases helps to do that and often use a query language (usually SQL) that helps to find and select the data you need again and again. So, at a certain moment, one has to take seriously the hypothesis to use a database.
Nowadays there exist many free and open source database solutions (besides, obviously, to the commercial solutions, Oracle's, IBM's and others). Among the most diffuse I cite MySQL, PostgresSQL and H2. Each one is a valid choice, with different characteristics.
In the last years we focused our attention on PostgreSQL for its completeness and for having been the first to include the way to manage geographic (geometric data) as shapefile^*. This is done actually by a plugin, called PostGIS, developed by the same Refraction guys who also promote uDig.
Alban De Lavenne, a Ph.D. students from Rennes Agricampus, who spent a few months among us, gave a talk about the use he does of PostgreSQL for supporting his research. His presentation is, as usual on slideshare (I am working to provide the data to run his examples).
The first step is certainly to install PostGIS. The first time I (am a Mac guy and) used the Kyngofchaos instructions for installing Postgress. However, I noticed that nowadays there are various other possibilities, supported in the main PostgreSQL page.
Alban instructions and suggestions follow the installations and cover some typical hydrological problems. For a complete understanding, certainly the Tutorial at PostgreSQL site can help. Around the web, one can also find other video tutorials, as this one provided by David Fetter, or this comprehensive set on ITunesU screencasts by Selena Deckelmann and others.
Obviously I am open to any contribution to improve this post.
^* - Recently PostgreSQl/PostGIS acquired the capability to store and manage "raster data" and images, which makes it even more appealing.
Monday, January 14, 2013
Alpine Convention
Tha Alpine Convention is an international treaty between the Alpine countries (Austria, France, Germany, Italy, Liechtenstein, Monaco, Slovenia and Switzerland) as well as the EU, aimed at promoting sustainable development in the Alpine area and at protecting the interests of the people living within it. It embraces the environmental, social, economic and cultural dimensions.
The following slides (in Italian) clarify the structure of the Convention and try to delineate the way the Water Platform works from a couple of seminars that Andrea Bianchini gave here in Trento last week. Here the Wikipedia page.
For 2013 and 2014, under the Italian Presidency of the Convention, I will be the president of the Water Platform. The official mandate for 201-2014 of the platform has already stipulated among the participants (you have a synthesis on slideshare): you can have in Italian (an official version) and an unofficial version in English (english is not among the languages of the Alpine Regions).
The official website of the platform is here.
The following slides (in Italian) clarify the structure of the Convention and try to delineate the way the Water Platform works from a couple of seminars that Andrea Bianchini gave here in Trento last week. Here the Wikipedia page.
For 2013 and 2014, under the Italian Presidency of the Convention, I will be the president of the Water Platform. The official mandate for 201-2014 of the platform has already stipulated among the participants (you have a synthesis on slideshare): you can have in Italian (an official version) and an unofficial version in English (english is not among the languages of the Alpine Regions).
The official website of the platform is here.
Monday, December 31, 2012
Open Java resources for Hydrologists
Next question about Java, after having introduced it, and talked about options for doing numerics, is to see if there are effective resources on which hydrologists can build something useful, incrementally, and as a part of a community.
There are out there probably other Java frameworks, and I will add them to the list, whenever they will be brought to my attention.
The field of more intense Java activity is actually the GIS one. There are at least three/four major open source efforts in Java:
initiative seems having parts based on Java.
An interesting, old but not outdated initiative to give a third dimension to data visualisation is
There exist material/documentation on the above material ?
One introduction to programming GIS and essentially all I would require to a collaborator to know can be found here by Andrea Antonello
- The first recource that comes to my mind, is obviously the Object Modelling System version 3 (or OMS3). This is the framework we use for our modelling. We wrote some models and papers using it, and OMS3 is also at the core of the uDig Spatial Toolbox
- Openda. It is a framework for data assimilation and calibration of models promoted by Deltares.
The field of more intense Java activity is actually the GIS one. There are at least three/four major open source efforts in Java:
- uDig, the GIS of our choice, with its field companion BeeGIS, and its mobile younger brother, Geopaparazzi
- GvSig, a good product indeed, which also has a companion for mobiles
- OpenJump, on which the Italian cartographic project is based
initiative seems having parts based on Java.
They are based on various type of resources among those in Java:
- GeoTools
- Sextante, a library for data geoprocessing by Victor Olaya
Both GeoTools and Sextante use
- JTS, the Java topology suite for several elementary operations.
- Visad, a library to visualise scientific datasets
- the IDV virtual globes family to visualize 3D geophysical data
- the Nasa WorldWind which gives (as open source) what Google Earth gives to the general public. Various prototype implementations of Nasa WorldWind in uDig (and in OMS3) were already made, and possibly sooner or later we will have a full mainstream implementation of it.
- the NetCDF data format (of which IDV, but also ncBrowse, is a viewer) has also an implementation in Java.
Even if my post is more concerned about the development of Hydrological resources and models, the above frameworks/programs/applications/models or part of them can just be used (and just not developed) with profit. Starting from OMS3 there are at least three major modelling efforts that use it:
Not to forget is the whole Jgrasstools available for DEM manipulation (and further modelling) inside (and outside) uDig. All of them have more resources in a post dedicated to OMS 3 resources.
The Sextante library itself comes with more than 300 tools for manipulation of DEM and images. Also IDV and NasaWorldWind can be just used for the purposes of any research.
Another full-fledged Java Catchment model is
Why use Java, instead of R ?
In one of my previous post, I talked about R software, and in fact, my group of people use both. R is much more for some higher level operations, and is much less customisable than the resources developed in Java, and, usually, less efficient. My former students, using Java capabilities were able to built professional/industrial applications on the basis of Java (the GIS are a proof), that using just R would have been impossible.
However, the new incoming version of OMS3, should include the way to call R from the OMS console. Please contact the OMS version 3 developers for more information.
Why do not use Python ?
Python (or many other languages) could have been a good choice. Never say never, however I chose Java and to be successful one has to consistently invest his/her own limited resources in one direction.
Not to forget is the whole Jgrasstools available for DEM manipulation (and further modelling) inside (and outside) uDig. All of them have more resources in a post dedicated to OMS 3 resources.
The Sextante library itself comes with more than 300 tools for manipulation of DEM and images. Also IDV and NasaWorldWind can be just used for the purposes of any research.
Another full-fledged Java Catchment model is
by Ricardo Mantilla. Its source code can be obtained following the instructions in the user manual.
A recent addition to the resources is
A recent addition to the resources is
- H2O, an engine for doing Machine Learning and Data Science
Why use Java, instead of R ?
In one of my previous post, I talked about R software, and in fact, my group of people use both. R is much more for some higher level operations, and is much less customisable than the resources developed in Java, and, usually, less efficient. My former students, using Java capabilities were able to built professional/industrial applications on the basis of Java (the GIS are a proof), that using just R would have been impossible.
However, the new incoming version of OMS3, should include the way to call R from the OMS console. Please contact the OMS version 3 developers for more information.
Why do not use Python ?
Python (or many other languages) could have been a good choice. Never say never, however I chose Java and to be successful one has to consistently invest his/her own limited resources in one direction.
There exist material/documentation on the above material ?
One introduction to programming GIS and essentially all I would require to a collaborator to know can be found here by Andrea Antonello
Saturday, December 22, 2012
A Java Library (of books) for beginners, and a little path to self instruction for geophysicists
It is quite a few years that I insist for students moving to program in Java. Java is not anymore Java 1, it has evolved towards a mature language and now it is
However, many would realize that for learning Java the right way s/he has to start from the beginning, and possibly, start to learn also the concepts of object oriented programming (the real reason to use Java).
My personal training began with the videos (in Italian) of one of my Trento university colleague Marco Ronchetti. For others, MIT Courseware could be a good starting, but also these less academical clips can help.
Programming is more than just knowing a language. This concept is well covered in
Introduction to programming using Java by David J.Eck
Java Precisely by P. Sestoft (suggested by Joshua Bloch, see below)
and nothing can substitute the reading of a good book. More specialised classics on Java are also:
Thinking in Java 4th edition
Thinking in Java annotated solutions book
the two by Bruce Eckel
The design pattern Java companion, by J. W. Cooper
These books sum up to a lot of pages to read and working them out is not a thing you do in a day.
People who teach Java, usually rely on command line. However, I would prefer to learn how to use an IDE. Our choice is, since many years, Eclipse. Learning to use it is easy but is made easier by reading Lars Vogel tutorials and material.
Obviously Oracle itself has a series of very good tutorials.
Going to more specialised book, for scientists, I also recommend
Mak, R. (2010). Prentice Hall - Java Number Cruncher. The Java Programmer's Guide to Numerical Computing (pp. 1–493).
Besset, D.H., Object-Oriented Implementation of Numerical Methods: An Introduction with Java & Smalltalk , 2000. (~70 Mb) (His code can be found here).
Nikishkov, G. (2010). Programming Finite Elements in Java (pp. 1–394). The preface of his book can give a good rational for using Java instead of other languages.
A general collection of Algorithms in Java is Algorithms by Kevin Wayne and Robert Sedgewick (also addressed here).
You can also give a look to old C Numerical Recipes (for algorithms) and use this free Java project for their application. (Do not support NR license policies).
Having got a clear idea of what Java is, you probably wants to write clean code. The right book is Clean Code by Robert Martin.
Now, you are probably ready to understand the subtleties of the Java Matrix Libraries I indicated in my older post.
If one wants to move to geosciences and GIS, the best choice is to give a look to the GEOtools site and to al the documentation s/he can find there. At that point s/he will be probably also ready for programming the Jgrasstools. Programming OMS3 components would be easier, indeed, if you do not care of geographic features. For GIS and working with us, one should consider the introduction by Andrea Antonello.
Eventually you can probably go back and make reacher your library (of books) by also reading and applying
Martin Fowler's UML Distilled: A Brief Guide to the Standard Object Modeling Language
Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides: Design Patterns: Elements of Reusable Object-Oriented Software (but the easiest book, from the opinion of many is Head First Design Patterns by Eric Freeman and Elisabeth Robson.
and the book that many consider the best one:
Effective Java Second Edition, by Joshua Bloch by many considered the best book about Java.
Here it is the third Edition ;-).
Here there is also a video about.
For mastering Java generics and collections, I suggest:
Java Generics and collections by Maurcie Naftalin & Philip Wadler, by O'Reilly.
Obviously Java is one of the most used languages, and there is a lot of material on the web. Starting from the Oracles itself main site.
However, programming is about writing code, not just reading about it. Wishing I would have time to do it!
and the book that many consider the best one:
Effective Java Second Edition, by Joshua Bloch by many considered the best book about Java.
Here it is the third Edition ;-).
Here there is also a video about.
For mastering Java generics and collections, I suggest:
Java Generics and collections by Maurcie Naftalin & Philip Wadler, by O'Reilly.
Obviously Java is one of the most used languages, and there is a lot of material on the web. Starting from the Oracles itself main site.
However, programming is about writing code, not just reading about it. Wishing I would have time to do it!
Subscribe to:
Posts (Atom)






