Thursday, September 29, 2011

Flickr Image Integration

Major updates have been underway in Numishare development over the last few months, as exhibited by the recent flurry of blog posts.  One of the more recent advances has been in integrating the flickr API into the Numishare administrative back end, enabling users to attach images from that web service to coin metadata records.  The process is fairly straightforward.  The user:

  1. Signs up for flickr and requests an API key
  2. Inputs the API key into the Numishare settings page and updates the settings
  3. Opens a coin record and inserts an obverse or reverse image
  4. Pastes a URL of a flickr image into the input box and clicks the "Attach" button
When the user clicks this button, an API lookup is called to receive URLs to available image sizes, and each URL is stored in METS elements embedded into the NUDS XML document.

When the coin is saved and published to the search index (Solr), the thumbnail and medium-sized images are stored so that they can be accessed from the search results page (and, obviously, from the coin record itself).

When clicking on the medium-sized images, the user is directed to the flickr URL for that object, per their terms of service.

Leveraging flickr's service for image storage and retrieval has numerous benefits, especially when a collector or institution may have a large body of image files, but not enough web space on the server on which Numishare is installed or if there is a wish to make just the images accessible through other media.  Flickr is a great alternative Numishare's default image uploading mechanism, Remotemagick, an XML-RPC service which is a front-end to imagemagick that interacts with Orbeon for uploading and resizing images.

Thursday, September 8, 2011

Leveraging nomisma to Deliver Controlled Vocabulary Services

With the launch of the Atom feed just a few days ago, I went to work on developing an XForms component which leverages the service to deliver controlled vocabulary terms for ancient mints within the administrative backend of Numishare. Numishare's interface for creating and editing coins already included a connector to's APIs for querying modern place names, which I have detailed on the EADitor blog.

The nomisma service operates in similar fashion. A user selects a "nomisma" radio button (versus the other options to query geonames or local controlled vocabulary stored in the Solr index), inputs a search term into a text box, clicks the search button which executes an xforms:submission to query the Atom feed (which populates an xforms:instance), and selects the appropriate option from the select list box, which is formed by each atom:entry returned by the query. An example is pictured below:

The nomisma URI is stored as an attribute in the mint element in the NUDS-XML record so that, upon indexing the record into the search index, a lookup is performed on the RDFa of the nomisma id to extract geographic coordinates, enabling mapping out of the box of ancient mints (in addition to modern mints that are supplied through the geonames service). As noted earlier, findspots are also mappable.

Additionally, if the nomisma RDFa includes a reference to the associated Pleiades place, the Pleiades URI is also stored in the search index, enabling querying of Numishare by that URI.

Code for XForms XBL component

Tuesday, September 6, 2011 launches Atom feed

Last week I began development on an Atom feed for the numismatic concepts described on The feed will be updated nightly with the latest changes to the concepts, so you can be sure to keep abreast of new mints, denominations, hoards, etc.! Like the Atom and KML services on MANTIS, the feed is derived from Solr search results, and is thus queryable with the Lucene syntax. Most importantly, this feed will form the basis for numismatic controlled vocabulary in the backend of Numishare and will ultimately facilitate internationalization of coin collections that use the software by indexing coins based on unique identifiers for typological attributes (e.g., denomination, material) that are independent of the language in which the institution's collection is described.

There is a limited number of fields, so I will list them below.

id: unique identifier of the record
typeof: category of record. values currently include-- hoard, typology_entry, mint, skos:Concept, authority, romanemperor, collection, material, numismaticTerm, term, and denomination
prefLabel: preferred label of record
altLabel: alternate label of record, likely to include other languages
definition: small blurb describing the object
pos: GML-compliant geographic coordinates
burial_start: integer referring to terminus post quem (of a hoard)
burial_end: integer referring to terminus ante quem (of a hoard)
fulltext: text anywhere in record

Examples - Mints in Attica\-240 - terminus post quem of 240 B.C.

The feed contains links to the next and last pages so that it is possible to easily page through it. The page number is appended after feed/ in the URL, like so:*:*

Many of the entries in the feed also include geographic coordinates, and thus Google Maps is capable of rendering it in map form.

I will follow this post up with another about the feed's interaction with the XForms backend in Numishare, and how this will contribute to name authority.

Thursday, August 25, 2011

Numishare's Improved Data Model, Applied to Findspots

