Website Overhaul, Beta Testing

As you may have noticed if you came here from the main site the main site just completely changed. Instead of many sub-pages, most of them relatively unused, the site is now one giant infinite-canvas crawl with links to the various simulators and educational games I make. This will display better on mobile devices, but it also signals the removal of a giant barricade to keeping the site updated: Django.

I don’t want to bash Django here. It’s a great framework. When I started this site I was using database-heavy applications, things that let me pull out my phone and drop data into a database on my own site. Django is great for that. These days I’m using exactly none of these, and the site is just a giant link farm to a bunch of javascript programs. The problem with this is that Django has a (really incredible) extensible template model that uses a {%static %} tag to allow the server to fill in the location of the static files on a server. Note that javascript programs are just piles of static files from Django’s viewpoint. And so every time I move from my development branch of a program to loading it on to the site I need to change every single resource link to include this {% static %} tag. Something like “images/shark.png” has to become “{% static ‘basesite/shark.png’ %}”. The upshot? I don’t keep the site updated very well. It’s just too much of a pain.

However, there’s a simple framework for serving up a giant link farm with images: the plain old HTML file. So that’s what the site is now. (I mean, there’s a CSS stylesheet, too. I’m not a beast.)

More importantly, this has also motivated me to update the site. The most important update is Beta Testing. It’s got a nice logo, because who doesn’t like a fish pun?

Image created by Eric Butler. CC-BY-4.0.

I’m always working on something (or several somethings) and some of these things are usable, if undocumented and slightly kludgy. But if you’ve used open source projects before that will be familiar, anyway1. Now these are available for you to play with under a clearly-labeled section!

Right now two projects inhabit this space (this will change, since projects eventually move on to…um…gamma testing? production?): OPE Survivor and the Circulation Model. I suspect most people can work the circulation model without help, but OPE Survivor may be harder. Essentially (I’m NOT documenting it fully here!) you can edit either the environment or the species (by changing how it allocates energy across growth) to help your species survive. The amount of energy to spend on an offspring and how much to spend on reproduction versus growth at different sizes are the key parameters to change, and ones that should be familiar to anyone who’s taken ecology classes. Figuring out the size-based energy allocation (and the secret rules, where small animals can’t store as much energy) is the most difficult part.

What if you had gills?

Recently one of my friends asked me about a device, about the size of a gas-mask filter, that claims to extract enough oxygen from water to allow you to breathe while submerged. He had some thoughts about the mechanical details and whether this device could outperform gills, but what he asked me was, essentially, this: if you had gills how big would they need to be? This is an interesting question1 and so I thought I’d share a detailed, sourced answer.

Let’s start with some basic fish biology drawn from Bone and Moore’s 2008 general ichthyology text, Biology of Fishes. A typical 1 kg fish has 18,000 square centimeters of gill lamellae. These gills extract 70-80% of the oxygen available in the water. This is such a big task that around 30% of the blood resistance in a fish’s circulatory system is in the gills2.

If we simply scaled this up to a 70 kg human3 we’d get 126 square meters of gill lamellae. This isn’t the number we want, though, since approximating a 70 kg human with a pile of seventy 1 kg fish isn’t accurate4. There are issues both of scaling efficiency (larger animals tend to need less oxygen per kilogram) and metabolic rate (humans are much more energy-hungry than fish on a kilo-per-kilo basis). What we actually want is a metabolic rate for our 1 kg average fish and a human metabolic rate5 so we can scale from there.

Clarke and Johnson (1999) estimated the metabolic scaling equation for teleost fish overall. Since teleost fish encompass more than 90% of all fish species a teleost fish equation is probably pretty close to a generalized fish equation. The equation from Clarke and Johnson is ln(metabolic rate as mmol of oxygen per hour) = 0.8(ln(body mass in grams)) – 5.43. A 1 kg fish would then need 1.101 mmol of oxygen per hour.

