Eat your greens!

Actually, I am a rocket scientist
Home » Page 2

£3736.56

Posted in amnesty, book sale


Amnesty book sale 2009, originally uploaded by Eat your greens!.

The Amnesty November book sale is over and we raised an amazing £3736.56, which brings our total for 2009 to a phenomenal £16,500. Many thanks to everyone who volunteered time to help set up the Church of the Ascension and also sell books on the day. Thanks also to the Ascension for allowing us to take over their church for the three days it takes to set up the November sale. Finally, thanks also to everyone who offered books to the group. We’re sorry that we haven’t been able to accept donations for the November sale. There were simply so many books leftover from June that we were kept busy trying to sell those. I will try to contact everyone who offered books and suggest some alternative places which may be collecting. We will start collecting books again in May 2010.

Amnesty book sale, 14th November 2009

Posted in amnesty, book sale

8th annual Blackheath & Greenwich Amnesty clearance book sale
Saturday 14th November 2008
10am until 4pm
Church of the Ascension
Dartmouth Row
Blackheath SE10 8BF

20,000 new and used books at bargain prices. In June we raised a record-breaking £12,500 for Amnesty International UK but we still have thousands of books left to sell. We hope to raise a further £3,000 by selling the unsold books in November.

If you would like to help with preparing for the sale, or are interested in collecting unsold books at the end of the day, please leave a comment using the form below.

You can also find us on Upcoming and facebook. Flyers can be downloaded from flickr.

Look out honey cos I’m using technology

Posted in geekage, yql

My last post gave some examples of YQL queries that could be used to access the data for the Science Museum’s Cosmic Collections competition. Looking at XML feeds is pretty dry, though, so I thought it would be fun to put together a demo which uses a YQL query to visualise the data. I’ve also been looking at Raphaël recently, a small library for working with SVG in web pages. Inspired by the Royal Observatory’s Flickr touchscreen, and knowing next to nothing about either jQuery or SVG, I wrote some quick code with jQuery and Raphaël to display photos of the Science Museum objects as a pile of polaroid photos.

Here’s the code, with some explanation in the comments that hopefully shows how to extract the Science Museum data from the query results and do something useful with it. The event handling code seems a little dodgy to me ( I really know very little about SVG or jQuery) but seems to work in Opera, Firefox and Safari. You can try it on the demo page. Click to pick up a photo and move it. Click again to drop it.

A small update: Here’s a second demo using drag-and-drop instead of mouse clicks. I’ve also added the focusable attribute to the SVG rectangles, to make them accessible from the keyboard. This only seems to work in Opera.

// URL of the environment file, which points to the URL
// of the nmsi.cosmosculture YQL table definition.
var env = 'http://eatyourgreens.org.uk/yql/nmsi.env';
// YQL query to select everything from the Cosmic Collections dataset.
// Change this query to change the objects displayed in the page.
var yql = "select * from nmsi.cosmosculture";
// Example alternate query - fetch everything linked to the Moon
// var yql = "select * from nmsi.cosmosculture where LinkedCelestialBodies.CelestialBody.CommonName = 'Moon'";

// Encode the query and env file URL in a call to the YQL web service.
// Specify JSON as the return format.
var url = 'http://query.yahooapis.com/v1/public/yql?q='+ encodeURIComponent(yql) + '&env='+encodeURIComponent(env)+'&diagnostics=false&format=json&callback=?';

// Set a canvas for Raphael to draw on.
var height = 600;
var width = 800;
var paper = Raphael('canvas', width, height);

// Set some global variables to use when we are dragging elements around the canvas.
var startx = 0;
var starty = 0;
var dragging = false;
var draggedSet = null;

