tag:blogger.com,1999:blog-20631199469979334312024-03-19T03:11:23.768+00:00Ed's BlogWhat I'm doing, where I've been, problems I have, problems I've solved.Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-2063119946997933431.post-34924195494097738932013-10-16T17:55:00.001+01:002013-10-16T17:55:58.781+01:00EXIF Custom: photo metadata import for Scratchpads and DrupalIn a recent paper I published (<a href="http://biodiversitydatajournal.com/articles.php?journal_id=1&id=973">EXIF Custom: Automatic image metadata extraction for Scratchpads and Drupal</a>) I described a Drupal module I have written that allows for the import of metadata embedded within images to Drupal fields. This, along with bulk image upload tools, allows for rapid publication of images.<br />
<br />
The introduction to the paper is reproduced here:<br />
<blockquote class="tr_bq">
"The use of embedded image metadata is becoming widespread in the biodiversity informatics community (e.g. Stafford et al. 2010 & Tulig et al. 2012),
and is frequently used to describe the subject and licencing of images
as well as for recording the 'tombstone metadata' (e.g. <a href="http://nsdl.niscair.res.in/bitstream/123456789/954/1/Introduction+to+Metadata.pdf" target="_blank">Introduction to Metadata</a>) - when the image was created, last edited, who created it, and where and how it was created. </blockquote>
<blockquote class="tr_bq">
<div class="P-Article-Preview-Block-Content">
The eMonocot project (<a href="http://about.e-monocot.org/" target="_blank">http://about.e-monocot.org</a>) makes use of the Scratchpads (Smith et al. 2011) infrastructure as a tool for collecting, curating, and creating content to be harvested by the eMonocot portal (<a href="http://e-monocot.org/" target="_blank">http://e-monocot.org</a>).
As part of this project hundreds of images with embedded metadata are
being uploaded to a number of different Scratchpads, combined with
images directly uploaded by partner communities, and exported en mass to
the portal. For this to be technically feasible at scale images from
varied, disparate sources need to have their metadata standardised as
part of the bulk upload process. </div>
</blockquote>
<blockquote class="tr_bq">
<div class="P-Article-Preview-Block-Content">
There are three widespread image metadata formats that can be handled by this module. A subset of the EXIF standard (Camera and Imaging Products Association Standardization Committee 2010)
specifies a method for tagging of images with metadata. This is widely
used by device manufacturers to record both the make and model of the
image capture device and also the device's settings when the image was
captured (e.g. focal length, flash duration). The eXtensible Metadata
Platform (XMP) was originally developed by Adobe Systems Incorporated
and later adopted by the International Standards Organisation as ISO
16684-1:2012. It uses a data model defined in Adobe 2012
which is serialised in XML when embedded into files. The International
Press Telecommunications Council defines the IPTC Core and Extension
metadata standards (IPTC 2010). </div>
</blockquote>
<blockquote class="tr_bq">
<div class="P-Article-Preview-Block-Content">
An existing Drupal module, Exif (<a href="https://drupal.org/project/exif" target="_blank">https://drupal.org/project/exif</a>),
provides a mechanism for displaying embedded image metadata on Drupal
nodes, but does not provide a mechanism for mapping the metadata into
fields. The import of embedded metadata into Scratchpads/Drupal fields
is a requirement of the eMonocot project and is useful for the wider
Scratchpads community as it allows for these data to be easily used by
other Drupal modules (e.g. Views - <a href="https://drupal.org/project/views" target="_blank">https://drupal.org/project/views</a>)
and in other Scratchpads-specific functions such as our on-going work
on implementing the ability to export data via DarwinCore Archives (<a href="http://www.gbif.org/informatics/standards-and-tools/publishing-data/data-standards/darwin-core-archives/" target="_blank">GBIF DarwinCore Archives</a>). There is a comparison of these two modules (and potentially other similar Drupal modules) at <a href="https://drupal.org/node/1842686" target="_blank">https://drupal.org/node/1842686</a>."</div>
</blockquote>
<a href="https://drupal.org/project/exif_custom">EXIF Custom on drupal.org</a><br />
<a href="http://biodiversitydatajournal.com/articles.php?journal_id=1&id=973"><br /></a>
<a href="http://biodiversitydatajournal.com/articles.php?journal_id=1&id=973">Read the full paper</a> (Biodiversity Data Journal)Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-51992893687847444732013-04-04T20:03:00.000+01:002013-04-04T20:03:00.015+01:00Altmetric for DrupalRecently I have been looking at how we measure contributions to science in a way that is more well-rounded than the <a href="http://en.wikipedia.org/wiki/H-index">h-index</a> and similar initiatives. Most of this relates to how we measure a user's contributions to projects such as <a href="http://scratchpads.eu/">Scratchpads</a>, <a href="http://vbrant.eu/">ViBRANT</a> and <a href="http://about.e-monocot.org/">eMonocot</a>.<br />
<br />
The "alternative metrics" movement has been around for a number of years now, and one of the more established outfits is <a href="http://www.altmetric.com/">Altmetric</a> who provide badges for research articles showing how much attention that article has received on a number of purely social (Twitter, Facebook) and 'academic social' (Mendeley, Connotea) networks.<br />
<br />
As the badges are pretty easy to implement I have made a small <a href="http://drupal.org/">Drupal</a> module that displays an Altmetric badge on <a href="http://drupal.org/project/biblio">Biblio</a> node pages, and provides a configuration page to allow the badges to be customised. The module is available here: <a href="http://drupal.org/project/altmetric">Drupal biblio altmetric</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://drupal.org/files/project-images/FirefoxScreenSnapz004.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://drupal.org/files/project-images/FirefoxScreenSnapz004.png" height="640" width="561" /></a></div>
<br />Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-75641108123030131682013-01-16T15:48:00.000+00:002013-01-16T15:48:18.702+00:00Biblio autocompleteA new Drupal module: <a href="http://drupal.org/project/biblio_autocomplete">Biblio autocomplete</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://drupal.org/files/project-images/biblio_autocomplete_chilean.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="376" src="http://drupal.org/files/project-images/biblio_autocomplete_chilean.jpg" width="640" /></a></div><br />
<br />
Previsoulsy as part of <a href="http://e-monocot.org/">eMonocot</a> we started to <a href="http://e-monocot.org/using-ipni-autocomplete-publication-names">use the IPNI webservice to autocomplete some fields in the Biblio content type</a>. As one of the <a href="http://e-monocot.org/objectives">eMonocot objectives</a> is to "Ensure that the tools developed are compliant with zoological nomenclature" I have extended this functionality to use the <a href="http://zoobank.org/">ZooBank</a> API which is currently in a testing phase. In addition values for the autocomplete suggestions can be made from values previous entered in other Biblio nodes.<br />
<br />
Instead of having either previsously entered values, IPNI or ZooBank attempt to autocomplete the field this module has been developed to allow any combination of these plugins to attempt the autocompletion. This will have uses in cases like the recent <a href="http://lymeregis.e-monocot.org/">Lyme Regis Geo-BioBlitz</a> where a single classification spand both animal and plant kingdoms (in this case the <a href="http://lymeregis.e-monocot.org/taxonomy/term/13">Dictioanry of UK Species</a>).<br />
<br />
The module is designed so that additional plugin modules can easily contribute results for other webservices.<br />
<br />
This work was done as part of <a href="http://e-monocot.org/" rel="nofollow"> eMonocot</a> as a contribution to the <a href="http://scratchpads.eu/" rel="nofollow">Scratchpads</a> project.Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-37701285790219628972012-06-24T16:12:00.002+01:002013-01-15T00:41:25.882+00:00Adding Biblio fields programmatically in Drupal 7Previosuly I showed <a href="http://pblog.ebaker.me.uk/2012/06/creating-new-biblio-type.html">how to create a new Biblio type in Drupal 7</a> - this code covers the next step: adding additional Biblio fields to a Biblio type in code.<br />
<br />
<br />
<script src="https://gist.github.com/2918080.js?file=gistfile1.aw"></script>Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-44003936275751392382012-06-01T16:51:00.000+01:002013-01-12T18:33:26.500+00:00Creating a new biblio type programatically in Drupal 7How to create a new biblio type in code in Drupal 7:<br />
<br />
<script src="https://gist.github.com/2836324.js?file=gistfile1.aw"></script><br />
This is just a modification of the function biblio_admin_types_add_form_submit($form, &$form_state) and run during install of the custom module (using hook_install() ).Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-78604554994837192452012-05-30T18:47:00.000+01:002013-01-13T20:54:24.830+00:00Create Drupal 7 biblio nodes programaticallyThe biblio module for Drupal is almost certainly essential for anyone trying to use Drupal as a platform for doing science. It is a large module with lots of functionality but parts of it are pretty badly documented (that is: you can read through the code but just Googling might not throw up what you need).<br />
<br />
The first issue - how to create a biblio node programatically (that is: in code).<br />
<br />
<script src="https://gist.github.com/2836346.js?file=gistfile1.aw"></script><br />
Some things to note:<br />
<br />
<blockquote class="tr_bq">1) You must set the type of the biblio you wish to make (Journal Article, Book chapter, etc) before the call to node_object_prepare().<br />
<br />
2) To set the authors you must set $node->contributors as an array (like that above) and also call biblio_insert_contributors($node).</blockquote><br />
The above example sets only a fairly minimal number of the biblio fields, but any of the biblio fields may be set using this method.<br />
<br />
The field 'start page' in biblio entries is for some reason stored in the field biblio_section (that's not an error in the code above)l.Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.comtag:blogger.com,1999:blog-2063119946997933431.post-12267015205651216062011-03-10T21:21:00.000+00:002013-01-15T00:39:43.562+00:00Augmented Reality for Geology (a Drupal approach)Yesterday in a discussion with <a href="http://www.nhm.ac.uk/research-curation/staff-directory/palaeontology/j-young/index.html">Jeremy Young</a> we thought about the concept of having an augmented reality app that would point out a few major points of interest in Lyme Regis (we'll be down for the <a href="http://www.fossilfestival.com/">Fossil Festival</a> again this year). The discussion came from playing with the <a href="http://www.layar.com/">Layar</a> app, for which it is possible to provide custom data layers.<br />
<br />
As there will be a few of us around at the festival this year (many of us living in an iPhone augmented world) I thought the idea was worth investigating a little bit more. The first challenge was to provide some kind of editing environment where we could collaboratively provide the relevant co-ordinates, altitude, text and image. Thanks to the <a href="http://drupal.org/project/layar">Layar module</a> for <a href="http://drupal.org/">Drupal</a> this was achieved pretty easily - adding items to the augmented reality layer becomes just as simple as filling out a form.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaPNdcpCG3R4IeTUU42sdyPblsSWhHJL8eQ_desEYeRDqiXwZyZkHta-2lvjISdXQG3vqeD3JopIqr-ytjVy6YLPN5dwOKNLvtGx_iNSbWWqv_HjcCiVwpw9PZNEhKQ4xxGn3AQUD2w/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCaPNdcpCG3R4IeTUU42sdyPblsSWhHJL8eQ_desEYeRDqiXwZyZkHta-2lvjISdXQG3vqeD3JopIqr-ytjVy6YLPN5dwOKNLvtGx_iNSbWWqv_HjcCiVwpw9PZNEhKQ4xxGn3AQUD2w/s320/Screenshot.png" width="75%" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;">I created a handful of Points of Interest (including The Whole Hog - perhaps the world's best sandwich shop) and then submitted the necessary details to the Layar team (the layer is currently still awaiting approval).</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The next issue was how we could add points (including photographs) while roaming around the town and seashore. The obvious answer was the ubiquitous iPhone (other smartphones are available), but mobile Safari doesn't allow uploads to websites.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The solution was Flickr (I use it to manage almost all <a href="http://www.flickr.com/photos/edwbaker/">my photographs</a>). The Flickr app is easy to use and can upload photographs complete with titles, descriptions, location data and tags. Importing data from Flickr was achieved using a version of the <a href="http://drupal.org/project/flickrsync">FlickrSync</a> module I had previously hacked to import geolocation data. The system can be set to only import photographs with specific tags - an easy way to only get the data I want. Individual users of the site will be able to associate their Flickr account and specify what tags they want to use to label items for inclusion in the layer.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">I have also made an overview map that shows the <a href="http://layar.ebaker.me.uk/lyme/map">points of geological interest around Lyme Regis</a> that have been collected so far.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">All in an evening (and a half)'s work.....</div>Edhttp://www.blogger.com/profile/14569326774736717270noreply@blogger.com