Ravussin et al. (1982) measured subjects of varying obesity and determined that non-obese subjects used 6,118 kJ a day for their resting metabolism. Leonard (2010) states that in humans 1 liter of oxygen is equal to 5 kcal of energy. Working through a lot of conversions (1 mol of oxygen is 1,000 mmol and is 22.4 liters at standard temperature and pressure, so that’s 44.64 mmol/liter, 5 kcal is 20.92 kJ so that’s 2.13 mmol/kJ, 6,118 kJ/day is 254.9 kJ/hr) we get 543.98 mmol of oxygen/hr. So, if an average, non-obese human needed to get by with gills we’d be looking at 889.4 square meters of gill lamellae just to meet basal metabolic needs.

Now, if you’re following all of this you may see a problem: that gill area/mass ratio is for a fish in total, not a fish that only rests. But we’ve calculated this for a human that only rests. Surely fish have some built-in safety factor which will help us out here. However, we exercise using mostly aerobic muscle activity, and fish exercise using mostly anaerobic muscular activity. Fish also use about 10% as much energy as land mammals in locomotion (both of these facts come from Bone & Moore, 2008). So whatever the safety factor a fish has to let it engage in fast movement that safety factor is going to be far too low for a human.

So what would 889.5 square meters of gill lamellae look like? This is hard to figure out. Gill lamellae are very small and tightly-packed, and so a lot of surface can fit in a small area. However, our average human now has gills 494 times larger than our 1 kg fish. Imagine a medium sized trout. Now imagine the gills – the full, feathery, red structures behind the operculum (gill cover). Now imagine basically 500 of those. If the trout had a mere cubic inch of gill our hypothetical human would need 0.29 cubic feet of gills. Of course, that much gill tissue would change the water flow through it in ways that would force changes in the gill dimensions as well, and so an actual cube of gill tissue would have dead spaces in it and would need even more tissue. Instead, the best design would probably be more like stacked wings of tissue, probably about the size of a person’s head. Remember, that’s a minimal gill that will let you breathe underwater but not really move around (or panic). If you were planning on living underwater, instead of just hopping into the water and drifting with the current, you’d need gills probably at least twenty times that size, since activity can easily use twenty times as much oxygen per minute as resting.

Sanity Check

These numbers appear strangely large. Would you really need gills twice the size of your torso to sustain you swimming around underwater? And it is possible I made an mathematical error. However, the sanity check suggests that this is probably about right.

First, that oxygen use rate is about 8 times higher for our hypothetical human than our fish on a kg-for-kg basis. (We’d need the exact weight of Ravussin et al.’s subjects to do better.) Since endotherms, like humans, tend to have metabolisms about ten times faster than ectotherms (like the vast majority of fish) we’re running clearly in the sanity zone on that one, perhaps even lowballing human oxygen needs (although large animals, like humans, are more efficient per kilogram than small ones, like our 1 kg fish).

Second, what’s a comparable animal? A great white shark is a large, endothermic fish. Its gills take up an area behind its head about as long as the head length. Great white sharks are also have lower body temperatures than humans (which reduces energy use) and are very streamlined, hydrodynamic swimmers, which means they use far less energy moving than humans do. (Humans, and all walking animals, use lots of energy in their limbs just holding themselves off the ground, while swimming animals can use all or almost all their energy moving themselves forward.)

Thirdly, what are swimming mammals doing? Not using gills. Water, under good conditions, only holds about 3% as much oxygen as air does. This means that gills should be larger than lungs for a given oxygen demand. If we ran the numbers based off of this we’d get gills that were 33 times larger than lungs. However, gills are more efficient than mammalian lungs (see the 70-80% oxygen capture rate quoted above) and so we can probably reduce the gill size by a factor of three. That would give us gills 11 times larger than lungs.

All in all, the gill sizes we’ve estimated seem reasonable, if extremely large.