// Call the YQL web service and pass the json result to a callback function
$.getJSON(url, function(json){
//  Get the array of museum objects from the query result.
	var items = json.query.results.MuseumObject;
// Loop through the items array
	$.each(items, function(i, item) {
// Ignore items which don't have a photo
		if(item.Image.Source){
			var src = item.Image.Source;
// The smallest available image size is 'Inline'.
			src = src.replace("Medium","Inline");
			src = 'http://www.sciencemuseum.org.uk'+src;
// Generate a random x,y position for the photo
 			var x = 10 + (width-110) * Math.random();
 			var y = 10 + (height-110) * Math.random();
// Generate a random angle between 350 and 10 degrees.
 			var rot = 10*Math.random();
 			if(Math.random() < 0.5) rot = 360-rot;
// Each photo is built from a set consisting of a white rectangle and the photo
 				var s = paper.set();
 				s.push(paper.rect(x,y,110,140).attr('fill','white'),paper.image(src, x+5, y+5, 100, 100));
// Rotate the set by our random angle
 				s.rotate(rot);
// When the set is clicked, if already dragging, drop the photo.
// Otherwise, bring to the front and store the mouse
// coordinates for future use.
 				s.click(function(e) {
 					if (dragging) {
 						dragging=false;
 					}else {
 						dragging = true;
 						startx = e.clientX;
 						starty = e.clientY;
 						s.toFront();
 						draggedSet = s;
 					}
 				});
// Listen for mouse movement on the document.
// If dragging, move the dragged set to the
// x,y coordinates of the mouse.
// Store the current coordinates for the start
// of the next move.
 				document.onmousemove = function(e){
 					if(dragging) {
 						dx = e.clientX - startx;
 						dy = e.clientY - starty;

 						for (var j=0; j < 2; j++) {
 							var node = draggedSet[j];
 							node.attr({x: node.attr('x')+dx, y: node.attr('y')+dy});
 						}

 						startx = e.clientX;
 						starty = e.clientY;
 					}
 				};
 			}
 		});
})

Science Museum Cosmic Collections competition

Posted in geekage, yql

The Science Museum have launched their Cosmic Collections website competition. They are offering two £1,000 prizes for web mashups built using their data describing the objects in the Cosmos & Culture gallery. The deadline for entries is 28th November 2009. Full details are available on the competition web page. There’s also a Yahoo! Developer Network interview with Mia Ridge about the competition.

The data has been released using a fairly simple API, so I’ve drafted a YQL open table definition for it. You can use it to retrieve the full dataset:

use "http://eatyourgreens.org.uk/yql/nmsi.cosmosculture.xml";
select * from nmsi.cosmosculture

Try it

or retrieve an individual item, given the accession number:

use "http://eatyourgreens.org.uk/yql/nmsi.cosmosculture.xml";
select * from nmsi.cosmosculture where AccessionNumber = '1923-668';

Try it

You can also use YQL’s own filtering operators to restrict the result set. For example, get items for a particular place:

use "http://eatyourgreens.org.uk/yql/nmsi.cosmosculture.xml";
select * from nmsi.cosmosculture
where LinkedPlaces.Place.PlaceName like '%Italy%'

Try it

The competition wiki has a page describing the catalogue fields returned by the API.

YQL updates for nmm.collections

Posted in geekage, yql

I’ve made a couple of updates to the National Maritime Museum YQL tables, to hopefully make it a little easier to search the NMM collections with YQL.

Firstly, I’ve added a new input parameter, sortby, to nmm.collections.search, which specifies the field used to sort search results. Possible values are objectid, title, maker, year, updated. You can also specify sortby = 'rank' to order results by relevance for free text searches. So, for example, you can get the most recently updated records from the art collection with the following query:

select * from nmm.collections.search
where category = 'art' and searchterm = '' and sortby='updated'
Try it

Secondly, I’ve set up an XML feed to look up entries in the authority tables, and a corresponding YQL table nmm.collections.authorities. So, rather than having to know that the Aquitania is entry 21209 in the vessels authority, you can look up its entry with:

select * from nmm.collections.authorities
where authority = 'vessels' and title = 'Aquitania'
Try it

This is most useful when doing search for objects linked to a particular authority record, as you can join the two nmm.collections tables. For example, to search for art by the painter Charles Pears, you could try the query:

select * from nmm.collections.search
where searchterm='' and (authority,category) in
(select authority,id from nmm.collections.authorities
where authority = 'people' and title = 'pears')
Try it

The new YQL table definitions are available on github, and will hopefully be available to use in the YQL console soon. I’ve set up a javascript demo page where developers can test YQL queries against the NMM collections. There’s also a page of documentation about the NMM’s collections feeds, with some sample YQL queries for developers.

Belarus: Stop the execution of Vasily Yusepchuk

Posted in amnesty

Vasily Yusepchuk was sentenced to death by Brest Regional Court on 29 June 2009. He was convicted of murdering six elderly women. On 2 October his appeal against the death sentence was turned down by the Supreme Court. In Belarus, people who have been sentenced to death have 10 days in which to apply for clemency after their appeals are rejected. Only one request for clemency has been granted since President Lukashenka came to power in 1994.

Vasily Yusepchuk, belongs to a marginalized group; he is a Roma who does not have an internal passport which is a requirement of all citizens in Belarus. He may have an intellectual disability and his lawyer has stated that he is illiterate and unable to tell the months of the year. Vasily Yusepchuk has alleged that he was beaten while in pre-trial detention on two separate occasions in January and in March.

