I had thought I would be spending some of this week working on Burns related things, but unfortunately Pauline is still not well so this has been pushed back to next week. We should hopefully still be able to get the timeline and the tour maps available in time for Burns’ Night though.
The rest of my week was spent on Mapping Metaphor duties. I completed a first draft of the advanced search last week and I received some feedback from Ellen. She suggested that rather than jumping directly from the search form to the visualisation it might instead be better to present users with a list of categories that match the user’s search criteria to enable them to select which of these they’re interested in. This would get around the problem of someone searching for a concept such as ‘light’ being faced with hundreds of categories when the majority of them might not be relevant. I added in such an intermediary page, and it works a lot better. Matching categories are listed with a checkbox beside them and by default all categories are ticked. An option is available enabling a user to select or deselect all, in addition to allowing individual categories to be ticked / unticked and after pressing the ‘continue’ button the search runs.
After completing this task I began to investigate how the timeline might operate. I decided against using an off the peg timeline solution (such as Timeglider, which I had previously used for a mock-up). This was because all the points plotted on the timeline will be rounded into 50 year chunks so will be stacks of points, plus we don’t need to be able to zoom in on specific periods – 50 year chunks is a granular as we are going to get. Instead I decided to implement something using d3.js, based on some code from a scatterplot chart (http://bl.ocks.org/mbostock/3887118). Our timeline would have time as 50 year chunks across the bottom, points of two sizes (representing strong and weak metaphors) and 6 colours representing which top level categories the connections belong to: 1 (External World) is green, 2 (Mental World) is blue and 3 (Social World) is red, so 1-1 is green, 2-2 is blue, 3-3 is red, 1-2 is cyan, 1-3 is yellow, 2-3 is magenta.
For my first attempt I didn’t round the dates to 50 year chunks and made the position of the dots on the vertical axis random, as you can see from the following screenshot:
I then made two further tests where the dates were rounded and the points were ‘stacked’, one with dots, and the other with rectangles, as you can see below:
Ellen preferred the dots to the rectangles so that’s what I focussed on. The next stage was to make the diagram dynamic (i.e. working with any data based on the user’s selection) and to integrate it with the other data view options. Ellen also informed me that there would be no 50 year chunks before 1150 and everything before this point should just be grouped into an Old English ‘bucket’. I also realised that in order to deal with the datasets as used in the other data views I would have to be able to plot aggregated points as well as individual metaphorical connections. This meant updating the data output files so that aggregated data (e.g. that there are connections from 1B03 Age and the level 2 category 2A Mental Capacity) also returned a start date (e.g. the earliest date when 1B03 had a connection to any level 3 category within 2A).
I decided that aggregated points should be displayed as rectangles on the visualisation. Having two different shapes actually proved to be rather tricky to implement as previously the entire dataset was cycled through from within the ‘add circle’ function and the way the code was set up meant that adding a little ‘if’ statement to position a different shape instead was not particularly straightforward. However, I managed to figure out a way to do it and by the end of the week the ‘Change View’ option for the timeline was operational for the ‘drilldown’ data, producing something like the following:
There is still a lot to be done, though. For example, sometimes there is too much data for a column and it gets cut off the top of the visualisation. I need a way to manage this. I also need to implement the key, facilities to open the metaphor card when a data point is clicked on and the download option and the top-level view as well. I’ll continue with this next week.
Other than the above I also had a meeting with Marc this week, which was mainly an opportunity to talk about projects and my work levels and things like that.