Bone, Quentin;, and Richard H.; Moore. Biology of Fishes. Third Edit. New York, New York: Taylor & Francis, 2008.

Clarke, Andrew, and Nadine M. Johnston. “Scaling of Metabolic Rate with Body Mass and Temperature in Teleost Fish.” Journal of Animal Ecology 68, no. 5 (September 1, 1999): 893–905.

Leonard, William R. “Measuring Human Energy Expenditure and Metabolic Function: Basic Principles and Methods,” Journal of Anthropological Sciences 88, (2010): 221-230.

Ravussin, E., B. Burnand, Y. Schutz, and E. Jéquier. “Twenty-Four-Hour Energy Expenditure and Resting Metabolic Rate in Obese, Moderately Obese, and Control Subjects.” The American Journal of Clinical Nutrition 35, no. 3 (March 1, 1982): 566–73.

Extinct or Alive…. is actually pretty good

Yesterday evening I watched the premiere episode of “Extinct or Alive”, Animal Planet’s latest entry into the genre of cryptid1-hunting TV shows. I have a love/hate relationship with these shows, in that I love watching them so I can hate them. Most of them are excellent demonstrations of the vast gap between what laypeople think wildlife science looks like and what actual scientists do. Animal Planet, especially, has been a repeat offender with these sorts of shows, putting out lots of shows in which people search for cryptids but, in the process, make outrageous claims, demonstrate a lack of basic information about science, or just do stupid things that make no sense. “Extinct or Alive” is much, much better.

I have long believed that a good cryptid-hunting show could help explain science to people. Why doesn’t your eyewitness account of a Bigfoot establish it for science? Well, let’s see what a proper investigation which would meet scientific standards would look like. This would demonstrate the difference between “I am saying that I saw” and “we have evidence other people can examine”. “Extinct or Alive” is basically this show, although it’s not perfect.

Let’s start with the bad. I expected lots of bad (hence the title) but my actual complaints are few.

First, there’s not a lot of clarity on how different the Zanzibar leopard (the subject of the first show) is from mainland leopards. It would be easy to believe that most scientists believe it to be a separate species, when the range of opinions seems to range from “subspecies” to “very mildly different African leopard”.

Second, there’s the constant mention of the coelacanth. Admittedly, the host (Forrest Galante) has a personal connection to the story of the coelacanth’s rediscovery, but the coelacanth is a pretty odd case. Whether a deep-sea fish can make it millions of years without being recorded as a fossil is pretty different than the question of whether a big cat species can survive on a heavily-populated island.

Third, Forrest has a tendency to talk about himself as a lone wolf maverick, and yet in the first episode he is in contact with two other people working on this issue! Forrest seems to bring some real expertise to the table (unlike many other cryptid-hunter hosts) but it’s clear that it didn’t take Forrest to get people interested in the issue of species that may not really be extinct. Forrest also has the unfortunate habit of talking about the species he is looking for as if they are alive and need our help to stay this way, when this is only hopefully true of them.

But what about the good?

First, this is a cryptid-hunting show, not a monster-hunting show. The Zanzibar leopard is treated as a real cat. Nobody claims that it is the most dangerous animal on Zanzibar or that people lived in constant terror of it. Oddly, this is sort of true in Zanzibar – it was the largest big predator (aside from humans) and its reputation as a witch’s familiar did make people view it with real suspicion. However, Forrest treats this as an animal whose persistence into the present needs to be verified for conservation issues. This is in marked contrast to a show I once watched about the potential for thylacines to still be alive, which spent every spare minute trying to convince you that what was effectively a marsupial coyote was a deadly killer.

Second, the creature under investigation skews towards the plausible end of the spectrum. Zanzibar is under-studied enough that since the Zanzibar leopard’s supposed extinction date a subspecies of servaline genet was discovered there, and in the 22 years between that discovery and the filming of this episode of “Extinct or Alive” only two photos of that genet had ever been taken. (As it turns out, “Extinct or Alive” managed to improve that number. This only reinforces how easy it is to miss animals in Zanzibar.) Moreover, the leopard was known to have been there (it’s a known species, not an entirely new one) and the gap between now and its disappearance is only a matter of decades, not centuries or (in some of the crazier cryptid cases, millions of years).

