Professional Documents
Culture Documents
ENSEMBLE
Semantic Technologies for the Enhancement of Case Based Learning
Happy App Building! Patrick Carmichael (Project Director, Ensemble) Kate Litherland (Research Associate, Ensemble Project) Simon Morris (Research Associate, Ensemble Project) And the rest of the Ensemble Project Team
2. Getting started
4. Multiple spreadsheets
5. Data modelling
8. Babel
9. Parts of an Exhibit
10. Views
14. Lenses
15. Facets
Spreadsheets
If using spreadsheets to structure data is new to you, work through the help sheets in order. If you are familiar with this and want to go straight to more advanced data modelling, go the sheet called Multiple spreadsheets.
A text editor
There is help on choosing and installing a text editor on the sheets called Getting started - PC users and Getting started - Mac users.
Simile Babel
A website which converts your data into a format the semantic web can use. For help with using Babel, see the sheet entitled Babel, or look at the site at http://service.simile-widgets.org/babel/
It is possible to use just the standard software pre-installed on many computers for this. Standard spreadsheet programs (e.g. Excel) are ne. However there are some free, downloadable applications which will make parts of the task much easier. They are: Notepad ++ (text editor) Firefox (web browser) Firebug (an add-on for Firefox)
Notepad ++
To download Notepad ++ go to: http://notepad-plus-plus.org/ Click on the download tab. Click Download the current version.
Click on the rst item on the list (Notepad ++ v5.8.7 Installer). Click run. Follow the instructions to install the program. When prompted to choose components, select Custom in the type of install box. The program immediately opens a text le with some text about the program in it. At this stage you can close the program until you are ready to use it.
Click when prompted to agree to and install the program. When the process is complete you will be prompted to restart Firefox. You can then use it like any other web browser.
To launch Firebug, click on the picture of a bug in the bottom right-hand corner of the window. This will open a pane which allows you to inspect various elements of the website. To turn Firebug off again, either click on the bug or the red off button in the top right-hand corner of the Firebug pane, here:
You now have all the programs needed to build your semantic web application.
It is possible to use just the standard software pre-installed on many computers for this. Standard spreadsheet programs (e.g. Numbers) are ne. However there are some free, downloadable applications which will make parts of the task much easier. They are: TextWrangler (text editor) Firefox (web browser) Firebug (an add-on for Firefox)
TextWrangler
To download TextWrangler go to http://www.barebones.com/products/textwrangler/download.html
Drag the TextWrangler icon into the Applications folder in the window that opens on your screen.
From here you can run TextWrangler or drag it into the dock.
Click when prompted to agree to and install the program. When the process is complete you will be prompted to restart Firefox. You can then use it like any other web browser.
To launch Firebug, click on the picture of a bug in the bottom right-hand corner of the window. This will open a pane which allows you to inspect various elements of the website. To turn Firebug off again, either click on the bug or the red off button in the top right-hand corner of the Firebug pane, here:
You now have all the programs needed to build your semantic web application.
Data formats
To enable Exhibit to parse the data in the spreadsheet cells, some types of data will need careful formatting. As a general rule of thumb its a good idea to keep your spreadsheet data simple: while Exhibit can handle non-English characters and strange symbols (currency symbols, Word smart quotes, etc), there is no guarantee each individual web browser displaying your Exhibit page will support them properly. By keeping your data simple you ensure it can be rendered properly no matter what fonts or character sets the end users browsers have available. Even some fairly straightforward data types, such as dates and lists, have their own specic rules, described below.
Lists
Lists can be stored in a single spreadsheet cell using semicolons. When editing such a list it is important to use semicolons between each item, but not before the rst item or (more importantly) after the last. If a list ends in a semi-colon, Exhibit is likely to assume it must have an extra empty item on the end.
Dates
It is important you set your spreadsheet software to store dates in ISO 8601, or at least not reformat them to some other notation automatically. Some spreadsheets have in-built support for ISO 8601, while others seem not to. If your chosen spreadsheet insists on reformatting any column resembling a date, or if you encounter any trouble working with dates in Exhibit, set your column preferences for date columns to text, as in the example on the right.
Dont:
use quotes use commas or full stops/periods use exclamation or question marks use spaces or tabs begin a eld name with a digit
The example above is a valid spreadsheet, but the header row needs some work to make it comply with Exhibits rules about valid eld names. This is because the names in the header row are used as identiers for referencing the eld data as each row is displayed on an Exhibit web page. They must therefore be in a form compatible with standard programming identiers. Because these eld names rarely appear on screen in a nished Exhibit web page, it doesnt matter if they look more like something a computer would use rather than a human (because they are something a computer will use rather than a human!)
Good
Bad
The label
Exhibit has a handful of standard eld names that are treated with signicance by the software.
The most important eld name (and the only mandatory one) is label. Whatever your data is like, one of your spreadsheet columns must be named label. Data in the label column is treated by Exhibit as a name, and gets used whenever Exhibit needs to present a list records to the user. Exhibit insists every record in an Exhibit must have a label eld which means every row in our Victorian authors spreadsheet must have something lled out in the label column and the data in the label eld must also be unique across all records. Taking into account these requirements, the spreadsheet of Victorian authors can now be updated to look like this:
The header row has been updated to incorporate the rules for eld names outlined above. The only reliably unique column in our sample spreadsheet was major work so thats the once weve turned into a label. The above spreadsheet is now a valid Exhibit data structure, and we could easily build a faceted web page around it.
Multiple spreadsheets
This help sheet describes how to use Exhibit to link multiple sets of data, permitting structures to be created that avoid the integrity and editing problems caused by duplications. It follows on from the sheet called Structuring your data, and uses the same example spreadsheet of famous Victorian authors and works referred to in that document, which looks like this:
Adding types
When Exhibit works with more than one collection of data it requires a new standard eld to be added, type, which it uses to distinguish between records of each collection when they are loaded together into the small internal database it uses to populate an Exhibit web page. The rst spreadsheet has the type author. The second has the type work.
In the author spreadsheet, the works column no longer has book titles, but a list of codes separated by semi-colons. The published works spreadsheet has a new column named id with the same codes. These two columns bind the two spreadsheets together, linking authors with their published works. With the data split like this it no longer matters how many books we add for each author, as the authors details are only ever stored in one row. Furthermore, this split format makes it easy to add books with multiple authors, as the same book code can be added to the works column for more than one author.
Data modelling
This document is an introduction to data modelling for Exhibit web pages. It follows on from the sheet called Using multiple spreadsheets, and uses the same example spreadsheet of famous Victorian authors and works referred to in that document. Exhibit is actually quite forgiving when it comes to how you link your data (certainly a lot more forgiving than some software applications). Even if you make mistakes, it usually isnt fatal but if you know how youre likely to use a given collection of data, a little forethought on how its various parts are linked will make things a lot easier when actually building the Exhibit page. Ask any computer scientist and theyll tell you data modelling is more of an art than a science. There are some very comprehensive methodologies which purport to spit out perfectly formed data structures, but in truth the real world is just too messy for any one system or scheme to work 100% of the time. Luckily Exhibit can work wonders with even lightly modelled data: all thats required is a solid knowledge of the data being described, and a bit of common sense.If starting from scratch its a good idea to sketch your design on the back of an envelope or a whiteboard, like this: This Exhibit design has spreadsheets for author, work, theme and publisher. The author spreadsheet links to work through its works eld, work in turn links to both theme and publisher, meaning a given book can now be connected with a set list of themes and styles (romance, horror, etc, each crying some descriptive text) and a publisher. To do this the publisher and theme spreadsheets would include an id column (left off the rough diagram), the contents of which would be used by the publisher and theme columns inside work to form the link. This would translate into spreadsheets for author, work, publisher and theme like the example below. Here the author records point towards one or more work records, which in turn point off to publisher and theme records.
Note: It isnt strictly necessary to use the same name for a type and the column referring to it. In the examples
above, the eld publisher inside work points to records of type publisher in another spreadsheet. However the referral eld could easily have been called publisher_id or publisher_ref or published_by or any other name. Using consistent names, though, makes the spreadsheets more readable.
In the example above, to nd all the authors who wrote stories on a given theme (e.g. romance) wed have to navigate from author to work to theme to nd the connection, as author and theme are not immediately connected. When planning your data structures it is advisable to consider the types of relationships which would prove most useful to you, and ensure their linkage is not too onerous. You know your data better than anyone else, so you should know which relationships are of primary interest, and which secondary. If you can take this into account when modelling your data you will make the job of building your Exhibit that bit easier. That said, remember Exhibit is quite forgiving when it comes to how things are linked, and data modelling is a skill that gets better with practice. Below you can see some examples of how Ensemble has modelled complex data in the Educational Philosophers spreadsheets.
Checklist:
Heres a quick checklist of things to remember as you model your Exhibit data: Is your spreadsheet a basic grid, with the rst row being a list of column names? Does each of your spreadsheets have a label eld, with unique contents in each row for that column? Are your column names simple alphanumeric terms, with no punctuation, unusual characters or formatting? Do your spreadsheets have a type column? using more than one spreadsheet.) If you use a type column, are all the values in each cell identical? (Be careful (This is particularly important if
of capitalisation, particularly auto-formatting by the spreadsheet, and typos.) Are your dates in ISO8601 format? If you split your data over two or more spreadsheets, have you added an id column to each row so spreadsheets can reference each other?
If youre still having trouble with your spreadsheet headers, you could try using the Ensemble Spreadsheet Generator, described in the next help sheet. Alternatively, go straight on to Thinking about facets.
1. Access
To launch the spreadsheet generator, go to http://ensemble.ljmu.ac.uk/swf-spreadsheet-web/spreadsheet/intro and click Start Spreadsheet creation.
This page has a list of eight standard ways of describing data. Depending on the resources you are describing, you might want to use just one, or a mixture of several of these. If you have a lot of certain types of resources (e.g. images) already stored in les on your computer, you have the option of uploading these into the spreadsheet generator, so that some columns are lled in for you.
The most generic schema here is Dublin Core Vocabulary. If you arent sure which to use, start with this - you can always add to it later. Select this option, then click Select Metadata Elements.
This presents you with a list of elds, a description of the information they should contain, and a checkbox, like this:
If you want that item to appear in your spreadsheet, check it, and if not, leave it blank. Alternatively, select all - it wont matter if you dont ll in all the cells of your spreadsheet. Note: you must have one column called type. Then click Select Metadata Elements at the bottom of the page. You should now see the schema you selected in the left-hand panel on the screen. If you want to add more elements, just choose another schema and repeat the process.
: Tips
ple peo be s cri es de s plac OAF F be s d i nde escr O d expa E n G is a r ms e te RMS TE Cor C n D ub l i of D l is t
This will open a dialog box asking if you want to open or save your le. From here you can work with it like any other document.
5. Finally...
You will need to make two minor changes so that your spreadsheet is Exhibit-friendly. Firstly, change the name of the rst column from PID to label. Secondly, replace the colons in the headers with underscores, so that dc:creator becomes dc_creator, and so on. Once you have done this youre ready to enter your data.
Stuck?
For further help, go to http://ensemble.ljmu.ac.uk/swf-spreadsheet-web/spreadsheet/process for the online walkthrough.
We could, for example, add a new column to the work spreadsheet with a semi-colon separated list of countries the book was published in, or a keyword indicating if the book had illustrations. Likewise we could add a column to the publisher spreadsheet with a list of keywords denoting what types of book that publishing house dealt with (ction, non-ction, autobiography) As you know your data better than anyone else, you are in the best position to judge what types of data is likely to prove useful when sifting through it using Exhibits faceted browsing techniques. One word of caution though: be consistent! When building facets, Exhibit scans all the records of a given type compiling a list of all the unique values. This can lead to all manner of unintended consequences if youre not careful. Here we can see a couple of common mistakes. Firstly, the illustrated column has values of yes, no and true this is because A Study in Scarlet has been lled out incorrectly (or, at least, inconsistently with the rest of the data).
Second, The Sign of Four has its theme capitalised. The two terms detective and Detective will therefore be treated as separate options in any theme facet within Exhibit. You can trap these mistakes, and assess the usefulness (or otherwise) of the columns in your spreadsheet with regard to faceted browsing, using a tool called Babel. For more on this, see the help sheet of the same name.
Babel
Babel is a web tool which will convert your data from a variety of formats into JSON for use in your Exhibit. Note that if you converting Excel spreadsheets using Babel, you can only convert those in Excel 97-2003 format (.xls les). Babel will not work with .xlsx les created by Ofce 2007 or 2010, so you must save these in the older format before using it. For help with your spreadsheets, see the Basic Spreadsheets help sheet.
Choose the data is in some les on my computer. Click Browse to nd and upload your spreadsheet to the site. Click Upload and Preview to convert your data into JSON format. You should now see a page like this: Click Copy Raw Data.
Copy all the text in the window and paste it into a new text le. Give this le an name and the extension .js (e.g. mydata.js). You can now close this window and start editing your application.
Hint:
If you have more than one spreadsheet, you can use Babel to convert them all to JSON at once. However you might nd it best to process them individually at rst, to make checking for errors easier.
Parts of an Exhibit
This sheet explains the basic vocabulary of an Exhibit. Exhibits have three component parts: Views, Lenses and Facets. There are help sheets on each of these, with extra sheets for the more commonly used views. These areas are Facets. They allow users to sort and lter data. They are entirely optional you can have an Exhibit without them. For more on the different types of facets, see the help sheet of the same name.
The areas in boxes a r e Vi e w s . Yo u r Exhibit must have a view. Views provide a basic template for displaying your data, but you can style them with Lenses. There is more guidance given on Tile, Map and Timeline views in the relevant help sheets.
The circled areas are Lenses. Lenses display and style selected elements of your data. Using a lens enables you to choose which parts of your data you want the user to see, and style them accordingly. There is more about lenses in the help sheet of the same name.
Views
Views are various ways of displaying your data on the screen. In the workshop you will have the opportunity to experiment with a starter set of ve views. You can nd out more about the potential applications of each from the relevant sheet.
Tile View
This is the default view, which can be styled in many different ways. On the right are three examples of tile views used by Ensemble in Biology, Law, and Education Studies websites.
Tabular View
The tabular view is not so exible, although the appearance can be edited to t in with your website. The example below is taken from a module on project management, where live data tables are used to illustrate a static narrative. See more on the tabular view at http://simile-widgets.org/wiki/Exhibit/Tabular_View
Calendar View
The calendar view displays one-off events in a month-toview calendar. There are relatively few options for customising the appearance of the calendar.
If chronology is an important aspect of your data, you might wish to choose the basic timeline view (below) instead of the calendar. For more information on choosing between the two, see the sheet called Displaying data chronologically.
Map view
The map view allows you to display your data on a Google map. The example on the left, used for journalism students, maps news reports against seismic activity: the larger the bubble, the bigger the quake. Clicking on the bubble allows users to search news reports from the area, so students can see which are the major stories in earthquake zones.
More view options are available from http://www.simile-widgets.org/wiki/Reference_Documentation_for_Exhibit. Here you can also nd more information about customising the views. Some of these views and manipulations may require more advanced skills, whereas others may still be at the experimental stage.
Tile View
The Tile View is the default Exhibit view. You see a basic tile view in Babel when you click Upload and Preview to convert your Excel spreadsheet into a JSON le (for help with this process, see the help sheet called Babel). This will produce a page like this one: In order to include this view l in your Exhibit, you need to include the short expression
<div ex:role="view"></div>
in your html le. By default, this view shows all the items in your spreadsheet(s). Although this view is highly customizable, it may need some manipulation and styling to make it more useful. The commands listed at http:// www.simile-widgets.org/wiki/ Exhibit/Tile_View show a number of ways in which you can begin to style the Tile View. In order to fully customize the Tile view you will need to use a lens - see the help sheet called Lenses for this.
For alternative ways of visualizing this data, see the Displaying data chronologically sheet, where the same datasets are displayed on timelines.
Map View
If location is important to your data, you can use Exhibit to situate your information on a Google Map. In order to do this, you will need to make sure that your data has a column called latlng, with the latitude and longitude given in decimal degrees, and separated by a comma (e.g. for Manchester, this would be 53.48095,-2.23743). If you need assistance with the spreadsheet, see the sheet called Structuring your data for help. If you need to look up the latitude and longitude for your data, you may nd http://www.geonames.org useful. You will also need to include the Exhibit Map View extension and a short piece of html in your le. You can nd these at http://www.simile-widgets.org/wiki/Exhibit/Map_View.
The process
Start with a spreadsheet like the one on the right, which has a latlng column. Put this spreadsheet through Babel (see the help sheet called Babel for help with this)..... ....and save the .js le in the same folder as the html le, which should look like the one below.
label Chirk Lymm Sprint Lymm Olympic Harlech Grendon Wilmslow Keswick The Beaver The Little Beaver Coniston Deva Northwich Dambuster Triathlon Fearless Parbold
type Event Event Event Event Event Event Event Event Event Event Event Event Event Event Event
race latlng Sprint Triathlon 52.93614,-3.07147 Sprint Triathlon 53.38105,-2.47763 Olympic Triathlon 53.38105,-2.47763 Sprint Triathlon 52.86667,-4.1 Sprint Triathlon 52.233,-0.7 Sprint Triathlon 53.33333,-2.23333 Olympic Triathlon 54.59947,-3.13256 Middle Distance Triathlon52.88333,-0.78333 Olympic Triathlon 52.88333,-0.78333 Olympic Triathlon 54.36667,-3.06667 Olympic Triathlon 53.1936,-2.8710' Sprint Triathlon 53.333,-2.15 Olympic Triathlon 52.6667,-0.6667 Duathlon 53.05901,-3.19882 Duathlon 53.58333,-2.76667
The circled section is an optional colour coder, which takes information from the race column in the spreadsheet, and uses it display different coloured markers for different types of events on the map.
When you open the html le in your browser, you should see the data from your spreadsheet plotted onto the map. You can customize the map view in a number of ways, using the commands listed at http://www.simile-widgets.org/ wiki/Exhibit/Map_View.
The map view is best used in conjunction with facets (see the help sheet of the same name for assistance with these). For example, the map view can highlight geographical clusters of data, or show geographical shifts in data over time (e.g. where the habitat of a species progressively shrinks), provided suitable data is given in the spreadsheet.
The Earthquakes and the Media site (below) for jounalism students builds a map view into a highly customized Exhibit linking news reports and recent seismic activity.
The Braer Case Study Prototype (below) draws on authentic accident investigation documentation and publicly available reports of the accident. It has been designed to help students of Maritime Operations and Management understand and analyse the sequence of events leading up to the grounding of the ship. Information about the weather and the vessels status appears in the pop-up bubble when the map marker is clicked.
Exhibit has two views for displaying chronological data - the Calendar View and the Timeline View.
Calendar View
The calendar view is good for one-off events which all take place in the same year. The standard view is of one calendar month. To include a calendar in your page, you need to include the Exhibit calendar extension and a short piece of html text in your le. You can nd both of these at: http://www.simile-widgets.org/wiki/Exhibit/Calendar_View
In this calendar, extra information is displayed in the pop-up bubble to stop your calendar getting too crowded. To nd out more about how to do this, see the help sheet called Lenses.
Provided you have data in the correct format, you can make straightforward timeline with it. The spreadsheet below...
label Focus group DL online seminar PG research training Year 1 essay deadline day Year 2 essay deadline day Year 3 essay deadline day Exams start_date end_date 2011-06-01 2011-06-04 2011-06-07 2011-06-10 2011-06-13 2011-06-15 2011-06-18 2011-06-20 2011-06-24 comment The best attended of all the focus groups - Wedesday afternoons is a good time for future meetings.
A bit later than usual but unavoidable with all the bank holidays this year Too many bank holidays this year to start earlier.
...when put through Babel and combined with this short piece of html...
Note: You may have to make some minor adjustments for the timescale to appear exactly how you would like it. Some
of the ways in which you can customize the timeline at are shown at http://simile-widgets.org/wiki/Exhibit/Timeline_View. If you are condent editing your html and would like to experiment with your timeline further, there is more information at http://simile-widgets.org/wiki/Timeline.
Alternative visualizations of this data are shown on the Tile view sheet, where the same datasets are displayed in the default view.
Lenses
Although the View provides the basic template for displaying your data, lenses enable you to select which parts of your data you display and also allow you to style that appearance to your liking. To style a view with a lens, include the text <div ex:role=lens> .... </div> within your views html. The content of your lens goes in the place of the ... marks. At this point you can choose which parts of your data you wish to display. For example, the Educational Philosophers web pages shown below all load the same data, but use different combinations of views and lenses to create different displays on each page, as follows: For the reading list, this part of the html orders the items by author, then date and is contained within the view:
This part populates the lens with author, date, title and publication details of the item. This is the more complex html text for the timeline view and the associated lens:
As you can see, the command ex:content=.header_of_a_spreadsheet_column can be used to populate the lens with data from a column from one of the spreadsheets. It can then be styled with html. For more on structuring the data, see the help sheets Structuring your data, Multiple spreadsheets and Data modelling.
Facets
Facets are the parts of your Exhibit which allow users to select and lter the data they see. Facets are completely optional - you can have a perfectly functioning Exhibit page without them. However, if you do want to allow users to sort and lter data, there are various ways in which you can do it. This help sheet shows you how to include a basic range of facets: the Text Search facet; the List facet; the Tag Cloud facet and the Numeric Range facet. There are some other types, which are slightly more complicated to create, which are listed at http://www.simile-widgets.org/wiki/Reference_Documentation_for_Exhibit.
Note:
You can include multiple facets in your web page, so that users can sort across multiple criteria at once. When selections are made in one facet, the others automatically update so that they only display data which ts those criteria. Removing those criteria will show all the data again.
List Facet
The list facet shown on the left is the default type of facet. To include a list facet in your web page, include the following text in your html document: <div ex:role="facet" ex:expression=".a_spreadsheet_ column_header_here"></div> replacing a_spreadsheet_column_here with the heading of the column you would like to search by. This header must be preceded by a full stop and enclosed in double quotation marks as shown here. There are some options for customising the list facet, shown at http://simile-widgets.org/wiki/Exhibit/List_Facet. In this example, the html text below creates the facet shown on the left, taking data from spreadsheet columns headed group and nationality respectively.
takes the data from the spreadsheet column headed undergraduates (below left) to create the facet shown below. There are some options for customising the Numeric Range facet, shown at http://simile-widgets.org/wiki/ Exhibit/Numeric_Range_Facet
Contact Details
The Ensemble Project c/o Professor Patrick Carmichael Faculty of Education, Community and Leisure Liverpool John Moores University Barkhill Road Liverpool Merseyside, L17 6BD Tel: 0151 231 4633 Email: w.p.carmichael@ljmu.ac.uk