Flickr as a database?

Nine Ladies stone circle, viewed from the King Stone

Nine Ladies stone circle, viewed from the King Stone

I went out on a photo trip yes­ter­day. I’ve been test­ing the iPhone app Geo­Lo­gTag recently. For some reason I simply can­not get my iPhone talk­ing to my Mac­Book, which makes a lot of the WiFi syncing apps a waste of time. Geo­Lo­gTag has an option to geotag pho­tos on Flickr. If you visit this photo’s page on Flickr and look at the data on the right side, you’ll see it was taken near Stan­ton in Peak and there’s a map so you can see other nearby pho­tos.

Once you’ve remembered to leave the phone on, which means can­cel­ling the auto-lock, which geo-logging, then tag­ging is pretty much pain­less. The phone keeps track of where it is at any given time. It con­nects to Flickr and any ungeot­agged pho­tos that were taken while the phone was log­ging get tagged. This works because the pho­tos have a record of the time they were taken. If you remem­ber to take your phone around with you when to take a shot, then you can have a reas­on­ably accur­ate log of where you are. At $5 it’s a lot more sane than buy­ing one of those ded­ic­ated photo-loggers you can buy. On the other hand you do have to have the phone to go with it.

Being able to log pho­tos quite accur­ately could well be very use­ful next time I go on a sur­vey. At the very least it could be a usable way of map­ping the loc­a­tion of many tombs, so long as the tombs are 10m or more apart. Upload­ing to Flickr to log them is a nuis­ance, I should sort out my home net­work, but it’s pos­sibly also an oppor­tun­ity thanks to the Flickr API. The API makes it very easy to get machine-readable data out of Flickr. Here’s an example.

Fire remains (distant) aligned with two megaliths at Nine Ladies.

Fire remains (dis­tant) aligned with two mega­liths at Nine Ladies.

This is a photo of an align­ment I saw at Nine Ladies. If you fol­low the line from fore­ground over the back stone and on, you might be able to see two black patches in the grass. These are the ash remains of fires which had been lit at the site. Burn­ing, even small fires, is not help­ful. The risk of rampant fire is slim because the grass is short and, because it’s in the UK, it’s nearly always damp. How­ever, at the very least it’ll cause a spike in any future mag­neto­metry sur­veys of the area. Also if there is some­thing bur­ied beneath the ground which hasn’t been found yet, heat­ing is a great way to des­troy it. So I now have some data which I might want to log in a database.

I can put some inform­a­tion about a site into Flickr tags. In this case it’s a Bronze Age stone circle on Stan­ton Moor with some dam­age. So long as I have a uni­form set of tags I use to describe that like “loc­a­tion: Stan­ton Moor” then I can use the API as a search engine. For example I could:

Search for any photos where tag == project: My Project

which would list all pho­tos in My Pro­ject.
It would be easier to be able to lift the data from Flickr and put it into a SQL data­base but that shouldn’t be dif­fi­cult with stand­ard tags. Here’s an example of what inform­a­tion Flickr has about the photo above.

