<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eat your greens!</title>
	<atom:link href="http://eatyourgreens.org.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://eatyourgreens.org.uk</link>
	<description>Actually, I am a rocket scientist</description>
	<lastBuildDate>Fri, 25 Jun 2010 22:07:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Get excited and make things with science</title>
		<link>http://eatyourgreens.org.uk/archives/2010/06/get-excited-and-make-things-with-science.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2010/06/get-excited-and-make-things-with-science.html#comments</comments>
		<pubDate>Fri, 25 Jun 2010 00:30:46 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[geekage]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=631</guid>
		<description><![CDATA[Last weekend, 19th &#38; 20th June 2010, saw the first Science Hack Day at the Guardian offices in London. Jeremy Keith organised a venue, food and drink and sponsorship for around 100 people to spend two days building small science projects. Saturday morning saw a series of short talks to introduce the event,  give people [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend, 19th &amp; 20th June 2010, saw the first <a href="http://sciencehackday.com">Science Hack Day</a> at <a href="http://guardian.co.uk">the Guardian</a> offices in London. <a href="http://adactio.com">Jeremy Keith</a> organised <a href="http://adactio.com/journal/1674/">a venue, food and drink and sponsorship</a> for around 100 people to spend two days building small science projects. Saturday morning saw a series of short talks to introduce the event,  give people some ideas of what they might make, and what tools were available to help them make it. 24 hours of hacking and building followed, with presentations and prizes for the best hacks on Sunday afternoon. Ed Gomez has a great <a href="http://lcogt.net/en/blog/egomez/science-hack-day">write-up of the hack day</a> itself, and the winning hacks. My personal favourites were the Aurorascope, which shows auroral activity by lighting up LEDs inside a ball representing the Earth, and <a href="http://randomorbit.net">Random Orbit</a>, a RESTful service to track satellites in real time.</p>
<p>I was asked by Jeremy to give one of the talks at the beginning of the hack day, so I chatted a bit about the work we&#8217;ve done with <a href="http://astrometry.net">astrometry.net</a> to tag Flickr photos with their celestial locations — astrotagging.</p>
<h3><span id="more-631"></span>Introducing astrotags</h3>
<p>At the <a href="http://www.nmm.ac.uk/places/royal-observatory/">Royal Observatory, Greenwich</a>, we&#8217;ve set up a Flickr group for our photography competition, <a href="http://flickr.com/groups/astrophoto">Astronomy Photographer of the Year</a>. Photos in the group are being scanned by the <a href="http://http://www.nmm.ac.uk/visit/exhibitions/astronomy-photographer-of-the-year/astro-robot/">astrometry.net bot</a>, which identifies stars in a photo then solves for celestial coordinates by comparison with a reference catalogue. Astrometry.net leaves a comment on each photo, listing the coordinates of the image and the names of objects within the field of view. The comments are relatively easy to parse, and I&#8217;ve written a <a href="/archives/2010/01/generating-astrotags-for-flickr-photos.html">small utility</a> to extract information from commented photos. However, this is the sort of problem that&#8217;s ideally suited to <a href="http://www.flickr.com/groups/api/discuss/72157594497877875/">machine tags</a> so we asked astrometry.net to add tags to photos in our group using the astro: prefix. The tags are:</p>
<dl>
<dt>astro:RA</dt>
<dd>Right Ascension of the centre of the photo.</dd>
<dt>astro:dec</dt>
<dd>Declination of the centre of the photo.</dd>
<dt>astro:orientation</dt>
<dd>Orientation of the photo from North, in degrees.</dd>
<dt>astro:fieldsize</dt>
<dd>Angular extent of the photo, East-West × North-South.</dd>
<dt>astro:name</dt>
<dd>Named objects in the field. One tag per name.</dd>
</dl>
<p>Some good examples of tagged photos are:</p>
<ul>
<li><a href="http://www.flickr.com/photos/36418300@N02/3362016992/">Horsehead Nebula</a></li>
<li><a href="http://www.flickr.com/photos/strongman/3476473934/">Eta Carina Nebula</a></li>
<li><a href="http://www.flickr.com/photos/31557673@N05/2955988513/">Summer Triangle and Milky Way</a></li>
</ul>
<p>The simplest way to get at these machine tags and use them in your own applications is with <a href="http://developer.yahoo.com/yql/">YQL</a>, which allows you to query the flickr search and photo info APIs using a simple, SQL-like syntax. To make life easier, I&#8217;ve written a <a href="http://developer.yahoo.com/yql/guide/yql-opentables-chapter.html">YQL open table</a>, <a href="http://github.com/yql/yql-tables/blob/master/flickr/flickr.photos.astro.xml">flickr.photos.astro</a>, which can be queried to return a feed of astronomical coordinates and info for a set of Flickr photos.</p>
<pre class="brush: sql;">select * from flickr.photos.astro where astro_name = 'Horsehead Nebula'</pre>
<p>That query, for example, returns <a href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20flickr.photos.astro%20where%20astro_name%3D'Horsehead%20Nebula'&amp;diagnostics=true&amp;env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys">a feed of photos tagged astro:name=&#8217;Horsehead Nebula&#8217;</a>. For some other examples, have a look at my post on <a href="/archives/2009/12/searching-astroname-with-yql.html">searching astro:name with YQL</a>.</p>
<h3>My hack</h3>
<p>Astrometry.net have <a href="http://www.flickr.com/photos/tags/Astrometrydotnet%3Astatus%3Dsolved/">solved almost 7,000 photos</a> on Flickr, but only <a href="http://www.flickr.com/photos/tags/astro:ra=">around 600 of those</a> have been tagged with astro: machine tags. For my hack, I decided to try making a YQL table based on screen-scraping Flickr for information left by the astrometry.net robot. I took the code from my <a href="/testapps/yql/astrotagger.html">astrotagging web form</a> and put together <a href="http://github.com/eatyourgreens/yql-tables/blob/master/flickr/flickr.photos.astrometry.xml">flickr.photos.astrometry</a>, a YQL open table that can parse astrometry information from Flickr comments. The input parameter is a Flickr photo page URL, so a query looks like</p>
<pre class="brush: sql;">select * from flickr.photos.astrometry where url = 'http://www.flickr.com/photos/dangerous_astro/4722913544/'</pre>
<p>This returns <a href="http://query.yahooapis.com/v1/public/yql?q=use%20%27http%3A%2F%2Fgithub.com%2Featyourgreens%2Fyql-tables%2Fraw%2Fmaster%2Fflickr%2Fflickr.photos.astrometry.xml%27%3B%20select%20*%20from%20flickr.photos.astrometry%20where%20url%20%3D%20%27http://www.flickr.com/photos/dangerous_astro/4722913544/%27&amp;diagnostics=true">a feed of the coordinates and names</a> found on that page.</p>
<p>To demo this, I hacked together a little javascript <a href="http://eatyourgreens.org.uk/yql/scihackday.html?text=rosette+nebula">astronomy photo search engine</a>. You pass in a search query in the URL:</p>
<p><a href="http://eatyourgreens.org.uk/yql/scihackday.html?text=milky+way">http://eatyourgreens.org.uk/yql/scihackday.html?text=milky+way</a></p>
<p>That text is then used to run a Flickr search and grab up to 30 photos, shown as thumbnails. The search is limited to photos which have been solved by astrometry.net, and we also request the photographer&#8217;s name so that we can credit them:</p>
<pre class="brush: sql;">select * from flickr.photos.search(30) where text = 'milky way' and extras='owner_name' and machine_tags = 'Astrometrydotnet:status=solved'</pre>
<p>If you don&#8217;t pass in a search query, we instead return the 30 most recent photos solved by astrometry.net.</p>
<pre class="brush: sql;">select * from flickr.photos.search(30) where extras='owner_name' and machine_tags = 'Astrometrydotnet:status=solved'</pre>
<p>When you select a thumbnail, by clicking on it, another YQL query is run against flickr.photos.astrometry to return the coordinates and names for that photo. The coordinates are used to plot the photo on a map of the sky, while the names are listed as links so that you can go on to search for pictures of specific objects in the field of view.</p>
<p>It&#8217;s quite a simple little bit of code, but hopefully it shows how useful YQL can be for accessing structured data on the web, even when that data is in HTML or plain text. If anyone does use it to build anything, Astronomy Photographer of the Year has <a href="http://www.nmm.ac.uk/visit/exhibitions/astronomy-photographer-of-the-year/showcase/">a showcase page</a> for mashups built using the Flickr astrometry data.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2010/06/get-excited-and-make-things-with-science.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solving a browser bug with invalid HTML</title>
		<link>http://eatyourgreens.org.uk/archives/2010/02/solving-a-browser-bug-with-invalid-html.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2010/02/solving-a-browser-bug-with-invalid-html.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 22:26:53 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[geekage]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=624</guid>
		<description><![CDATA[Recently, I&#8217;ve been involved in building Solar Stormwatch, a citizen science project which asks people to look for Coronal Mass Ejections by watching videos of data recorded by the wide-field cameras on the STEREO spacecraft. We ask people a series of questions about each video and record their answers. The answers they submit then determine [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve been involved in building <a href="http://solarstormwatch.com">Solar Stormwatch</a>, a <a href="http://citizensciencealliance.org/">citizen science</a> project which asks people to look for <a rel="tag" href="http://en.wikipedia.org/wiki/Coronal_mass_ejection">Coronal Mass Ejections</a> by watching videos of data recorded by the wide-field cameras on the <a href="http://www.nasa.gov/mission_pages/stereo/main/index.html">STEREO spacecraft</a>. We ask people a series of questions about each video and record their answers. The answers they submit then determine subsequent questions that they&#8217;ll be asked. Answers are tracked in the underlying <abbr title="Application Programming Interface">API</abbr> by assigning each answer a numerical ID, so the markup for an answer looks something like this (using HTML buttons for each answer):<br />
<code>&lt;button value=&quot;2&quot;&gt;Ahead&lt;/button&gt;</code></p>
<p>If the site user wants to pick the answer &#8216;Ahead&#8217; to a question, they click this button. With <a href="http://jquery.com">jQuery</a>, I get the value of the button (2) using <code>var answer_id = $(this).val()</code>. Users confirm their answer by pressing a &#8216;Next&#8217; button to move onto the next question:</p>
<p><code>&lt;button id=&quot;next&quot; value=&quot;&quot;&gt;Next&lt;/button&gt;</code></p>
<p>I decided to use the &#8216;Next&#8217; button to store the currently selected answer: <code>$('#next').val(answer_id)</code>. I can then look at the value of the &#8216;Next&#8217; button to decide which question to ask next when they submit an answer. All fairly straightforward HTML and JavaScript, which works in any standards-compliant web browser.</p>
<p>However, after launching the site we started to get strange bug reports on <a href="http://www.galaxyzooforum.org/index.php?board=32.0">the Solar Stormwatch forum</a>. Buttons were displaying numbers instead of words as their labels. Questions were repeating rather than moving onto the next question for a given answer. It turns out there is a bug in IE6 and IE7, which was being picked up by our users &mdash; IE6 and IE7 do not support the <code>value</code> attribute on buttons.</p>
<p>In IE6 and IE7, calling <code>$(this).val()</code> returns the text of a button &mdash; &#8216;Ahead&#8217; in the example given above. Similarly, setting <code>.val()</code> for a button sets the button text, not its value. My first reaction was to change my jQuery code to use <code>.attr('value')</code> to access the <code>value</code> attribute instead. This runs into exactly the same underlying browser bug &mdash; <code>.attr('value')</code> gets and sets the button text in IE6 and 7.</p>
<p>To solve this, and get the questions working in IE, I ended up changing the <code>value</code> attribute on buttons to <code>data-value</code>. This is invalid in HTML 4, though it will be valid in HTML 5.</p>
<pre>
<code>&lt;button data-value=&quot;2&quot;&gt;Ahead&lt;/button&gt;</code>
</pre>
<p>This works, however, because the default behaviour of HTML parsers in all the major browsers is the same when they encounter an attribute they don&#8217;t understand. They simply add it to the <abbr title="Document Object Model">DOM</abbr> as a property of the current node ie. you get something like <code>button.data-value=2</code>. So, wherever I had used <code>.val()</code> in my jQuery code, I now use <code>.attr('data-value')</code> to get and set the value of buttons.</p>
<p>I&#8217;m not hugely happy with this solution. It&#8217;s invalid HTML and relies on default error-handling behaviour in HTML parsers. It does work cross-browser, and it is robust in that HTML parsers aren&#8217;t likely to change the way they handle unrecognised attributes. I wish Internet Explorer supported the standards-compliant, valid solution though.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2010/02/solving-a-browser-bug-with-invalid-html.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jack Pickard &#8211; a thoroughly decent chap</title>
		<link>http://eatyourgreens.org.uk/archives/2010/01/jack-pickard-a-thoroughly-decent-chap.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2010/01/jack-pickard-a-thoroughly-decent-chap.html#comments</comments>
		<pubDate>Wed, 20 Jan 2010 19:14:57 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[friends]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=622</guid>
		<description><![CDATA[About five years ago, I joined accessifyforum, after attending a Carson workshop on web accessibility. I think Jack Pickard was one of the first people I met on the forum, as he made a point of saying hello to new members. A couple of years later, I had the privilege of meeting him at @media [...]]]></description>
			<content:encoded><![CDATA[<p>About five years ago, I joined <a href="http://accessifyforum.com">accessifyforum</a>, after attending a Carson workshop on web accessibility. I think Jack Pickard was one of the first people I met on the forum, as he made a point of saying hello to new members. A couple of years later, I had the privilege of meeting him at <a href="http://www.flickr.com/photos/redux/172187530/">@media 2006</a>. He was a top bloke &#8211; friendly, extremely knowledgable about the web, always quick to help with answers to questions or step in to calm down arguments. Over time, I stopped visiting the forum, preferring to use <a href="http://twitter.com">twitter</a> for quick questions about web development. <a href="http://twitter.com/thepickards">@thepickards</a> was one account I made sure of following, though, for banter about web standards, Newcastle United, beer and jokes. Only this time last week, Jack was telling me <a href="http://twitter.com/ThePickards/status/7717667128">how to pronounce Uranus</a>.</p>
<p>I was stunned to hear that Jack died last Saturday night. The comments on <a href="http://www.thepickards.co.uk/index.php/201001/football-gossip-if-in-doubt-make-something-up/">his last blog post</a>, <a href="http://www.accessifyforum.com/viewtopic.php?t=15664">accessifyforum</a>, and the reaction on twitter and facebook are a testament to the respect with which Jack was held online. As <a href="http://www.pixeldiva.co.uk/remembers/jack-pickard/">pixeldiva says</a>, his loss is a tragedy for his wife, his children and family and the wider web accessiblity community.</p>
<p>I used to swap Monty Python jokes with Jack online, so I&#8217;m going to end with a clip from <cite>The Life of Brian</cite>. I think Jack would have agreed with the sentiment.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/1loyjm4SOa0&#038;hl=en_GB&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/1loyjm4SOa0&#038;hl=en_GB&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2010/01/jack-pickard-a-thoroughly-decent-chap.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Azeri bloggers appeal hearing today</title>
		<link>http://eatyourgreens.org.uk/archives/2010/01/azeri-bloggers-appeal-hearing-today.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2010/01/azeri-bloggers-appeal-hearing-today.html#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:21:16 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[amnesty]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=557</guid>
		<description><![CDATA[Update: The hearing for Emin Abdullayev and Adnan Hajizade has been put back to 8 January 2010. Please continue to send letters on their behalf. A new urgent action, and update, from Amnesty International on the case of the jailed Azeri bloggers. Two jailed male Azerbaijani youth activists and bloggers will have their appeal heard [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> The hearing for Emin Abdullayev and Adnan Hajizade has been put back to 8 January 2010. Please continue to send letters on their behalf.</p>
<p>A new urgent action, and update, from <a href="http://amnesty.org.uk">Amnesty International</a> on the case of the <a href="http://eatyourgreens.org.uk/archives/2009/11/azerbaijani-bloggers-imprisoned-after-unfair-trial.html">jailed Azeri bloggers</a>.</p>


<blockquote>
<p>Two jailed male Azerbaijani youth activists and bloggers will have their appeal heard in the capital, Baku, on 22 December. Emin Abdullayev and Adnan Hajizade were imprisoned on charges Amnesty International believes to have been fabricated.</p>
<p>The two youth activists and bloggers were arrested on charges of &#8220;hooliganism&#8221; on 8 July, after reporting to police that they had been assaulted in a restaurant in Baku. Their arrest came just over a week after Adnan Hajizade posted a video critical of the Azerbaijani government on the video-sharing website YouTube. On 11 November, Adnan Hajizade was sentenced to two years, and Emin Abdullayev to two and a half years, after being convicted in an unfair trial.</p>
<p>On 23 November, Emin Abdullayev and Adnan Hajizade&#8217;s lawyers filed an appeal against the verdict. On 10 December the lawyers informed Amnesty International that the two youth activists and bloggers had been granted a hearing at the Baku Court of Appeal on 22 December.</p>
<p><strong>Please write immediately</strong> in English, Azeri, or your own language:</p>
<ul>
	<li>Urging the authorities to ensure that Adnan Hajizade and Emin Abdullayev receive a fair appeal hearing in line with international fair trial standards;</li>
	<li>Noting that Amnesty International believes them to be prisoners of conscience, detained solely for the peaceful exercise of their right to freedom of expression and association, and is calling for their immediate and unconditional release.</li>
</ul></blockquote>


<p>I have prepared updated letters to the <a href="http://eatyourgreens.org.uk/amnesty/letters/2009-11/UA308-1.doc">Minister of Justice</a>, <a href="http://eatyourgreens.org.uk/amnesty/letters/2009-11/UA308-2.doc">the Ombudsperson</a> and <a href="http://eatyourgreens.org.uk/amnesty/letters/2009-11/UA308-3.doc">the Azerbaijan Embassy in London</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2010/01/azeri-bloggers-appeal-hearing-today.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Generating astrotags for Flickr photos</title>
		<link>http://eatyourgreens.org.uk/archives/2010/01/generating-astrotags-for-flickr-photos.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2010/01/generating-astrotags-for-flickr-photos.html#comments</comments>
		<pubDate>Sun, 03 Jan 2010 12:46:06 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[geekage]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=603</guid>
		<description><![CDATA[In December, I talked at London Web Standards about tagging astronomy photos with position and name information. I mentioned that around 400 photos have been tagged already on Flickr but this is only a tiny fraction of the 4,900 photos that have been solved by astrometry.net. It would be great if the remaining 4,500 photos [...]]]></description>
			<content:encoded><![CDATA[<p>In December, I talked at <a href="http://londonwebstandards.org/">London Web Standards </a>about <a href="http://eatyourgreens.org.uk/archives/2009/12/london-web-standards-introducing-astrotags.html">tagging astronomy photos with position and name information</a>. I mentioned that <a href="http://www.flickr.com/photos/tags/astro:ra=">around 400 photos</a> have been tagged already on Flickr but this is only a tiny fraction of the 4,900 photos that have been <a href="http://www.flickr.com/photos/tags/Astrometrydotnet%3Astatus%3Dsolved/">solved by astrometry.net</a>. It would be great if the remaining 4,500 photos could also be tagged, and it ought to be straightforward to generate tags for those photos too. Inspired by the <a href="http://inaturalist.org/taxa/flickr_tagger?taxon_id=4981">iNaturalist Taxonomic Tagging Tool</a>, I&#8217;ve written a little <a href="http://eatyourgreens.org.uk/testapps/yql/astrotagger.html">astrotagging form for Flickr photos</a>.</p>
<p>When the <a href="http://astrometry.net">astrometry.net</a> robot solves a photo on Flickr, it leaves a comment identifying the coordinates of the photo and listing the names of objects in the field.</p>
<blockquote cite="http://www.flickr.com/photos/eatyourgreens/4182924966/comment72157623004301204/">
  <p>Hello, this is the blind astrometry solver.
  Your results are:<br/>
   (RA, Dec) center:(82.4668973542,
  6.33857270637) degrees<br/>
  (RA, Dec) center (H:M:S,
  D:M:S):(05:29:52.055, +6:20:18.862)<br/>
  Orientation:161.45 deg E of N<br/>
  <br/>
  Pixel scale:67.93 arcsec/pixel<br/>
  <br/>
  Parity:Reverse (&#8220;Left-handed&#8221;)<br/>
  Field size :53.14 x 39.85 degrees<br/>
  <br/>
  Your field contains:<br/>
  The star Rigel (&beta;Ori)<br/>
  The star Betelgeuse (&alpha;Ori)<br/>
  The star Aldebaran (&alpha;Tau)<br/>
  The star Bellatrix (&gamma;Ori)<br/>
  The star Alnilam (&epsilon;Ori)<br/>
  The star Alhena (&gamma;Gem)<br/>
  The star Alnitak (&zeta;Ori)<br/>
  The star Saiph (&kappa;Ori)<br/>
  The star Mintaka (&delta;Ori)<br/>
  The star Cursa (&beta;Eri)<br/>
  IC 2118 / IC 2118 / Witch Head nebula<br/>
  NGC 1976 / NGC 1976 / Great Nebula in Orion
  / M 42<br/>
  NGC 1990 / NGC 1990<br/>
  IC 434 / IC 434 / Horsehead nebula<br/>
  IC 443 / IC 443<br/>
  NGC 2264 / NGC 2264 / Christmas Tree cluster
  / Cone nebula<br/>
  <br/>
  <a rel="nofollow" href="http://www.worldwidetelescope.org/wwtweb/ShowImage.aspx?reverseparity=False&amp;scale=67.93&amp;name=Orion,+Taurus+and+Gemini&amp;imageurl=http://farm3.static.flickr.com/2689/4182924966_9a291b6c39_o.jpg&amp;credits=Jim+O'Donnell+(Attribution-NonCommercial-ShareAlike+License)&amp;creditsUrl=http://creativecommons.org/licenses/by-nc-sa/2.0/&amp;ra=82.4668973542&amp;y=1056&amp;x=1408&amp;rotation=161.45&amp;dec=6.33857270637&amp;thumb=http://farm3.static.flickr.com/2689/4182924966_89b3009869_t.jpg">View in World Wide Telescope</a><br/>
  <br/>
  &#8212;&#8211;<br/>
  If you would like to have other images
  solved, please submit them to the <a href="http://www.flickr.com/groups/astrometry">astrometry group</a>.
  																<br/>

  								<small>
  									Posted 3 weeks ago.
  									( <a class="Plain" href="/photos/eatyourgreens/4182924966/comment72157623004301204/">permalink</a>
  														| <a class="Plain" href="/photos/eatyourgreens/4182924966/deletecomment72157623004301204/">delete</a>
  																)
  								</small>
  								</p>
</blockquote>
<p>These comments are always in the same format, so it&#8217;s straightforward to parse them and extract the astrometry metadata as a list of tags. I&#8217;ve written a small form which does this, using <abbr title="Yahoo! Query Language">YQL</abbr> to grab the comments from a Flickr photo then parsing them using standard <abbr title="Document Object Model">DOM</abbr> traversal and manipulation methods.</p>
<p>If you have a photo which has been solved, generating tags is straightforward. Copy the address of a Flickr photo page into the <a href="http://eatyourgreens.org.uk/testapps/yql/astrotagger.html">tagging form</a> and press the big blue &#8216;Get astrotags&#8217; button. The script should find the comment from astrometry.net and print out the tags for celestial coordinates and names, which you can then paste into the &#8216;Add a tag&#8217; form on Flickr.</p>
<p>The code to do this is fairly simple, and reproduced below. After initialising the page, we can take advantage of YQL&#8217;s HTML parser to fetch all of the comments for a Flickr photo page by selecting all paragraphs inside divs with a class of &#8216;comment-content&#8217; at that URL.</p>
<pre class="brush: sql;">
select * from html where url='http://www.flickr.com/photos/eatyourgreens/4182924966/' and xpath='//div[@class=&quot;comment-content&quot;]/p'
</pre>
<p>We then loop through the results of this query, looking for paragraphs which contain the text &#8216;blind astrometry solver&#8217;. If we have a match, we add this paragraph to the DOM so we can parse it with standard DOM methods. The code then loops through the child nodes of the comment paragraph, running regular expression matches against any text nodes it finds to extract the coordinates of the photo. </p>
<p>Names are slightly more tricky. For those, we grab every line of text between &#8216;Your field contains:&#8217; and the line &#8216;&#8212;&#8211;&#8217; above the signature, strip out whitespace, split each line on &#8216;/&#8217; to get individual names and store these in an associative array, keyed on name to remove duplicates. That done, we can then just loop through the arrays of coordinates and names and print them out.</p>
<p>Here&#8217;s the full code:</p>
<pre class="brush: jscript;">
 var url = &quot;http://www.flickr.com/photos/skiwalker79/4174398309&quot;;
 var comment_holder;
 var position_output;
 var names_output;
 
 function init() {
   var url_input = document.getElementById('photoURL');
   var url_button = document.getElementById('updateURL');
   
   comment_holder = document.getElementById('comment');
   position_output = document.getElementById('position');
   names_output = document.getElementById('names');
   
   url_input.disabled = false;
   url_input.value = url;
   url_button.disabled = false;
   position_output.disabled = false;
   names_output.disabled = false;
   
   addEvent(url_button, 'click', function(e) {
     getFlickrPhotoComments(url_input.value);
     return false;
   });
   addEvent(url_input, 'focus', function(e) {
     url_input.select();
   });
   addEvent(position_output, 'focus', function(e) {
     position_output.select();
   });
   addEvent(names_output, 'focus', function(e) {
     names_output.select();
   });
   
   // Mark up nodes which this script updates as
   // ARIA live regions.
   comment_holder.setAttribute('aria-live', 'polite');
   position_output.setAttribute('aria-live', 'polite');
   names_output.setAttribute('aria-live', 'polite');
   
   getFlickrPhotoComments(url);    
 }

 function getFlickrPhotoComments(url) {

   // YQL query to get all comments from a Flickr photo page.
   var yql = &quot;select * from html where url='&quot;+url+&quot;' and xpath='//div[@class=\&quot;comment-content\&quot;]/p'&quot;;
   var yql_url = 'http://query.yahooapis.com/v1/public/yql?q='+escape(yql)+'&amp;format=xml&amp;callback=getAstrometryComment&amp;diagnostics=false';
   position_output.value = '';
   names_output.value = '';
   comment_holder.innerHTML = 'Looking up '+url;
   makeYQLRequest(yql_url);
 }
 
 function makeYQLRequest(yql_url) {
   var script=document.getElementById('yqlscript');
   var newscript=document.createElement('script');
   newscript.type = 'text/javascript';
   newscript.src=yql_url;
   newscript.id='yqlscript';
   document.getElementsByTagName(&quot;body&quot;)[0].removeChild(script);
   document.getElementsByTagName(&quot;body&quot;)[0].appendChild(newscript);
 }

function getAstrometryComment(data) {
  var results = data.results;
  
  var comment = 'Sorry, that photo has not been solved by &lt;a href=&quot;http://astrometry.net&quot;&gt;astrometry.net&lt;/a&gt;.';
  for (var i in results) {
    var text = results[i];
    // Comments left by the solver contain the text 'blind astrometry solver'.
    if(text.match(/blind astrometry solver/gi)) {
      comment = text;
    }
  }
  parseComment(comment);
  
}

function parseComment(comment) {
  var astro = {};
  var names = {};
  var parsing_names = false;
  
  comment_holder.innerHTML = comment;
  var children = comment_holder.firstChild.childNodes;
  
  for (var i in children) {
    var child = children[i];
    var text = '';
    text = child.data;
    
    if (text) {
      if (text.match(/(RA, Dec)/g) &amp;&amp; text.match(/degrees/g)) {
        text=text.match(/[-0-9\.]+/g);
        astro.RA = text[0];
        astro.Dec = text[1];
      } else if (text.match(/Orientation/g)) {
        text = text.match(/[-0-9\.]+/g);
        astro.orientation = text[0];
      } else if (text.match(/Pixel scale/g)) {
        text = text.match(/[0-9\.]+/g);
        astro.pixelScale = text[0];
      } else if(text.match(/Field size/g)) {
        text = text.match(/[0-9\.]+ x [0-9\.]+ (degrees|arcminutes|arcseconds)/g);
        astro.fieldsize = text[0];
      } else if(text.match(/Your field contains:/g)) {
        parsing_names = true;
      } else if (text.match(/-----/g)) {
        parsing_names = false;
      }

      if (parsing_names) {
        names = addNames(names, text);
      }
      
    }
  }

  renderPositionTags(astro);
  
  renderNameTags(names);
  
  if (astro.RA) {
    position_output.focus();
  }
}

function addNames(names, text) {
  
 text = trim(text);
 text = text.split('/');
 for (var j in text) {
   var name = text[j];
   name = trim(name);
   if (name &amp;&amp; name !='Your field contains:'){
     names[name] = name;
   }
 }
 return names;
}

function renderPositionTags(astro) {
  
  position_output.value = '';
   for (var tag in astro) {
     position_output.value += 'astro:'+tag+'=&quot;'+astro[tag]+'&quot; ';
   } 
}

function renderNameTags(names) {

  names_output.value = '';
   for (var name in names) {
     names_output.value += 'astro:name=&quot;'+name+'&quot; '
   }
}

function trim(text) {
  // Trim leading and trailing whitespace from a string.
  text = text.replace(/^\s+/, '');
  text = text.replace(/\s+$/,'');
  return text;
}

function addEvent(obj, evType, fn) {
  if (obj.addEventListener) {
    obj.addEventListener(evType, fn, false);
    return true;
  } else if (obj.attachEvent) {
    var r = obj.attachEvent(&quot;on&quot; + evType, fn);
    return r;
  } else {
    return false;
  }
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2010/01/generating-astrotags-for-flickr-photos.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Searching astro:name with YQL</title>
		<link>http://eatyourgreens.org.uk/archives/2009/12/searching-astroname-with-yql.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2009/12/searching-astroname-with-yql.html#comments</comments>
		<pubDate>Sat, 19 Dec 2009 22:59:53 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[geekage]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/archives/2009/12/searching-astroname-with-yql.html</guid>
		<description><![CDATA[Searching astro:name with YQL, originally uploaded by Eat your greens!. The YQL team announced personal URLs for queries this week. I&#8217;ve used the new feature to set up a shortcut for looking up photos of astronomical objects by name. The URL is: http://queries.yahooapis.com/v1/public/yql/eatyourgreens/astrolookup?name=M+42 You can set the name parameter in the URL to change the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="photo sharing" href="http://www.flickr.com/photos/eatyourgreens/4198668956/"><img style="border: solid 2px #000000;" src="http://farm3.static.flickr.com/2797/4198668956_e6490091f7.jpg" alt="" /></a></p>
<p style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/eatyourgreens/4198668956/">Searching astro:name with YQL</a>, originally uploaded by <a href="http://www.flickr.com/people/eatyourgreens/">Eat your greens!</a>.</p>
<p>The <abbr title="Yahoo! Query Language">YQL</abbr> team announced <a href="http://developer.yahoo.net/blog/archives/2009/12/yql_gets_personal_urls_and_more_cache_control.html">personal URLs for queries</a> this week. I&#8217;ve used the new feature to set up a shortcut for looking up photos of astronomical objects by name. The URL is:</p>
<p><a href="http://queries.yahooapis.com/v1/public/yql/eatyourgreens/astrolookup?name=M+42">http://queries.yahooapis.com/v1/public/yql/eatyourgreens/astrolookup?name=M+42</a></p>
<p>You can set the <code>name</code> parameter in the URL to change the name of the object you are looking for. I&#8217;ve also set up <a href="http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=Horsehead+nebula">a demo page</a> to render results from this query. The URL is:</p>
<p><a href="http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=Horsehead+nebula">http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=Horsehead+nebula</a></p>
<p>Again, change the <code>name</code> parameter in the URL to lookup different objects. Note that it looks for an exact match with the <code>astro:name</code> machine tag, so looking up stars is cumbersome:</p>
<p><a href="http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the%20star%20deneb%20%28%CE%B1cyg%29">http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the+star+deneb+(&alpha;cyg)</a></p>
<p><strong>Update:</strong> it seems Flickr&#8217;s machine tag search can match just the first part of a tag, so you can search for stars by supplying the first part of the tag&#8217;s value.</p>
<p><a href="http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the+star+deneb">http://eatyourgreens.org.uk/testapps/yql/astronamesearch.html?name=the+star+deneb</a></p>
<p>I&#8217;ve also made some changes to <a href="http://github.com/eatyourgreens/yql-tables/blob/master/flickr/flickr.photos.astro.xml"><code>flickr.photos.astro</code></a> in order to enable faster searching by name. Use <code>astro_name</code> in a query to find objects by matching on <code>astro:name</code>:</p>
<pre class="brush: sql;">
select * from flickr.photos.astro where astro_name = 'M 31'
</pre>
<p>or use <code>text</code> to run a Flickr text search across photo descriptions and titles:</p>
<pre class="brush: sql;">
select * from flickr.photos.astro where text = 'orion'
</pre>
<p>If you want to see what values have been used for <code>astro:name</code> on Flickr, I recommend <a href="http://husk.org/code/machine-tag-browser.html#tag=astro:name">Paul Mison&#8217;s excellent machine tag browser</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2009/12/searching-astroname-with-yql.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>London web standards: Introducing astrotags</title>
		<link>http://eatyourgreens.org.uk/archives/2009/12/london-web-standards-introducing-astrotags.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2009/12/london-web-standards-introducing-astrotags.html#comments</comments>
		<pubDate>Tue, 15 Dec 2009 00:18:37 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[geekage]]></category>
		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=530</guid>
		<description><![CDATA[Here are the slides from my talk at the December LWS meetup &#8211; Introducing astrotags: astrometry, machine tags and YQL (20MB pdf). The examples and demos should all be in the YQL category on this blog. If you&#8217;re interested in the nuts and bolts of the automated astrometry robot, I recommend having a look at [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the slides from my talk at the December LWS meetup &#8211; <a href="/pdf/astrotags.pdf">Introducing astrotags: astrometry, machine tags and YQL</a>  (20MB pdf). The examples and demos should all be in the <a href="/category/yql">YQL category</a> on this blog.</p>
<p>If you&#8217;re interested in the nuts and bolts of the automated astrometry robot, I recommend having a look at <a href="http://astrometry.net">astrometry.net</a> and reading <a href="http://cosmo.nyu.edu/hogg/research/2006/09/28/astrometry_google.pdf">Making the sky searchable: Fast geometric hashing for automated astrometry</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2009/12/london-web-standards-introducing-astrotags.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is it about elephants?</title>
		<link>http://eatyourgreens.org.uk/archives/2009/11/is-it-about-elephants.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2009/11/is-it-about-elephants.html#comments</comments>
		<pubDate>Mon, 30 Nov 2009 18:27:20 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[geekage]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=527</guid>
		<description><![CDATA[I found my copy of Ghastly Beyond Belief, Neil Gaiman and Kim Newman&#8217;s wonderful collection of quotations from science fiction and fantasy. Page 164 has this excellent exchange between Michael Moorcock and Thomas Disch. Tom Disch: I&#8217;m writing a book about what everyone wants most. Moorcock: Really? Is it about elephants? Disch: Elephants? No, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I found my copy of <a href="http://www.fantasticfiction.co.uk/g/neil-gaiman/ghastly-beyond-belief.htm">Ghastly Beyond Belief</a>, <a href="http://www.neilgaiman.com">Neil Gaiman</a> and <a href="http://www.johnnyalucard.com/">Kim Newman&#8217;s</a> wonderful collection of quotations from science fiction and fantasy. Page 164 has this excellent exchange between Michael Moorcock and Thomas Disch.</p>
<blockquote><p>
<cite>Tom Disch</cite>: I&#8217;m writing a book about what everyone wants most.</p>
<p><cite>Moorcock</cite>: Really? Is it about elephants?</p>
<p><cite>Disch</cite>: Elephants? No, it&#8217;s about becoming more intelligent.</p>
<p><cite>Moorcock</cite>: Oh, what I&#8217;ve always wanted most is to be an elephant.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2009/11/is-it-about-elephants.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azerbaijani bloggers imprisoned after unfair trial</title>
		<link>http://eatyourgreens.org.uk/archives/2009/11/azerbaijani-bloggers-imprisoned-after-unfair-trial.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2009/11/azerbaijani-bloggers-imprisoned-after-unfair-trial.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 22:34:00 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[amnesty]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/?p=521</guid>
		<description><![CDATA[From Amnesty International on 18 November 2009: Azerbaijani youth activists and bloggers Emin Abdullayev (aged 30) and Adnan Hajizade (aged 26) have been sentenced to two and a half years and two years respectively in an unfair trial. Amnesty International believes the charges against them were fabricated and they have been imprisoned solely for exercising [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.amnesty.org.uk">Amnesty International</a> on 18 November 2009:</p>
<blockquote><p>Azerbaijani youth activists and bloggers Emin Abdullayev (aged 30) and Adnan Hajizade (aged 26) have been sentenced to two and a half years and two years respectively in an unfair trial. Amnesty International believes the charges against them were fabricated and they have been imprisoned solely for exercising their right to freedom of expression.</p>
<p>On 28 June, a satirical video made by Adnan Hajizade criticizing the Azerbaijani government was posted on the video-sharing website YouTube. On 8 July, Adnan Hajizade and Emin Abdullayev (who blogs under the name Emin Milli) were approached by two men as they were dining with friends in a restaurant in the capital Baku. The men demanded to know what they were talking about. When Emin Abdullayev replied that it did not concern the two men, one of the men head-butted him and he fell to the floor. The same man then struck Adnan Hajizade, knocking him to the ground, and continued to kick and beat Adnan Hajizade and Emin Abdullayev until restaurant staff intervened.</p>
<p>Adnan Hajizade and Emin Abdullayev immediately went to a local police station to report the incident. However, police officers interrogated them as suspects for five hours, denying them access to a lawyer of their choosing and arrested them on charges of ‘hooliganism’. The activists were remanded in custody pending their trial. They were later also charged with inflicting minor bodily harm.</p>
<p>During their investigation the police and prosecutors failed to interview witnesses and to obtain video evidence from a security camera which may have recorded the incident in the restaurant. They also submitted documents to the court which wrongly stated that Adnan Hajizade was unemployed and that he had a criminal record. According to the activist’s lawyers, at the trial the court refused to consider photographs showing the injuries they sustained in the attack, as well as video evidence from mobile phones and the security camera, but provided no explanation as to why. The two men were convicted and sentenced to two and a half and two years respectively in prison. Emin Abdullayev and Adnan Hajizade intend to appeal against the decision.</p></blockquote>
<p>There is a letter calling for the release of Emin and Adnan, which you can send to <a href="/amnesty/letters/2009-11/UA308.doc">President Aliyev</a>, <a href="/amnesty/letters/2009-11/UA308-1.doc">the Minister of Justice</a>, <a href="/amnesty/letters/2009-11/UA308-2.doc">the Ombudsperson</a> and <a href="/amnesty/letters/2009-11/UA308-3.doc">the Azerbaijani Ambassador in London</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2009/11/azerbaijani-bloggers-imprisoned-after-unfair-trial.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>£3736.56</title>
		<link>http://eatyourgreens.org.uk/archives/2009/11/3736-56.html</link>
		<comments>http://eatyourgreens.org.uk/archives/2009/11/3736-56.html#comments</comments>
		<pubDate>Mon, 16 Nov 2009 19:59:17 +0000</pubDate>
		<dc:creator>Jim O'Donnell</dc:creator>
				<category><![CDATA[amnesty]]></category>
		<category><![CDATA[book sale]]></category>

		<guid isPermaLink="false">http://eatyourgreens.org.uk/archives/2009/11/3736-56.html</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left; padding: 3px;">
<a href="http://www.flickr.com/photos/eatyourgreens/4104005413/" title="photo sharing"><img src="http://farm3.static.flickr.com/2606/4104005413_ef6bc44769.jpg" style="border: solid 2px #000000;" alt="" /></a><br />
<br />
<span style="font-size: 0.8em; margin-top: 0px;"><a href="http://www.flickr.com/photos/eatyourgreens/4104005413/">Amnesty book sale 2009</a>, originally uploaded by <a href="http://www.flickr.com/people/eatyourgreens/">Eat your greens!</a>.</span>
</div>
<p>
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&#8217;re sorry that we haven&#8217;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.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatyourgreens.org.uk/archives/2009/11/3736-56.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
