I have spent the last few weeks making some significant updates to Numishare in order to accommodate two scenarios in publishing coin type corpora online within the framework:
As a result, I have successfully implemented the joining of SPARQL and Solr queries for the HRC umbrella site, which I hope we can launch by May (even though Ptolemaic Coins Online is only partially completed).
It is now possible to compare the average weight of tetradrachms of Ptolemy I with those of Antiochus I through one interface that enables the query across these disparate datasets.
Since I had to conduct significant revisions to the underlying SPARQL queries in Nomisma to facilitate these joins, I moved forward with a task that has been on my agenda for the last three years: to migrate the semi-proprietary Highcharts Javascript library to the much more robust and community-supported d3.js. I had previously implemented this library for distribution and metrical analyses in Nomisma.org itself. So I adapted code I had already written in Nomisma in order to generate APIs in Numishare that would construct complex SPARQL queries from URL parameters and serializing the resulting output into the JSON model required by d3.js. Like Nomisma, the API will also serialize the results into CSV for further revision or analysis in other platforms.
Unlike the Nomisma interfaces, which are exclusively in English, I have adapted those in Numishare to provide the results in each of the languages supported by the framework. If a preferred label exists in Nomisma for a given concept, it will be displayed. If not, it will default to English.
Before these updates, the metrical analyses in Numishare were built on SPARQL, but the distribution visualizations were based on facets indexed into the Solr search index. These Solr facet-based distributions applied to both coin type and physical specimen collections. The old /visualize link will continue to exist in Numishare, particularly for specimen collections, but a warning message informs user of type corpora that the Solr-based distributions will be deprecated eventually. The Solr distributions are particularly powerful because the Solr queries might include searches for legends, iconographic descriptions, and fuzzy searches with wildcards. This can be implemented in SPARQL eventually, but the new interface currently only allows queries for typological categories connected to Nomisma-defined concepts (denominations, people, mints, etc.), as well as start and end dates.
The Solr-based distribution analysis interface has also been migrated from Highcharts to d3.js, and an API has been adapted to transform a series of Solr queries (for comparisons) into the d3.js JSON model (with optional CSV downloads, also).
I have compared the result of these charts derived from Solr with those derived from SPARQL, and the resulting statistics are identical. They weren't in the initial testing, as the first version of the SPARQL query including all subtypes as well. But any type that has a skos:broader property has been suppressed from the query, enabling a consistent comparison of parent types. The charts derived from Solr are multilingual only if the language has been enabled in the Numishare config and the types have been reindexed into Solr following the activation of these languages in the interface.
Since metrical analyses are being fully migrated to d3.js with a different array of HTTP request parameters, old URLs that point to these charts will be forwarded to the new URL pattern to maintain backwards compatibility.
This migration from Highcharts to d3.js is nearly complete, and I hope to move this significant changes to production by the end of April. Expect the Hellenistic Royal Coinages umbrella site to be launched sometime between late April and mid-May.
Highcharts remains for data visualization in Coin Hoards of the Roman Republic, but this will be migrated next.
- To create an umbrella site that encompasses PELLA, Seleucid Coins Online and Ptolemaic Coins Online for the NEH-funded Hellenistic Royal Coinages project. This requires some updating of the Numishare config to include URIs for multiple type corpora to join SPARQL and Solr queries together for the browse interface, geographic visualizations, and quantitative analyses.
- To make it possible for a digital type corpus to completely stand alone with its own SPARQL endpoint (for Clare Rowan's project on Roman tokens). Although a SPARQL endpoint can be specified in the Numishare config, various parts of the application still relied on Nomisma.org APIs for displaying related specimens in the browse page or average weights and diameters on coin type record pages. This makes it difficult to test the development of a type corpus since types are not ingested into Nomisma.org until they are completed, and specimens are not integrated into Nomisma until they have been assigned permanent URIs.
As a result, I have successfully implemented the joining of SPARQL and Solr queries for the HRC umbrella site, which I hope we can launch by May (even though Ptolemaic Coins Online is only partially completed).
Map of the full distribution of Seleucid and Ptolemaic coinage, based on current data. |
It is now possible to compare the average weight of tetradrachms of Ptolemy I with those of Antiochus I through one interface that enables the query across these disparate datasets.
Since I had to conduct significant revisions to the underlying SPARQL queries in Nomisma to facilitate these joins, I moved forward with a task that has been on my agenda for the last three years: to migrate the semi-proprietary Highcharts Javascript library to the much more robust and community-supported d3.js. I had previously implemented this library for distribution and metrical analyses in Nomisma.org itself. So I adapted code I had already written in Nomisma in order to generate APIs in Numishare that would construct complex SPARQL queries from URL parameters and serializing the resulting output into the JSON model required by d3.js. Like Nomisma, the API will also serialize the results into CSV for further revision or analysis in other platforms.
The average weight tetradrachms of Ptolemy I and Antiochus I |
Unlike the Nomisma interfaces, which are exclusively in English, I have adapted those in Numishare to provide the results in each of the languages supported by the framework. If a preferred label exists in Nomisma for a given concept, it will be displayed. If not, it will default to English.
Distribution of denominations produced by Antiochus I vs. Ptolemy I, in French |
Before these updates, the metrical analyses in Numishare were built on SPARQL, but the distribution visualizations were based on facets indexed into the Solr search index. These Solr facet-based distributions applied to both coin type and physical specimen collections. The old /visualize link will continue to exist in Numishare, particularly for specimen collections, but a warning message informs user of type corpora that the Solr-based distributions will be deprecated eventually. The Solr distributions are particularly powerful because the Solr queries might include searches for legends, iconographic descriptions, and fuzzy searches with wildcards. This can be implemented in SPARQL eventually, but the new interface currently only allows queries for typological categories connected to Nomisma-defined concepts (denominations, people, mints, etc.), as well as start and end dates.
The Solr-based distribution analysis interface has also been migrated from Highcharts to d3.js, and an API has been adapted to transform a series of Solr queries (for comparisons) into the d3.js JSON model (with optional CSV downloads, also).
Distribution of mints of Antiochus I to Seleucus I |
I have compared the result of these charts derived from Solr with those derived from SPARQL, and the resulting statistics are identical. They weren't in the initial testing, as the first version of the SPARQL query including all subtypes as well. But any type that has a skos:broader property has been suppressed from the query, enabling a consistent comparison of parent types. The charts derived from Solr are multilingual only if the language has been enabled in the Numishare config and the types have been reindexed into Solr following the activation of these languages in the interface.
Since metrical analyses are being fully migrated to d3.js with a different array of HTTP request parameters, old URLs that point to these charts will be forwarded to the new URL pattern to maintain backwards compatibility.
This migration from Highcharts to d3.js is nearly complete, and I hope to move this significant changes to production by the end of April. Expect the Hellenistic Royal Coinages umbrella site to be launched sometime between late April and mid-May.
Highcharts remains for data visualization in Coin Hoards of the Roman Republic, but this will be migrated next.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.