April 19th, 2010

You are currently browsing the articles from A Buck A Night written on April 19th, 2010.

Australian Frog Database

Thought someone out there might need something like this. I don’t have a particular use for these exact pieces, so I’m going to share.

First, I found some semi-interesting hunks of data over at http://www.reddit.com/r/datasets/ — there’s a link on that page (it updates slowly so it’s probably still there) to this site for Australia: http://data.australia.gov.au/ . I chose one at random, well semi-random (I was looking for something smallish) and found http://data.australia.gov.au/570 this dataset of frog sightings. Download the file, unzip the file, and it’s in XLS format. Oowriter can read that and save it to a csv; so I did. Then I wrote a little php script that’d be able to read the file and maybe import into a database (this step is superfluous because you could just do a mysql “import data from file” query and you’d be done. But here’s what the start of the script looks like:

$input=file( "frogs.csv" );
foreach( $input as $line ) {
list( $fauna, $species, $common, $nsxcode, $lat, $long, $amgzon, $easting, $northing, $sighting, $date, $reliable, $method ) = explode(',', $line );
print "$common: $lat, $long\n";
}

Ok, what could you do with a database of frogs and their location? You could pull some information from Wikipedia with this format: http://en.wikipedia.org/wiki/ . str_replace(‘ ‘, ‘_’, ucwords(strtolower( $common ) ) ). You could follow the wiki link to http://frogsaustralia.net.au/frogs/display.cfm?frog_id=72 and get some more information, including their call.

Or, you could use some geolocation service or just ask the user where they are, and give them a list of the 10 different frogs in the area (“I just saw something brown! what could it have been?”). Or, you could mash these up with the database of public toilets to find out what frog’s making that infernal racket in the potty, and is it venomous? (hint: you’re in Australia, it’s venomous).

Ok, so the frogs are a pretty silly example. But thank you Australia for the six thousand little data points in that database.

Written by russ on April 19th, 2010 with no comments.
Read more articles on Uncategorized.