As I mentioned in the previous blog post, we are re-envisioning Numishare's underlying data model. The three sites that currently use Numishare in one form or another (University of Virginia Art Museum, Kittredge Collection, ANS's Mantis) are built on an adaptation of Encoded Archival Description, an XML standard common to archival collections, to numismatics. The new model is a numismatic-specific ontology that includes some museum collection types of fields, and is greatly influenced by existing XML standards. In fact, digital images are described in METS.

This new data model, let's call it NUDS-XML, also draws inspiration from linked open data initiatives, best illustrated by two types of records that can be described in Numishare.

The previous version of Numishare assumed that all records represented physical objects. Certainly the new NUDS-XML allows this type of record as well. The other type of record to be introduced is a conceptual object. This is, to say, an XML document that describes a coin-type. It contains, almost exclusively, typological metadata. This includes fields such as types and legends, authority and issuer, mint, material, and denomination. Unlike a record which describes a physical object, it does not contain die axis, weight or other dimsensions, nor does it contain information about provenience, owner, or repository. These fields are distinct to physical objects, not coin-types.

Among planned projects at the American Numismatic Society is an open access catalog of Roman imperial coins. There are tens of thousands of coin-types over several centuries, beginning with Augustus. The ANS does not own a physical representation of each conceptual object, but may own duplicates for other coin-types. The goal is to create a NUDS-XML record for every Roman imperial coin-type, and enable those records to point to URIs of associated physical objects in Mantis (or other digital numismatic collections).

In order to avoid duplication of typological metadata, physical record types in Numishare contain a URI reference to the source conceptual record rather than chunks of XML. Upon rendering and indexing into Solr the physical object record, the URI will be parsed by the XML/XSLT processor (in this case, Apache Cocoon) and the data scraped directly from the source typological record.

Examples below:

Above, a record for a Roman imperial coin-type

Above, a physical object record linked to the coin-type.