In Belarus, condemned prisoners are given no warning that they are about to be executed, and they are usually executed within minutes of being told that their appeal for clemency has been rejected. They are first taken to a room where, in the presence of the Director of the detention facility, the Prosecutor and one other Ministry of Interior employee, they are told that their appeal for clemency has been turned down and that the sentence will be carried out. They are then taken to a neighbouring room where they are forced to their knees and shot in the back of the head. Their families will only be informed days or sometimes weeks after the execution that their relative has been executed.

You can send an e-mail to President Lukashenka calling for clemency for Vasily Yusepchuk.

£12,500

Posted in amnesty, book sale

Amnesty book sale 2009, originally uploaded by eat your greens.

I’ve been neglecting this blog, so I never posted an update on the Amnesty book sale this summer. The total take on the day was a phenomenal £11,700! Since then, we’ve received some donations and sold the Encyclopedia Britannica on e-bay, bringing the total raised to £12,500. Our highest total ever. Many thanks to everyone who gave up their time, over the five weeks leading up to the sale, to get it all together.

The leftover books, of which there were plenty, will go on sale again on Saturday 14th November at the Church of the Ascension.

Wandsworth Amnesty Embassy Crawl

Posted in amnesty

I joined Wandsworth Amnesty on their annual Embassy Crawl this weekend, the fourth year that I’ve gone along. This year’s theme was Amnesty International’s Individuals at Risk campaign. It was great to see everyone from the Wandsworth group and a lovely day for a walk through London and lunch by the Serpentine (even with the starlings trying to steal my chips). We visited nine embassies and delivered a letter to each on behalf of an individual or group; India, Zimbabwe, Nigeria, Burma, Egypt, Algeria, Iran, Colombia and Syria. I’ve put up a set of photos on Flickr, with links from individual photos to the relevant Amnesty International actions.

35th annual Blackheath & Greenwich Amnesty book sale

Posted in amnesty, book sale

Amnesty International book sale 2009
2009 Book Sale Leaflet, originally uploaded by eat your greens.

35th annual Blackheath & Greenwich Amnesty book sale
Saturday 20th June 2009
9am until 5pm
Church of the Ascension
Dartmouth Row
Blackheath SE10 8BF

20,000 new and used books at bargain prices. Last year we raised a record-breaking £11,700 for Amnesty International UK. I’m not sure we’ll manage that again, but please come along and help us by buying a few books to read over the summer.

This sale is dependent entirely on the hard work of a small team of volunteers and generous donations of books. If you would like to help with preparing for the sale, or would like to donate books, please leave a comment using the form below.

You can also find us on Upcoming and Facebook. Flyers can be downloaded from flickr.

Searching the sky with YQL Execute

Posted in astronomy, geekage, yql

I was fortunate enough to win one of the prizes at Open Hack London this weekend. I ported the javascript from my astronomy photo browser to YQL Execute, creating a new open data table which returns celestial coordinates for astrotagged flickr photos. Essentially, my hack extends the flickr API to, hopefully, enable location-based searching in the sky.

Since I only wrote my hack in about an hour, during breakfast on Sunday, I returned to it this evening and finished it off. I’ve defined an open data table at http://eatyourgreens.org.uk/yql/flickr.photos.astro.xml which returns all machine tag info in the astro: namespace for the 50 most recently tagged photos. For convenience, it also returns the photo owner, title, url and root url for thumbnail images.

There is a demo, where you can try searching based on Right Ascension and Declination (both expressed in degrees). Please try it out and leave feedback in the comments here.

Demo URL: http://eatyourgreens.org.uk/testapps/yql/locationsearch.html

Example queries

The Carina Nebula

        select * from flickr.photos.astro
        where ra > 155 and ra < 165
        and dec > -65 and dec < -55

The Orion Nebula and surroundings

        select * from flickr.photos.astro
        where ra > 70 and ra < 100
        and dec > -20 and dec < 10

Get lots of photos of Orion (may be slow)

        select * from flickr.photos.astro(0,200)
        where ra > 70 and ra < 100
        and dec > -20 and dec < 10

Find nebulae from the New General Catalogue (names beginning NGC)

      select * from flickr.photos.astro
      where name like 'NGC%'

Find nebulae from the Messier catalogue (names beginning with M )

     select id, title, url, imgroot, username, ra, dec, fov, orientation, name
      from flickr.photos.astro(40)
      where name like 'M %'

Find all photos of the Rosette nebula

      select * from flickr.photos.astro(0,200)
        where name = 'Rosette nebula'

Explicitly declare all the table columns

      select id, title, url, imgroot, username, ra, dec, fov, orientation, name
      from flickr.photos.astro