Archive for May, 2007

Using the Index

Wednesday, May 30th, 2007

The CCI has 2 types of search available to users, and an inbuilt multi-field indexing lookup for key fields within records. This is designed to allow rapid quantification and comparisons of each individual attribute.

Quick search

This is found on the main page and on each individual record page. This field allows you to search upon:

  • Coin number
  • Metal type
  • County
  • Tribe
  • Area
  • Van Arsdell Number

To perform this search, just enter the value within the box and press go! The search results that you bring back can be viewed as an image grid, on the Google map, via RSS (you can then be updated everytime a new record of this type is added) and geoRSS (you could use this in your own Google MyMaps mashup.) If you have registered researcher status, the results can also be downloaded as JSON, XML, CSV and TXT format.
This is the least powerful search facility.

Advanced search

The advanced search is far more powerful than the quick search. It can be used to create multiple field searches and it uses pre-configured dropdowns to prevent the user looking for options that don’t exist. It also has autocomplete functions on 3 fields (if you start typing the search phrase it will automatically give you the possible values). This only works if JavaScript is enabled.

To use the advanced facility, fill in as few fields or as many fields as you want. A complex query could be as follows:

  1. Region = British
  2. Denomination = Stater
  3. Metal type = Gold
  4. County = Cambridgeshire
  5. Method of discovery = Metal detector

This search brings back 28 records. You can plot these results on the Google Map interface or obtain the data in the same manner as the quick search. All buttons will be located in exactly the same place.

Center of map
markers

The above map is a working example of the Gmaps system and is generated from a wordpress plugin and a geoRSS result.

Sorting your results

The returned results tables allow you to sort on any of the chosen headers. It defaults to coin number, by clicking on any of the headers you can organise these data ascending or descending.

Using the map - post search

The map is using the ubiquitous Google Map platform (at present) and it allows you to navigate around the United Kingdom via your mouse and clicking on the pushpins. The amount you can zoom in and the type of map that you can view is limited by permission based accounts to protect land owner and finder privacy. If you click on a pushpin, an information window appears and this can then show you the thumbnail and short details of the record. Clicking on the record number will take you directly to the record. Double clicking in the centre of the compass at the top left will reset the map to centre.

Using the map from the main menu

Coming shortly will be a multi layer map that will demonstrate different coin groups and an overlay direct from the Portable Antiquities Scheme database for Roman Republican coins, Iron Age coins and artefacts. What would also be useful is a map of Iron Age monuments. This will be made possible by the recently announced Google Maps support for KML and geoRSS.

More help?

Well hopefully, the Index is user friendly enough and obvious that you won’t need to ask for more help! However if you do need more, contact info@finds.org.uk and state you are after CCI help in the subject field of your email.

Accessing the API

Wednesday, May 30th, 2007

The Index has been built with the intention that people can query the database remotely and mash these data up for their own archaeological applications. I know there will be some keen people out there, for example Stuart Eve at LP Archaeology, Steve White of Online Archaeology and of course Andrew Larcombe (he’s already started.)

To do this, I have tried to create a REST API. What the hell is that I hear you cry! Well here’s two definitions:

Representational State Transfer (REST) is an architectural style for distributed hypermedia systems like the world wide web. The term originated in a 2000 doctoral dissertation about the web written by Roy Fielding, one of the principal authors of the HTTP protocol specification, and has quickly passed into widespread use in the networking community.
en.wikipedia.org/wiki/REST

A set of routines that an application uses to request and carry out lower-level services performed by a computer’s operating system. Also, a set of calling conventions in programming that define how a service is invoked through the application.
www.maptrax.com.au/

Does that make it any clearer? Probably not! Well this is how it works below and it opens up a world of possibilities….

Accessing the api is much the same as accessing the data via the advanced search interface. Each search page comes with the export functions built in for:

  1. JSON - json.php This contains truncated point data via the api. Only records with spatial data are returned in this query.
  2. XML - xmlDCN.php or xmlMIDAS.php - useful for transferring information between systems such as Historic Environment Record Offices or use by the Digital Coins Network. This contains truncated point data via the api.
    Available first week of June.
  3. geoRSS (simple version at present) - georss.php I’ll be building a GML version shortly. This is produced in ATOM format and can be used for mapping as it contains truncated and obfuscated co-ordinates of the coins. Only records with spatial data are returned in this query.
  4. KML - kml.php - for use in Google Earth or overlaying straight into Google maps with api 2.x or within Google’s new “My Maps” feature. This also contains truncated point data. Only records with spatial data are returned in this query.
  5. RSS - rss.php - note this does not give spatial co-ordinates and is really just an RSS feed of coin number, county etc. This is limited to 25 records and is intended just for consumption on a website or through a feedreader. More details on RSS can be found on the BBC website or the PAS website.
  6. CSV - csv.php - Good for downloading large chunks of the data. However this is limited in what you can download as there is sensitive data within the database. Still useful for many though. You cannot download via the api, the spatial co-ordinates.

However you can make a direct call to the RESTful API to access data. All requests take a number of parameters.


http://www.finds.org.uk/CCI/api/request_format.php?&variable=argument

The current version of the API is 1.0

