code

Image uploads

A particular challenge with maintaining a weblog is the uploading and resizing of images. The process involves choosing the correct images, creating large & thumbnail sized versions, uploading these images to the webserver, and posting the appropriate code into the weblog post. In the spirit of my last few posts, image2web is an applescript I use to automate this process: --user-specific variables property theAlbum : "Marked" --contains the images to be uploaded property theBasePath : "

Continue reading β†’

Quirks & Quarks

Quirks & Quarks is the CBC’s excellent science program. I usually download the mp3 archives of the show on the weekends and listen while I walk Ceiligh. Of course, loading up the Quirks & Quarks webpage, finding the archives, downloading the mp3s, and adding them to iTunes takes at least a few minutes. Computers are much better and handling such tedium. Inspired by the success (for me) of the apod script, quirks.

Continue reading β†’

Astronomy pictures on the Desktop

The β€œAstronomy Picture of the Day” is a source of fantastic images. To take advantage of this resource, I went looking for a way to automatically set the current image as my Desktop background. A quick Google search turned up a perl script at www.haroldbakker.com. Although this was a great start, I wasn’t completely happy with the implementation of this script and decided to write my own. The apod.pl script is written in perl and both sets the Desktop background and copies a description of the image to the Desktop as an html file.

Continue reading β†’

JSTOR import script

I’ve written a script that imports a JSTOR citation page into BibDesk. To use the script, I suggest adding it to your script menu. Then, with the JSTOR citation page as the active web page in Safari, run the script and the citation will be added to the active BibDesk file. I use the first author’s last name and last two digits of the year as a cite key (e.g. Darwin59), you may want to change this to suit your style.

Continue reading β†’

Dynamic State Variable Models in Ecology

There’s a powerful approach to modelling called dynamic state variable programming, covered in Dynamic State Variable Models In Ecology by Clark & Mangel. I’ll post more about the approach sometime, but for now I wanted to make an example from the book available. The first chapter of the book includes a guide through the creation of a patch foraging model. A fully implemented version is available in True BASIC, but I’ve decided to use R for all of my modelling and analyses.

Continue reading β†’

Journal abbreviations

Until recently, I was able to use journal abbreviations in all of my manuscripts. Consequently, my .bib file contains only abbreviations in the journal field. Now I need to produce some bibliographies with full journal names. With a .bib file you can use macros to handle changing abbreviated names to full names. However, BibDesk cannot use macros. Instead I wrote a perl script that searches through a .bib file and creates a new file with journal abbreviations changed to full names.

Continue reading β†’

Confronting models with data

The Ecological Detective by Ray Hilborn and Marc Mangel is an excellent source for learning how to analyse ecological data with sophistication. Traditionally, ecological data is analysed from the binary perspective of hypothesis testing. The goal of such testing is to either accept or reject a null hypothesis. Although it is well entrenched in ecological training and publication, this hypothesis testing has repeatedly been attacked by statisticians and many ecologists.

Continue reading β†’

Character assignments in phylogenetic analyses

In some recent research (http://public.me.com/mroutley/SIandDichogamy.pdf) I had to make inferences about families based on character states of the species within the family. One approach is to use a simple majority rule. For example, if more than half of the species possess character state x rather than y, then the family can be described as x. However, this approach seemed rather liberal, which led to a 2/3 majority criterion: if more than 2/3 of the species are x, the family is x; If less than 1/3 is x the family is y; otherwise the family is ambiguous.

Continue reading β†’