Third, Forrest appears to know about animals. In my coelacanth article (referenced above) I made fun of “Expedition Mungo”, a show that lives on in infamy for several reason, one of which is the show’s host picking up a very human-like (although also clearly non-human), but very small, skull off the forest floor in Africa and asking someone what it was2. A monkey. Seriously, what other options were there? Forrest, on the other hand, seems to be a decent naturalist, and shares his love of animals with the viewer. Again, this reinforces the “looking for poorly-known creatures” angle against the “looking for monsters” angle so many other shows have.

Fourth, alternative hypotheses are made on-camera. Alternative hypotheses are extremely important in science, but many cryptid-hunters seem convinced that every small sign of a cryptid is proof positive. Forrest gets footage of something spotted very, very close to his trail camera and proceeds to explain that while this could be a Zanzibar leopard it could also be a servaline genet. In fact, after working you up about how this could be a leopard he pops your bubble with the second hypothesis. This isn’t just correct, it’s a good pedagogy, since people who were convinced that they were looking at a leopard will suddenly lose confidence and, hopefully, be more careful about such confidence in the future.

Fifth, the show spends time on actual science. Forrest gets a good, uninterrupted chunk of time to talk about sampling protocols and the importance of collecting as much data as possible. I think they cut the scene before he finishes actually writing the date on the sample container, but you understand why he is doing this, and frankly I don’t need to watch him write it out, I liked the fact that he explained to the audience why you always write the date, the time, and the location on your sampling containers (along with marking the point in your GPS, even if you’re pretty sure this sample isn’t the species of interest – all of this was mentioned by Forrest on camera).

Sixth, the show got what are really impressive results for such a short time frame. (Yes, I could complain about doing science as a travel show where the main scientist hops from continent to continent, but if it funds some actual science I’ll live with it.) This isn’t the good thing. The good thing is that the show gets results that would send many other shows over the moon and then Forrest says that it isn’t enough. The burden of scientific evidence hasn’t been met, and explains what else he will need and starts working on collecting that data. So, by the end of the show you have good reason to believe that the Zanzibar leopard is not extinct but you are also aware that Forrest believes that he needs DNA evidence to absolutely prove that this particular type of leopard is really present. Moreover, you know from the end credits that there is continuing work on that front – Forrest coming in with some cameras wasn’t the end, it was the preliminary work to a longer project.

So, what could ruin this for me? Well, if the problems I mentioned get larger and the good points get smaller that could make the show worse. What I really want to see, though, is how the show handles definitively poor evidence. What happens when they go somewhere and literally every lead is a dud, and it becomes apparent to us at home that there never was anything to this story except hoaxers or mistakes? Will Forrest say on-camera that he thinks there isn’t anything there, that the species he targeted really is extinct? Or will we get the all-too-typical hand waving and the promise that there’s always missed evidence?

However, for now, I think this show teaches some good science in an interesting way. Let’s hope that continues.

UPDATE: Also SPOILER. In the second episode Forrest does not find what he’s looking for. However, he does find something else which matches the descriptions he was given of the mystery creature fairly well. He’s pretty up-front that he thinks the villagers are not describing the extinct species he was looking for but this other rare, but known to be extant, species. Good job, Forrest!

Welcome SciREN folks!

Hello to everyone coming here via the SciREN event! This post will direct you to the some of the things you might be looking for. Always feel free to comment as well if you need help or want to share feedback.

The online simulators are here. If you are particularly interested in the niche partitioning simulator that I demoed at SciREN that simulator is the one called 100 Places.

Blog articles explaining each simulator are here.

There are some known bugs in some of these programs! Check here for those.

