Saturday, February 11, 2006

Family Relationships

The family album site really needs generalized deduction. The deductions about dates and ages are hand coded:

deduce the date of the photo:

photo.deduceddate =
(photo.date,
{ some subject s | s.birthday and photo.s.age | s.birthday + photo.s.age},
)[1]

deduce the age of the subjects:

all s: subject |
s.deducedage = (photo.s.age, photo.deduceddate + s.deducedage)[1]

One neat trick would be to calculate relative relationships: if the viewer is x and the subject is s then what is s to x ( great great grand uncle or even the more verbose - your father's father's father's brother)

This calls for a Prolog engine perhaps

Possibilities include
  • PyLog a Prolog translater for Python
  • A number of Prolog engines listed here but this looks very old.
Or RDF and Jena?
[sites which are undated are just terrible - I must remember that on my own site]

Sunday, February 05, 2006

Exist NDX web server

Paul has generously provided me with space on his server to install exist in its Jetty configuration. This provides me with an external site which I can use with GoogleMaps. So far I've been putting up the family history site.

Developing on this site is much more immediate that with my typical FTP enabled site. With the Java client, I can work directly on the database , editing code, uploading scripts and photos and executing test queries. There is also a rather safer web interface. Great for rapid development. I was working on improving the XSLT and looking at the problem of aliases (maiden names usually) . I'm so used to using the oh-so-useful generalised = in Xquery that I forgot that Xalan is still on XSLT 1.0 with XPath 1.0, whereas XQuery uses XPath 2.0. This generalisation is the main difference to hit me but its so useful and a pain to have to replace with the inferior contains(). In fact I'm really struggling with alias still.

One idea is to develop this family history with my brother Richard and my nephew, Reddyn, in New Zealand, who I have sadly neglected. Here we could all work together in a very Web 2.0 collaboration. Hope they run with the idea.

Tag Clouds

Just been playing with generating tag clouds, based on the UCAS keywords which I obtained before Christmas. These are now integrated into the view of programmes, but perhaps all such relationships are worth reversing - here keyword to programme - and the obvious way to do this is with a tag cloud. Ian reminds me of my play with Postscript, generating exam result lists in fonts scaled to the mark itself. The big plus here was that when students were sorted into ascending order of the overall average, you could see at a glance how well each separate exam correlated with the overall.

My tag cloud uses xquery and xslt. First pass to compute the tags and counts, then compute min and max counts from this computed element, and a scaling factor, all in Xquery. XSLT generates the cloud, computing a fontsize based on the count. All a bit slow but it does the job.

I've also just realised a feature of most clouds I've seen - double description [Bateson]. That is tags are not only scaled in size but intensity is increased as well. Newzingo uses a 7 point scale, not the continuous variation I'd assumed from my Postscript days, where both font size and red intensity increase together. Clouds differ in the link styles - default isnt appropriate since it's just a page of links, but just what style is best? I've set the title attribute on my tags, containing the course codes themselves for a quick check but this seems to conflict with hover styling.

But I wonder how to use the comparative idea here - so that keywords in one faculty can be contrasted with those in another, in order to visualise the difference between the two faculties. Perhaps the trick would be a single map which can be dynamicly switched between the two - perhaps even programmed to do so, like a flicker star-map comparator. I would need to get the two maps to register, so that there is a single merged map, but words can be turned on or off - perhaps I'd have to drop the size scaling since this will alter the position of text. Just coluring the text by coding for the datasets and varying the intensity proportional to importance.

Since our new VC seems likely to be merging faculties, this might be a useful tool for him to see which ones to merge - quelle horreur - its just the way this visualisation might be used!

Friday, January 20, 2006

More Google mashups

More play with map-based mashups. This evening, using programmableweb's listing , I found Flash Earth, a Google Earth mashup. Here's the link to a narrow siq in the Wadi Rum area in Jordan, one of several with old inscriptions carved in the sandstone.

This memory game is a neat idea, using yahoo images to populate a layout of images to play pairs (or memory).

But my favourite is Community Walk Last night I started to create a walk around the university campus - just a single, rather bland view of our building - perhaps this is not such a good idea if we want to attract students. Later I started one for our trip to Jordan. Just three photos uploaded at present, and I'm uncertain about the location of one of these - I can''t seem to find the location of Petra. I do wish I'd keep the GPS data since I had the Garmin with me to check heights and distances, but at that time, the advantages of geo-coding photographs just hadn't occured to me. Maybe a student project to make a camera and GPS lashup. What would be really nice would be to add a fluxgate compass too, so the photo is coded with the direction in which the camera was pointing as well.

Just found another UK mashup of all UK schools It shows the location of all UK schools, locates the nearest 20 to a specified location, highlights the marker from a list of school names and their Ofsted rating (at least for Independent Schools).

Finally on this bit of research, located Barry Hunter's work on at nearby.org.uk which offers a REST interface for conversion between a range of different coordinate systems, e.g. Postcode to Lat/long. Will be very handy for the FamilyHistory mashup, although the postcode is only down to sector level - not enough accuracy for this application, and I suppose there's not much extra work in hand-coding this number of locations.

Tuesday, January 17, 2006

Beginner's Mashup

I've been playing with integrating maps into my family history photo album. The idea is to place each photo in time, place and (through the people in the photo) in the web of family relationships.

The first attempt uses an XML file of photo meta-data, transformed with a simple XSLT on the client-side. This transformation is to a table of data with links to the raw jpegs, map positions (courtesy of Multimap) and years (thanks wikipedia). No relationships yet. Hardly a mashup, since the context data is linked only with URLs.

The second attempt uses Google maps. Now the map is embedded in the photo page, much closer coupling afforded by the use of Javascript. The step of including the Google Javascript source is coupled with authorisation via URL parameters- a neat application of the Shanley principle. The XSLT caused me a bit of pain here when generating the Javascript and it's still not right: the transformed HTML works fine in IE6 and if generated client-side with XALAN, but its no good on Firefox which just spins.

I now have to think how the students will use and develop this example: their server is inside our firewall and so Google won't be able to issue a key. They need a server in the DMZ for this I guess but we need that for the new Internet Applications Development module for September this year.

Sunday, January 15, 2006

The title

The title is an echo of Alfred Russel Wallace's Line through the Malay Archipeligo which he postulated to explain the differences he observed in bird and animal species. The line runs between Borneo and Sulawesi, and between Bali and Lombok, Asian species (such as tigers) to the west , Australiasian species (such as marsupials) to the east. Nowadays the theory of tectonic plates and land bridges during ice ages provides an explanation for this disjuncture.

My appropriation is hardly warranted: ARW is no relation of mine, and I'm a teacher of computing, not natural history. I have crossed the Wallace line however, when a few years ago, my wife and I circumnavigated in our yacht Perdika of Bristol. It was in fact quite a struggle. The current flow through all these straits is fierce and we crabbed our way from Lombok to Bali, pointing fully 40 degrees north of our track over land, and later when motoring northwards up the strait, finding the inshore counter-current frighteningly close to the Bali shore.

The title also reflects the nature of a blog, a time-line of writing. I'm interested in time-lines and the representation of complex event-spaces at present, partly as a domain to use in my second year course on data structures which this semester will be looking at XML and XML databases, eXist in particular. I've also started to do a bit of genealogical research into my personal 'Wallace Line' and discovered how addictive this detective work is. From census records available online at scotlandspeople.gov.uk, I find that my great-grandfather (or rather one of four of course) Ebenezer Wallace was a wine merchant in Edinburgh in the 1880's, a fact which makes my own consumption of good wines now feel like a family duty.

The first word

I teach internet computing - therefore I must blog.