Week Beginning 23rd September 2013

Another mostly Mapping Metaphor week this week.  On Monday I attended a project meeting and gave a brief update on progress with the website and visualisations.  Some of the participants had viewed my test pages and were very happy with the results.  One person viewed the test pages either in an older browser or using IE set to ‘compatibility mode’ and could therefore only see the HTML parts of the page rather than the SVG graphic.  This is definitely something we will have to put warnings up about, even though the data will be made available through tables in addition to through the visualisations.  We’re going to meet again next Monday in the STELLA lab so everyone will get to play around with the test pages and give me suggestions and other feedback.

With regards to actual development of the website and visualisations, I managed to get the time-slider working and fully integrated with the visualisation.  I decided to use the jQuery UI slider element (see http://jqueryui.com/slider/) – a range slider (therefore double ended) that snaps to 50 year increments.  It works really nicely and presents a simple visual interface for selecting years.  Behind the scenes the slider merely populates a text box with a value (e.g. ‘1200-1500’) and such a figure is then available to PHP following a simple form submit.

I updated both the aggregated and ‘drilldown’ visualisations to work with specified start and end dates (if none are specified these default to 1000 and 2000).  The value passed from the text box to PHP following a form submit is split into separate start and end dates and these are then used to set the positioning of the slider.  They are also passed to the ‘Get JSON’ PHP script which queries the database and retrieves the relevant categories and connections for the visualisations.  So updating the slider to the period 1900-2000 and hitting the ‘Go’ button will generate a JSON file that only contains metaphor connections that began during that period, resulting in a visualisation that only covers this period.  Note that as there are no current ‘start dates’ for any of the metaphor connections in the sample data I was given I created a quick script that automatically assigned a random date somewhere between 1000 and 2000 for every metaphor connection in the system.  This gave me data to work with but obviously the data is complete rubbish and will need to be replaced at some point.

In order to get the date slider working at the aggregate level I had to rewrite a lot of this page, which was previously just a static HTML page connecting to a static JSON file.  I replaced this with two PHP scripts – one that generates the HTML page and one that spits out a JSON file depending on variables passed to it (in the same way as the drilldown page works).  Start and end dates are passed to the JSON-generating script to ensure that only those connections that began during the specified time period are displayed in the visualisation.

I also updated the connections between the aggregated and drilldown views so that the selected period is maintained between views – e.g. if you select 1800-2000 in the aggregate view and then select a category then you only see the connections within that category from the selected time period.  Of course you can also press the ‘reset’ button or update the slider to change the period back to 1000-2000 (or to view a different period).

I also updated the information in the ‘metaphor card’ pop-ups to include the dates and to only show information that is applicable to the selected dates – e.g. at aggregate level only the number of connections between the two categories that began during the selected time period are shown.  In the ‘drilldown’ view the metaphor card also shows some sample lexemes now too, although these are merely words taken from a category rather than ‘real’ metaphorical connection examples.

The final big thing I did this week was to enable users to focus on just two connected level 2 categories rather than selecting one category and looking at every connection within that.  You can access this through the aggregate view by clicking on a line that connects two categories to bring up the ‘card’ view.  (e.g. ‘Armed Hostility (R)’ and ‘Emotion (I)’) and then selecting to ‘View the connections between these two categories’.  This then loads the ‘drilldown’ visualisation containing only those ‘R’ and ‘I’ categories that have a connection and doesn’t display any connections to categories beyond this.  It’s a useful view if you’re interested in specific connections.  And of course the time slider works with this view too.

Other than metaphor work this week I finally got round to creating CSV exports of the HT MySQL databases that will then form the basis for a new Access version of the HT.  I was on holiday on Thursday morning.  Not much more to report!