<rsp stat="ok">
  <photo id="3890427837" secret="c89e5a1e94" server="3530" farm="4" dateuploaded="1252190752"
   isfavorite="0" license="5" rotation="0" originalsecret="3a9cc5e6bf" originalformat="jpg"
   media="photo">
    <owner nsid="79983635@N00" username="Alun Salt" realname="Alun Salt" location="Derby and 
     Leicester, UK"/>
    <title>Alignment at 9 Ladies.jpg</title>
    <description>
      Or, how not to photograph burning. If you follow the line from the foreground over the 
      back stone and beyond, you might be able to see two black patches in the grass.
      <a href="http://www.bighugelabs.com/onblack.php?id=3890427837&amp;size=large" rel="nofollow">
      A larger view might help.</a>

      Burning, even small fires, is not helpful. The risk of rampant fire is slim because the 
      grass is short and, because it's in the UK, it's nearly always damp. However, at the very 
      least it'll cause a spike in any future magnetometry surveys of the area. Also if there 
      is something buried beneath the ground which hasn't been found yet, heating is a great way
      to destroy it.

      I took the photo from this angle as there were some people behind me, which meant a HDR 
      shot from the opposite direction wasn't viable at the time. When I did set up some shots 
      from the other side I'd forgotten about getting the shot of the fires.
    </description>
    <visibility ispublic="1" isfriend="0" isfamily="0"/>
    <dates posted="1252190752" taken="2009-09-05 18:58:27" takengranularity="0" 
     lastupdate="1252239594"/>
    <editability cancomment="0" canaddmeta="0"/>
    <usage candownload="1" canblog="0" canprint="0"/>
    <comments>0</comments>
    <notes>
      <note id="72157622266401280" author="79983635@N00" authorname="Alun Salt" x="233"
       y="108" w="29" h="16">A patch from a small fire.</note>
      <note id="72157622141844777" author="79983635@N00" authorname="Alun Salt" x="238" 
       y="95" w="31" h="16">A patch from a larger fire.</note>
    </notes>
    <tags>
      <tag id="204526-3890427837-771" author="79983635@N00" raw="archaeology"
       machine_tag="0">archaeology</tag>
      <tag id="204526-3890427837-1520781" author="79983635@N00" raw="stanton moor"
       machine_tag="0">stantonmoor</tag>
      <tag id="204526-3890427837-98094" author="79983635@N00" raw="bronze age"
       machine_tag="0">bronzeage</tag>
      <tag id="204526-3890427837-110" author="79983635@N00" raw="UK" machine_tag="0">uk</tag>
      <tag id="204526-3890427837-5933" author="79983635@N00" raw="Derbyshire"
       machine_tag="0">derbyshire</tag>
      <tag id="204526-3890427837-778" author="79983635@N00" raw="megalithic"
       machine_tag="0">megalithic</tag>
      <tag id="204526-3890427837-38882" author="79983635@N00" raw="prehistoric"
       machine_tag="0">prehistoric</tag>
      <tag id="204526-3890427837-56210" author="79983635@N00" raw="HDR"
       machine_tag="0">hdr</tag>
      <tag id="204526-3890427837-45290559" author="79983635@N00" raw="project: test project"
       machine_tag="0">projecttestproject</tag>
      <tag id="204526-3890427837-45290561" author="79983635@N00" raw="location: Stanton Moor"
       machine_tag="0">locationstantonmoor</tag>
      <tag id="204526-3890427837-45290563" author="79983635@N00" raw="period: Bronze Age"
       machine_tag="0">periodbronzeage</tag>
      <tag id="204526-3890427837-45290565" author="79983635@N00" raw="type: stone circle"
       machine_tag="0">typestonecircle</tag>
      <tag id="204526-3890427837-45290567" author="79983635@N00" raw="damage: yes"
       machine_tag="0">damageyes</tag>
    </tags>
    <urls>
      <url type="photopage">http://www.flickr.com/photos/alun/3890427837/</url>
    </urls>
  </photo>
</rsp>

So with some fairly simple code I could get Flickr and the data­base to talk to each other.

GET all photos WHERE project == My Project
FOR EACH photo_id in the list of results
 { GET INFO for photo_id
   INSERT into database id = photo_id;
   READ latitude tag;
   INSERT into database latitude = latitude_tag;
   READ longitude tag;
   INSERT into database longitude = longitude;
   READ period tag;
   INSERT into database period = period_tag;
   READ location tag;
   INSERT into database location = location_tag;
   AND SO ON with the rest of the relevant tags;
  }

You could use the photo date tags to log when the site was vis­ited, the author tag to log who vis­ited it and so on. There are some poten­tial prob­lems. You can add tags to my pho­tos because I let any­one tag them. That could come back to bite me if someone decides it would be fun to add a period: Neo­lithic tag onto the photo. How­ever if you look at the tags in the data file it also notes who is author of those tags, so you can alter the search to reads TAGS where author == PERMITTED AUTHOR. The API also allow you to search groups, so a group of people could con­trib­ute to a pool of data if there were agreed tag­ging standards.