If we make changes to the API, we’ll increase the version number and make details available. As the data is quite strictly controlled on a validated input methodology, the API will only be released with GET and not PUT, POST or DELETE . The database also contains one type of object - coins - so the requests are quite simple to process if you know what you are looking for. The variables that you can ask for are:

  • Primary ruler - getRuler1
  • Secondary ruler - getRuler2
  • Region - getRegion
  • Area - getArea
  • Tribe - getTribe
  • Denomination - getDenomination
  • Metal type - getMetalType
  • Coin number - getCoinNumber (very limited as it returns single records so don’t use other variables as you’ll get naff all unless you’re very precise.)
  • Van Arsdell numbers - getVAType
  • Allen Numbers - getAllenType
  • Status - getStatus - very simple arguments “forgery or regular.”
  • Collection held - getCollection
  • Hoard coin - getHoardStatus - simple argument of 1 or 0 (true or false)
  • Discovery method - getDiscoMethod
  • Discovery year - getDiscoYear
  • Set - getSet(only 2 options CCI or PAS - corresponds with the OAI server)
  • County - getCounty - breaks down into English and Welsh counties.
  • Country - getCountry - only options for this are: INDIA, IRAQ, ENGLAND, BELGIUM, FRANCE, LUXEMBOURG, WALES, SCOTLAND & SWITZERLAND. Coins have been found in a variety of countries and recorded at the CCI.

Due to the nature of the database, you cannot search by locality or parish at present.

The list of possible arguments is listed if you click on the variable name above, some are rather wide in scope, some are defined and narrow - eg hoard status argument is just binary 1 or 0.
Therefore you could either do a simple API call:

http://www.finds.org.uk/CCI/api/georss.php?getDenomination=Unit

This would return a feed on demand of all the coins in the Index where a denomination of unit has been recorded in the geoRSS format. You must supply an argument to retrieve data.

A more advanced spatial search could be applied:

http://www.finds.org.uk/CCI/api/georss.php?getDenomination=Unit&getCounty=Cambridgeshire

This query would return all records with the denomination of Unit and County of Cambridgeshire. I have a feeling that the geoRSS feed will be used the most as this will allow people to do geoMashups, which seem by far and away the most popular looking at the ProgrammableWeb matrix of currently available mashups.

At present, the API is authenticated and I’d like to keep it that way so that I can control who has access. If you would like to use the API, please contact me and I’ll sort out your authentication and I’d also like to know what you would be using these data for.

An example of what one could do?

Perhaps the most simple illustration of what could be done is consumption of an RSS feed and integration with your local society website. If you used the simplie pie architecture (don’t ever reinvent things!) you could have an RSS feed for recently found coins from Cambridgeshire.

Another mashup could be taking different denominations and overlaying them for a county to show patterns (in this case I have overlain Gold Staters from Cambs, Silver Units from Cambs and Units from Suffolk) and then these could be mashed up with Steve White’s KML layer of Roman villas.

Center of map
Gold Stater Cambs
Gold staters
Silver Unit Cambs
Silver Unit
Roman Villas from Online Archaeology
Villas
Silver unit Suffolk
Suffolk Units
Iron age objects recorded with the Scheme
Iron age objects

Have a click around in the above and see what you get in the bubbles. As I’m using a wordpress plugin, I can’t change the colours of the points to discriminate very easily.

getDiscoYear

Tuesday, May 29th, 2007

The getDiscoYear arguments are appended to the api call as such:

&getDiscoYear={year}

The possible arguments are:

  • 1718
  • 1720
  • 1736
  • 1746
  • 1749
  • 1750
  • 1761
  • 1762
  • 1764
  • 1775
  • 1781
  • 1786
  • 1788
  • 1796
  • 1800
  • 1801
  • 1803
  • 1805
  • 1806
  • 1808
  • 1813
  • 1816
  • 1820
  • 1821


(more…)

getDiscoMethod - api syntax

Tuesday, May 29th, 2007

The getDiscoMethod arguments are appended to the api call as such:

&getDiscoMethod={name}

The possible arguments are:

  • Excavated
  • Field walking
  • Metal Detector
  • Possibly Metal Detector
  • Unknown

To complete the string, please use %20 to allow the search to run.

getCollection - api syntax

Tuesday, May 29th, 2007

The getCollection arguments are appended to the api call as such:

&getCollection={name}

The possible arguments are:

Aberdeen University Museum
Abingdon Museum
American Numismatic Society
Amiens
Ashmolean
(more…)

getAllenType - Api syntax

Tuesday, May 29th, 2007

The getAllenType arguments are appended to the api call as such:

&getAllenType={name}

The possible arguments are:

ADD
AGR
ALESCA
AMMINUS
AMMINVS
ANDOCO
ANTED
AVNCOST
BH
(more…)

getVAType - api syntax

Tuesday, May 29th, 2007

The getVAType arguments are appended to the api call as such:

&getVAType={name}

The possible arguments are:

10.01
10.02
1005.01
1010.02
1010.03
1015.01
102.01

(more…)

getCoinNumber - api syntax

Tuesday, May 29th, 2007

The syntax for retrieving data for a single coin is straightforward and follows this format:

&getCoinNumber={coin number}

However the coin number format is pretty non standardised at present. The original concept was to follow the numbering of the end two digits of the recording year, with the current number of that coin for the year. This means that you see records with numbers such as:

00.0001
00.101
etc.

The Index numbering routine will change shortly as new items are added. Coins added from the PAS will retain their numbers in the format PAS-12ABV123 whilst CCI added records will be seen as CCI-12124

Good luck with this one!

getMetalType - api syntax

Tuesday, May 29th, 2007

The getMetalType arguments are appended to the api call as such:

&getMetalType={name}

The possible arguments are:

Copper alloy
Gold
Iron
Lead
Silver

getDenomination - api syntax

Tuesday, May 29th, 2007

The getDenominationĀ arguments are appended to the api call as such:

&getDenomination={name}

The possible arguments are:

Drachm
Fraction
GAE
- to be deprecated once we determine what it stands for.
Half stater
Half unit
Minim
Quarter Stater
Quarter unit
Stater
Tetradrachm
Uncertain
Unit
Unknown