Articles tagged: melhack

Frogspotter v3 and MelHack wrap-up

2725 days ago

So first I will show off a bit more frogspotter and then talk about #melhack as an event.

After making version 1, I got some great advice from people at melhack and not, about how to do clustering of Google Map markers. It seems there are quite a few options. I ended up going with MarkerClusterer:

(Oh and check that species list. But more on that later :))

MarkerClusterer looks great… in fact, maybe it looks too good. I do prefer the colour explosion of seeing all the different coloured markers directly. With MarkerClusterer, the “cluster” markers have their own colour scheme which is just related to the total number of markers. I can’t figure out a way to preserve the different species-ness of the markers when they get turned into clusters.

But, OTOH, with MarkerClusterer I can actually display all 6,700 points on the map, with minimal complaint from Firefox. So… that’s a tradeoff.

So yeah, when I build the markers, I also insert checkboxes in the table on the right for each species, and buttons to add or remove all of them. The buttons work perfectly, but the per-species toggling is a little wonky. If you click “Remove all”, then check one species, then uncheck it again, they don’t disappear when you uncheck it. I have to rework the JavaScript relating to that.

The cluster markers also freak out if you do “Remove all”, check some species, then try and zoom in. They stay as cluster markers and don’t convert to individual markers like they are supposed to if you zoom in enough. But if you just zoom in on the initial map with everything, you can see the individual markers. :)

So the pop-ups now have a link – to pages at Frogs of Australia, like Neobatrachus centralis. I was so happy to do that because Frogs of Australia have an awesome pretty/clean URL scheme. No API or searching or anything needed!

A few things more I would like to do

  • Fix the marker handling so that the check boxes work properly – hopefully will fix zooming on cluster markers too. (you never know)
  • convert to using jQuery
  • Add an image from Flickr/Wikimedia Commons in the pop-ups
  • And probably cache them…
  • Drop in a templating system…hmm, maybe Mako?
  • Add an ‘about’ page
  • Incorporate timeline data, per-species, in a graphic to the right of the checkboxes – so far I’ve just completely ignored this
  • Overlay other data like national parks

That’s all rather ambitious given I’m not devoting any more consecutive 24-hour stretches to this project, but you never know. :) Maybe I’ll be inspired for the MashupAustralia deadline this Friday. Or maybe I’ll work on it this Saturday at the GGD Afternoon Hack, even though the deadline is past it will still be a fun project.

Even though I know how simple it is to put together something with Google Maps, there is still something magic about seeing your dots show up on a map. Even other techies I showed it to over the weekend had the same reaction.

This weekend is also basically the first time I had ever written any JavaScript myself. Mostly, of course, I didn’t: lots and lots of cut and paste, save, refresh, console.log, rinse and repeat. But I was surprised to find that I quite like writing JavaScript. Must be the dynamic typing. I quite also liked that “object = associative array” because I use dictionaries (Python name for an associative array) a lot in Python. But although I liked writing it, debugging it is still another matter. Of course I made heavy use of Firebug, but I really need to go through a basic tutorial or two so I have a better understanding of the lay of the JavaScript universe. Overall that was a happy discovery.

I found out on Twitter when I got home that someone else had been inspired to work with the frog data too, at the Sydney oahack (OpenAustralia) hackfest. So I am very curious to see that. :)

During my presentation of frogspotter at the end of MelHack, I was corrected by Dr Gruen about where the data came from — I had wrongly assumed it was recorded by South Australian public servants. But no! It’s from the public. Pretty awesome.

To MelHack itself, it was such a great event. Lonely Planet provided a great building, great staff and support for everyone who came. Host Matthew Cashmore in particular did a really great job. We were fed well, had laser skirmish, won amazing prizes (set of every LP guidebook, Asus eee PCs, 24’‘ monitor etc…) and got to sleep under the stars on the top of a three storey building in Footscray. The staff were really friendly and happy to help out with anything. Even debugging JavaScript.

You might call it a geek adventure. ;)

tags: , , ,

Comment

---

Frogspotter v2

2726 days ago

This is around 800 entries, only about an eighth of the total data. Once I incorporated colour, all the JavaScript just barfed too much to cope with the total data. Different colours = different frog species. There are about 30 in total.

You can look at frogspotter at frogspotter.modernthings.org and you can also help me with my JavaScript at Launchpad ;)

tags:

Comment

---

MelHack - But does it have frogs?

2727 days ago

So I have been reading with interest the stuff coming from the Government 2.0 Taskforce. Even if the name is hard to take seriously, it’s a lot better than the last time the federal government tried blogging. Probably because those making the most interesting noises are not those in government, but nevermind…

Two interesting things to come from that have been the Mashup Australia competition and the data.australia.gov.au portal, which is really cool but I am afraid will not have a life much beyond the competition… hopefully I’m wrong there.

The NSW state government is also doing a similar thing, although they announced it earlier and released their data later.

As part of the Mashup Australia competition, the taskforce organised a “hacking event” in Canberra called GovHack (see also SMH story). Sydney had not one but two similar events, hosted by Open Australia and Google, and until quite late it looked like Melbourne was going to miss out. At more or less the last minute, Lonely Planet came to the rescue and converted their OpenSocial/LP API hack day to also incorporate the GovHack stuff. And hence we have MelHack where I find myself for the weekend.

This morning I also gave a short presentation on how to use Wiki[mp]edia data. You can see my slides on Slideshare. Feel free to ask me for more detail because they’re pretty sparse.

So now comes the 24 hours to hack. Unfortunately I don’t have any great society-transforming idea in mind, and the data sets at first glance don’t help. The interesting ones are sparse, or it seems an interesting app might combine 3 or more of them, whereas I’m pretty sure I should start with just 1 and make sure I can work with that, before using any more. So what to do?

Well, when in doubt, why not go with frogs.

The South Australian frog atlas contains over 6,700 sightings of frogs. This is what happens when you convert the CSV to XML and basically just chuck them all on a map. I haven’t worked with Google Maps before, but maps do seem to be a vital element in mashups, so it’s a good a time as any to learn.

OK, that’s frogspotter v1. I will work on making v2 more useful. ;)

tags: , , ,

Comment [5]

---