If you can’t find something drop me a comment.


Continent-wide analysis of how urbanization affects bird-window collision mortality in North America

I’m late on this, but I figure late is better than never. Recently a paper which I collaborated on (Continent-wide analysis of how urbanization affects bird-window collision mortality in North America) was published in Biological Conservation. The first and second authors (and organizers of the entire project) put together a press release and asked the other collaborators to disseminate it.

The short version is that we were looking at the factors that lead to birds killing themselves hitting windows. It’s not always appreciated just how many birds kill themselves hitting windows because birds tend to be small and their carcasses are both easily overlooked and easily removed or eaten whole by scavengers.

What we found was that building size is linked to bird mortality. This isn’t surprising since a larger building has more killing surfaces on it. What is more interesting is that a building of a given size was more dangerous to birds if it was in a region of low urbanization. (It also helped if the building itself was in a more “natural” area with grass or trees – again, not surprising, since these areas attract birds.) This may suggest that birds in urbanized areas behave differently and are perhaps more cautious around buildings. It may also suggest that certain sorts of birds may be more at risk and avoid urban areas. For instance, if migratory birds are more likely to kill themselves on windows (which seems reasonable, since they haven’t learned the area) and are also more likely to avoid cities then rural areas should see higher numbers of fatal bird strikes on buildings. Another hypothesis (and none of these are mutually exclusive) is more macabre. It posits that urban areas are not areas in which birds are less likely to die but that they are areas where birds have so many places to kill themselves that no one building becomes Bird Murder Central. Meanwhile, in rural areas all the birds that are going to try to fly through windows survive until they hit the one set of available windows, concentrating bird-murder around single buildings.

Anyway, all of that and more is available through the press release package and the paper itself. (Although the paper is paywalled, and some of you may not be able to access it1.) What I think I can add in this post is what it was like for me to be part of this project.

I came into this project because a friend of mine mentioned to me that they knew of someone at Duke who was doing it. I’m going to guess that this person was Nicolette Cagle, who is listed right after me (because of alphabetization and not geography). This friend then passed on some information and I contacted Steve Hager and offered to participate. At the time I assumed that I would be able to find several undergraduate students who would be interested in participating in a study this large and that I would be able to mostly supervise the project.

I began the project by selecting sites to survey (which included our tallest dormitory building, the tallest building on campus, and also two houses used as office buildings). I had to alter the sites twice. First, I selected a site that I was told I would have access to but, when the time came, I was told I couldn’t access the back of the building anymore. This building was actually just off campus and so I relocated to a building controlled by the university. Second, the buildings all needed to be 100 meters apart. Initially I selected a building that (unusually for our campus) had a large set of plate glass windows. I hoped by selecting this building that we could get enough variation in window size to try to get some real sense for how important this variable is. However, when I checked the measurements one last time before we started I realized that I needed 100 meters between the outer walls of each building, not the center of each building, and so I had to switch to a different building with smaller windows. As a result, we didn’t survey any buildings with particularly large windows on our campus.

Once the semester started I started recruiting students. I had thought I would get several volunteers, but I didn’t. Instead, one student (who I will not name without specific permission) volunteered. This particular student was an exceptionally dependable person and I sometimes wonder if they initially volunteered simply to be helpful.

At this point the student and I taught ourselves the sampling protocols and did some dry-runs. There was a protocol for one worker and one for two workers. We practiced both, and ended up needing both, since on several days we weren’t both available. The first thing we needed to do was clean up any dead birds already present around the buildings so they wouldn’t appear as fresh kills in the surveys. Most of the carcasses we found in clean-up were thoroughly rotten anyway. We then spent 21 consecutive days checking each of our six buildings at around 2-3 pm. When you come on to campus on the weekends looking for dead birds this stirs up a lot of excitement. One day I was stopped by another faculty member who didn’t recognize me and was sure I was some crazy person up to no good. Another Saturday an enthusiastic student took me on the random dead animal tour of campus (“And there’s a dead cat that got hit by a car and crawled under the dumpster over here….”).