It’s also just occurred to me that if you made pro­ject tags in the format Pro­ject Iden­ti­fier : Tag : Con­tent like StonehengeSurvey:Location:In the pub, then the same pho­tos could be incor­por­ated into mul­tiple pro­jects, so there’s no need to have a uni­ver­sal defin­i­tion of terms like Early or Late.

Another thing I’d be wary of it mak­ing my data pub­lic as I cre­ate it. Some things I’m work­ing on are likely to be very simple. If I’m out in the field and you can read my data from your home you could be in a pos­i­tion to scoop me, even if you credit me as the source of data. One way round that is to upload pho­tos as private. Geo­Lo­gTag is happy work­ing with private pho­tos (I’ve tested it). A group work­ing together would have to make use of the con­tacts fea­ture in Flickr, pos­sibly accept­ing that for the pro­ject they’re all fam­ily so they share access to each other’s uploads.

Cer­tainly my future pro­jects are going to have a very large photo com­pon­ent to them. Geot­ag­ging is the hook which everything else can use­fully fit on to. What’ll be inter­est­ing to see is what effect this will have on GIS, if any­one can eas­ily pro­duce masses of geo­graph­ic­ally use­ful data.

Wiltshire and its 21st century SMR

Stonehenge, Facing the Midwinter Sunset

This is how Tom Gos­kar cas­u­ally tosses a cat amongst the pigeons…

If you’re inter­ested in the archae­ology of the county of Wilt­shire, you can now access the Wilt­shire Sites and Monu­ments Record (SMR) online, com­plete with a map interface.

The SMR is the archae­olo­gical record of a county and, as Tom points out, Wilt­shire is the county with Stone­henge in it.

Adding the map inter­face is one of these things which sounds simple, but which hardly any­body offers. I can find my house on a map, but I couldn’t tell you the OS grid ref­er­ence, nor parse grid ref­er­ences from loc­a­tions in the record to work out where they lie in rela­tion to me. It doesn’t add any new inform­a­tion to the SMR but chan­ging the inter­face makes it a lot more access­ible. If the SMR data­bases over all UK counties were opened up then this kind of approach would be a massive help for any­one who’s inter­ested in their local archae­ology rather than their local admin­is­trat­ive district.

If you don’t know the names of local vil­lages or par­ishes, or OS ref­er­ences, but are inter­ested in Stone­henge and its sur­round­ings, then Wilt­shire Council’s action is a import­ant as any major book the subject.

Unfor­tu­nately the map isn’t appear­ing for me. I don’t know if that’s my browser or the work on the council’s serv­ers caus­ing the prob­lem. Hope­fully you’ll have bet­ter luck. As you can see on Tom’s page, it cer­tainly worked for him.

Freedom is…

Baghdad Wall
Not Ber­lin. Photo (cc) this­chan­ginglife.

The Occu­pa­tion is finally bring­ing the peoples of Iraq together in peace. I’ve tagged a blog post in del.icio.us Bagh­dad res­id­ents protest US-erected divid­ing wall on Annot­ated Life which notes that Sun­nis and Shi’ites are hand in hand in oppos­i­tion to the con­struc­tion of the latest wall across the city. I briefly noted that in another con­text it could pass for an Iron Cur­tain. With a bit more though I think I was wrong. What has sur­prised me is after think­ing about it some more there may be a grim­mer his­tor­ical com­par­ison.
More

Archaeology through the Keyhole

Google have the magic touch. What other com­pany could say in their Terms and Con­di­tions that they reserve the right not to delete your per­sonal emails so they can build a bet­ter cus­tomer pro­file, and still have people queuing up for invites to the ser­vice? Like Microsoft and Yahoo! they’re col­lect­ing smal­ler tech­no­logy com­pan­ies but so far haven’t yet suffered a public-relations back­lash. Blog­ger woes may yet trig­ger one, but one pos­sible reason for their PR suc­cess is that when it comes to search they know what they’re doing. Key­hole, their most recent acquis­i­tion, is a case in point.
More