We can leverage the LODness of this new data model to render findspots for a coin-type. The encoding of findspots in NUDS-XML is pretty rudimentary thus far. A simple block of GML is embedded into an element called findspot. Ultimately, findspots can also refer to resources available at URIs, and geographical metadata may be scraped from external sources (like

In any case, when a conceptual record is indexed into Solr, the indexing script scrapes the record's associated physical objects' NUDS-XML for GML coordinates and indexes them for rendering in an OpenLayers map layer. [The layer is derived from a Solr-to-KML transformation that has been detailed in an earlier blog post.] In Numishare, when a physical object's findspot is added or updated, and that object's typology is derived from a coin-type record, that coin-type record is reindexed in Solr so that changes to the map are apparent immediately.

These maps are especially valuable to economic historians for analyzing the distribution of a particular coin-type over space (and eventually time, when we introduce temporal mapping). One can visualize trade networks by the distribution of currency.

Friday, August 19, 2011

Visual Themes in Numishare

I've been busy over the last few weeks on seriously revamping Numishare's code trunk. We're moving toward a numismatics-specific XML ontology based on the NUDS fields list, which draws much inspiration from existing standards like VRA Core, EAD, and TEI, but also incorporates tenets of linked open data. I'll discuss NUDS-XML in greater detail in a future blog post.

As part of this major revision to Numishare (which I hope to officially release as Numishare 1.0 later this fall) is a simplified theming interface. One of the drawbacks to the application when it was first released about two years ago is that it required XSLT and general web development knowledge in order to customize the front-end user interface. While direct customization of code can still be done by a savvy developer in the current version, much of the theming is being moved into the administrative interface, with an XForms application that enables the user to control the visual design of the public site with an intuitive web interface that will function much like Blogger's own interface for customizing this or other blogs. This feature is vital in the encouragement of institutions and collectors to adopt Numishare as their publishing platform. After the initial deployment of Numishare's required applications onto a server (which takes a sys admin about 15 minutes), no other serious technical investment is required of the Numishare administrator to begin publishing coins since it requires no programming expertise to visually distinguish Numishare-based sites from one another.

jQuery UI theme

Object display page layout

The interface will enable the user to specify which jQuery UI theme to use (all pre-packaged themes are available to choose from), as well as other colors, fonts, background images, banner images, etc. There will be several page layouts to choose. These visual configurations are stored in an XML file that is edited with an XForms web form. So far, the jQuery UI theme and object display page layouts have been implemented, and I plan to implement the remainder of the theme-adjusting interface will be completed in the coming weeks.

Wednesday, July 20, 2011

Another Take on Visualizing Collections

Today we released a new feature to Mantis--charts and graphs with the handy jQuery plugin Visualize by the Filament Group. This converts HTML tables of data generated dynamically from Solr queries into line, bar, area, and pie charts that are rendered with the HTML5 canvas element. This works in any modern browser (Opera, Safari 3+, Google Chrome, and Firefox 3.5+), though I have found that IE8 has some rendering issues.

The new Visualize feature functions as an extension to the search results page. A chart icon appears in the top of the left-hand column, under "Data Options" (alongside Atom, KML, and CSV deliverables). This will direct the user to a new page with various data and chart output options. The user can select to render a graphical tabulation of available Solr facets given the current query passed via parameter from the search results page. For example, one can receive a chart of deities given the query of Roman coins minted in Asia, Asia Minor, Caesarea, Carrhae, or Carthage. The result is pictured below.

The Solr query and all chart options are passed into the page via URL parameters rather than relying on asynchronous javascript interaction. This means that specific charts have URIs and can thus be bookmarked and passed to others for viewing, e.g., Moreover, the charts are printable!

Wednesday, April 6, 2011

American Numismatic Society Unveils MANTIS: A Major Numismatic Research Tool

American Numismatic Society Director Ute Wartenberg Kagan today unveiled the new interactive ANS collection search tool, MANTIS ( MANTIS (Mantis: A Numismatic Technologies Integration Service) provides access to all 600,000 records for objects in the ANS collection, through a series of new, easy-to-use search screens.

The new search tool is an open source implementation of several applications used in the Library, Archive, and Museum communities, including Apache Solr for faceted searching. The tool enables users to interact with the ANS collection through keyword searches or by browsing and sorting on numerous categorical and physical attributes common to numismatics. This search tool connects individual objects together by these searchable attributes, allowing users to seamlessly navigate from one object to its relations.

ANS Director Wartenberg explains, “The collections database is the work of a generation of expert cataloguers, and was originally designed to allow curatorial staff to manage the massive holdings of the Society. MANTIS marks a huge leap forward in making this work available to the general public in a way that is easy to understand for specialist and non-­‐specialist alike. Together with DONUM, our bibliographic search tool, the release of MANTIS places the ANS at the forefront of numismatic research on the World Wide Web.”

The Database breaks down into 11 Departments, which can be searched as a whole or individually. Approximate totals for each department are as follows:

  • Greek 100, 000
  • Roman 80,000
  • Byzantine 15,000
  • Islamic 60,000
  • East Asian 45,000
  • South Asian 50,000
  • Medieval 50,000
  • Modern 100,000
  • United States 25,000
  • Latin America 20,000
  • Medals and Decorations 50,000

Traditional searches by mint person, date and numismatic categories are catered for, and supplemented with a new map interface. This latter feature, still under development, will eventually allow the user to find coins, medals and banknotes issues around the world by clicking on points on a map.

“The release of the new research tool is an exciting development, not just for the access it provides to our remarkable collection,” notes ANS Deputy Director Andrew Meadows. “It also harnesses an ANS initiative to create stable identities for numismatic concepts on the World Wide Web through the project. This is most visible at the moment in the mapping functions that we offer, but will ultimately extend to the creation of other exciting new tools.”

The design of MANTIS is the work of ANS Web Developer Ethan Gruber, working in close collaboration with ANS Research Scientist Sebastian Heath.

Heath explains: “The new ANS database is now positioned to become a tool for expressing all the links inherent in each individual coin. We can already see this in the powerful mapping function. Even at this early stage of development users can browse the Greek and Roman departments by geography, with an expanding set of North American mints also coming available. It's already possible to make maps of similar coins, such as those showing Greek and Roman deities, and this functionality will become available for more coins as Ethan Gruber continues his work. The database also supports a variety of export formats that will encourage exploration of the links between numismatics and other disciplines. Underlying much of our work is a technical approach called ‘Linked Open Data’. As the humanities increasingly embrace digital tools, researchers of all stripes can be confident that the ANS is bringing exceptional resources into their domains.”


Dr. Andrew Meadows, Deputy Director

Tuesday, April 5, 2011

New American Numismatic Society Collection Interface Goes Live!

As a quick update before we publish the official press release, the new ANS collection interface is live at . Over the next few days, we will try to iron out the bugs that we find. There will undoubtedly be a few as we are integrating the CMS with the new Numishare application instance.

I have prepared a guide to the ANS's APIs for accessing data in the form of linked data or KML, which will be published tomorrow.

Friday, April 1, 2011

A World of Numismatic Data at Your Fingertips

The JISC Common Repository Interfaces Group (CRIG) has a saying: "The coolest thing to do with your data will be thought of by someone else." The American Numismatic Society's MANTIS interface enables users to search, sort, and browse the collection in a way that is relevant to their own research questions. Users can view query results in the form of HTML pages or OpenLayers maps that draw on KML layers. These are probably the two most common avenues for interacting with the ANS's data, but we have developed several APIs that expose the data in the form of linked data and KML.

Currently, we offer an Atom feed and a KML API. An RDF feed is currently in the works and will be released in the coming weeks. These APIs are based on queries to the Solr search index and can be adjusted based on the user's demands.

Object KML:*:*
Mint KML:*:*

The feeds are formulated based on the Lucene query syntax. q=*:* passes a query for all results from all fields (i.e., the entire collection of objects). For example,"Greek" returns the Atom feed for all coins in the Greek department with 100 results per page. This is particularly useful to those who want to subscribe to the portion of the collection that is relevant to their own interests. The practicality of this feed extends beyond casual subscriptions to updates to the database. The Atom XML contains a reference to the next page in the feed. Each object entry includes a pointer to the HTML record of the coin, as well as pointers to other representations of the data, including, importantly, the source Encoded Archival Description XML file. This allows anyone to scrape the entire ANS collection. With more than 600,000 objects, the Atom feeds creates the potential for interesting quantitative analysis.

The KML APIs works similarly--feed it a Solr query and get results back that you can look at in Google Earth or a similar geographic framework. There are two APIs. The object API (query.kml) returns at most 500 results for the query, with points representing individual objects. The mint API returns a point for each mint the query illuminates. This is the foundation for the OpenLayers map function in MANTIS. There is no limit on the number of mints returned by this API. Providing access to thousands of coins (or the entire collection!) in a single KML file would probably bring down the server.

Refer to the Lucene query syntax linked above on appropriate text to pass to the q parameter. There are a wide variety of fields, detailed below. The field name typically corresponds with numismatic ontology or internal ANS database fields.

Text Fields
  • color_text
  • unitid_text (accession number)
  • legend_text
  • type_text
  • persname_text (any personal name: artist, portrait, issuer, etc.)
  • deity_text
  • geogname_text (geographical name, including mint, locality, region, and findspot)
  • fulltext (keyword search anywhere in the record)

Sortable Numbers
  • axis_sint
  • weight_sint (weight)
  • era_sint (century)
  • year_sint
  • dob_sint (date on object)

String Fields
  • color_display
  • dimensions_display
  • imagesponsor_display
  • unitid_display
  • unitdate_display (date of coin, in textual terms. e.g. 16 BC - AD 3)
  • unittitle_display
  • obv_leg_display (obverse legend)
  • obv_type_display (obverse type)
  • rev_leg_display (reverse legend)
  • rev_type_display (reverse type)
  • reference_display
  • prevcoll_display (previous collection)
  • sernum_display (serial number)
  • category_display
  • timestamp
  • artist_facet
  • authority_facetusefulness
  • category_facet
  • city_facet
  • decoration_facet
  • deity_facet
  • degree_facet
  • denomination_facet
  • department_facet
  • engraver_facet
  • era_facet
  • famname_facet (Dynasty)
  • findspot_facet
  • format_facet (object type)
  • issuer_facet
  • persname_facet (Person)
  • locality_facet
  • manufacture_facet
  • magistrate_facet
  • maker_facet
  • material_facet
  • moneyer_facet
  • mint_facet
  • region_facet
  • script_facet
  • series_facet
  • state_facet
  • subject_facet
  • subjectPerson_facet
  • subjectIssuer_facet
  • subjectEvent_facet
  • subjectPlace_facet

The 'imagesavailable' field can return objects with images if the value is set to 'true'

  • mint_geo (geographic coordinates)
  • mint_kml ( mint KML URI)

A few notes. String fields (including mint_geo and mint_kml) require exact matches (enclosed by double quotes if the string is providing access to thousands of coins (or the entire collection!) in a single KML file would probably bring down the server.more than one word), but can accommodate Solr wildcards (* and ?).

Have at it!

Examples"Islamic" AND weight_sint:[4 TO 5] - All Islamic coins that weigh between 4 and 5 grams AND imagesavailable:true AND department_facet:"Greek" - Greek coins depicting temples that have been photographed

Tuesday, March 8, 2011

Mapping Part 2: Context

The new American Numismatic Society collection interface will enable users to navigate from records of coins to other objects related by various attributes (issuer, deity, material, etc.) via hypertext links, which redirect the user to the search results page for that particular query. This is one of the features that made the University of Virginia Art Museum Numismatic Collection such a versatile site when it went live in early 2008. Given our ability to map query results in OpenLayers with a Solr-to-KML transformer, we wanted to take the mapping up a notch by visualizing relationships geographically that had only been represented textually in other Numishare sites.

A small map is embedded in a jQuery tab. This map has several layers, each representing facets, that can be turned off and on as the user requires.

Each mint or cluster of mints on the map can be clicked to display a popup that displays the mint name(s) and available facets at that location. The list of facets is represented by a set of checkboxes, and a link within the popup opens a search results page with the selected facets at that mint. The task of displaying checkboxes within the popup is harder than it seems. OpenLayers does not support selecting multiple features on more than one layer at a time, so a handful of Solr queries must be executed upon clicking the feature.

  1. The mint names of the feature are gathered.
  2. For each visible layer, Solr is queried to see if there are any search results for that facet located at that mint (e.g., is there at least 1 result for Nike at Tyre, Sidon, or Berytus?)
  3. If so, return a checkbox via Ajax with some prepopulated value.
  4. When the user clicks on the "View" link, javascript is fired off to assemble the values of the checkboxes into a proper Solr query and opens the search results in a new browser window.

Using the map interface from the object page enables us to formulate far more complex queries than the linking approach does. Once the user arrives at the search results, he or she can easily adjust the query by adding/removing facets or sorting the results by a wide variety of fields. There are currently several alternate data delivery options offered through the linked icons on the top left of the screen: an Atom feed of the query (useful for scholars who may only want to subscribe to Roman Republican coins, for example) and a KML representation of the query that can be loaded by Google Earth. These are just some of many new features the new ANS collection interface will exhibit when it launches within the next few weeks.

Monday, February 28, 2011

The American Numismatic Society collection within time and space

The American Numismatic Society collection represents one of the largest numismatic datasets in existence. Such a large collection of digital objects lends itself to the potential for meaningful quantitative analysis, including the geographical distribution of coins based on a variety of physical and categorical attributes. Mapping coins over time and space is useful to scholars of economic history, art history, and many other disciplines for which coins are an important resource. For example, how have depictions of deities changed over time in mints of Syria? What do Flavian coins found in a late third century English hoard indicate about monetary circulation and the perceived value of centuries-old coins? What do issues depicting Concordia indicate about political conditions in the Roman Empire at that particular time? Dynamic visualization based on researchers' queries can lead to hypotheses that would have otherwise never been considered.

Currently, we are building a mapping interface for the ANS collection that utilizes a variety of free and open source tools: Apache Solr for the search index and OpenLayers for the display of maps. Ajax calls connect the two together to form a seamless interface. When coins are indexed into Solr, the script checks's authority list of mints to acquire the latitude and longitude of each's coins mint (when possible). OpenLayers then builds its point layer with a KML file generated dynamically from the Solr search results for user's query. A list of facets appears under the map, providing the user with the ability to filter results based on constraints like deity, material, denomination, issuer, and region.

OpenLayers enables the clustering of mints found within close proximity to each other, simplifying the interface when zoomed out. The popup bubble in the image displayed above contains the names of the mint or mints within the layer feature. The user can click on the "view" link to load the list of coins that meet the search criteria in the space below the map.

An issue from Tricca depicting Larissa, the nymph named for her city of origin. Unusual?

While the user is able to filter results by century, a future version of this application will feature a time slider for more precise temporal visualization. The functionality of the ANS mapping widget will grow considerably in the following months and will be available with the release of the new collection interface in mid-March.