Home / Research / Resources / VisCount: a simple program to train instant visual counting of indi...

VisCount: a simple program to train instant visual counting of individuals

Sometimes it is useful to make a rapid visual estimate of the number of individuals in a flock of birds, fish or ungulates, for example. One informal method of training this ability is to throw a bunch of peas or beans onto a tray, make an estimate, and then count the peas to see how many there really are; if we do this enough times, our eyes will get trained and our estimates may get pretty accurate. A major drawback of this approach is that counting the beans can be really boring.

Fortunately, we can use a simple function to do this automatically in R: it spreads a random number of dots (within given limits) on the screen for us to make our estimate, and tells us exactly how many dots there are. Future developments will include an option for mixed flocks (more than one species), estimates of improvement rate, etc. Here's how it is now:

# # #

VisCount <- function(Nmax, Nmin = 3) {

N <- sample(Nmin:Nmax, 1)

x <- runif(N)

y <- runif(N)

plot(x, y, pch=20, axes=FALSE, xlab="", ylab="", main="How many?")

show(N)

}

# # #

If you download, install and open R, just paste the VisCount function (the text above, between the ###) in the console and press enter. Note that R is case-sensitive, so upper- and lower-case letters must be respected. The funtion needs to be entered every time you open R. Then type, for example,

VisCount(50)

In the parentheses you need to define the maximum number of dots you want; 50 is just an example. The minimum number of dots is 3 by default, but you may also define a custom minimum number after the maximum one:

VisCount(50,10)

After typing press enter, but don’t look at the console while you do it, or you’ll see the number of dots ahead of time! Look at the graphics output window, where you’ll get a random number of dots within the specified limits (in this case, between 10 and 50). Make your visual estimate and then check the exact number of dots, which will appear just below what you’ve typed.

If you don't want to install R, you may use it on an Rweb interface. Paste the VisCount function in the window, followed by your command [e.g. VisCount(50) ], click "submit" and scroll down to the bottom of the screen, where you'll find the dots. Make your estimate and check out the exact number of dots just above the graph, below your commands.

You may click the back button (in the web interface) or the up arrow (in R) and try this repeatedly with the same or with different maximum (and minimum) numbers in the command; you'll get a new random number of dots each time.

It often helps to count a group of 10, 50, 100 or more individuals (depending on the size of the flock), estimate what proportion of the flock they take up, and then extrapolate through the rest of the flock:

If the flock is in movement (not implemented in VisCount but frequent in real life), it is easier and less error-prone to count the individuals back to forth in the direction in which they are moving.

Remember: practice makes perfect!

A. Márcia Barbosa, published online. Thanks to Brian L. Sullivan (eBird/AKN) and Luís Costa (SPEA) for constructive feedback.