All in all we found no freshly-dead birds. At some point a half-rotten starling showed up in our sample zone but I am pretty sure it blew off a roof because nothing rots that fast. This is in marked contrast to some other sites where dead birds showed up regularly. It was also somewhat disappointing in that while “no fatalities” is good data and good for birds it feels a lot like we found nothing.

Having turned in the data we got a request to collect data at the same time the following year. I didn’t do this. I feel sort of bad about this, but the reality was that I had assumed I would be directing a relatively large group of students, none of whom would need to take more than half the shifts. Instead, I ended up taking a lot of shifts myself. I just didn’t (and still don’t) have that sort of time in the afternoons when a lot of the classes I teach run. I should point out that I’ve been nothing but happy about the way Steve Hager, who has been the primary contact person for the study, has handled everything. From that angle my work on this project was really good. However, if I were to re-do this experience I would change two things.

First, I would line up student workers in advance. This would have been an easier study, and would have been done better (two surveyors per site every day), with more students. We could have managed two years, and I could have done more of the data analysis on my end instead of passing it off to Steve, with more workers.

Second, I would have put more effort in the summer into making sure I had my sites right early on and done some of the satellite image work early on.

It’s worth thinking about the fact that a lot of these issues were rookie issues. I wasn’t running a lab with seven undergraduates back then and I didn’t have a good handle on how to recruit undergraduate researchers, how to vet undergraduate researchers (this is linked to recruiting, because some recruitment techniques get you lots of volunteers at the expense of quality), and what you could realistically expect undergraduates to handle without your direct supervision. I lucked out on this last one because I had a really solid undergraduate assistant but I have now supervised plenty of really enthusiastic, hard working students who would not have been able to take that task on and get it done correctly until they had more research experience. I also hadn’t done some of the analysis types before and assumed they would be straightforward. These days I generally make what I think is a reasonable estimate and then assume that some unforeseen issue will triple the time required.

However, I think that ultimately this sort of collaborative venture can be an excellent way to do some research at a primarily-teaching institute. By splitting up the data collection load no one person is stuck holding up the project forever (unlike some of my projects, which are held up until I can personally find time to go to a field site that is not now very close to where I live). This one worked best when at least one undergraduate was involved (since the best sampling protocol involved two people) which also gives the undergraduate student some real research experience.

Fun Terms in Science

Most of the time we think of scientific terminology as really dry. In the last week I’ve run across uses of several terms that I want to share to counteract that impression.

  1. When I discussed Lazarus taxa and the coelacanth I could have extended the discussion to Elvis taxa. Lazarus taxa are taxa that appear to die off in the fossil record and then re-emerge. Elvis taxa really do disappear, but are replaced by look-alike taxa.
  2. A Darwinian Demon is a creature that can optimize fitness across all axes simultaneously. They don’t exist, but are used as hypotheticals to think about how optimization constraints affect real species. (For an example linked to something else I do, in 100 Places a Darwinian Demon could allocate 100% of its energy to everything.)
  3. Dust bunny distributions are distributions which, when graphed, have all the points shoved into corners and edges. I’m totally serious about this. Look, here’s a serious analysis of this issue.


Welcome to Spiders are Always Watching You!

The purpose of this blog is threefold.

First, it provides somewhere for me to talk about the open-source software I produce. Sure, you want a help file, but for the educational software especially you may want to know what sorts of lessons you could use the software for and how to use it to teach particular concepts. It’s also a good place to put up update information.

Second, I plan on talking about my own research here.

Third, there are lots of things in science that interest me that simply aren’t large enough ideas to make into full-fledged research papers. (They are smaller than the Least Publishable Unit.) However, if I just spent an hour sorting through some data or reading an interesting paper there’s now a place to talk about that: here.