How to search LBT

From London Book Trades
Jump to navigation Jump to search

Simple searches

You can use the MediaWiki Search box on any LBT page to do a simple search. It is located in the upper right corner of every page with the grey legend "Search London Book Trades".

Categories and Properties

LBT has a number of extra features behind the scenes which allow complex searches to be made. For example, you could use the Semantic MediaWiki (SMW) search to find all female bookbinders working between 1700 and 1750 with parents who were also book binders.

You can look at the list of available categories for complex searches here: Special:Categories. If you click on one of these categories, it will create a display of all the records which are tagged with that category.

You can do the same with Special:Properties. For example, Birth date of type Date (1,843 uses) tells you that the property name is "Birth date" and that 1,843 people pages have values for that property. Clicking on the Property will produce a list of all the people for whom a date of birth is recorded. Not all of the Properties will produce useful output when clicked in this way.

Semantic searches

LBT is built using Semantic MediaWiki which means that complex searches can be constructed using these Categories and Properties. You can see some examples on this page: Semantic query examples. You will see that creating the instructions for these searches and their output is somewhat complicated.

Semantic searches are available to anyone using the page Special:Ask:

We will now explain how to use this page to build moderately complicated searches.

Building a semantic search

Add some categories

On the Special:Ask page, the input box labelled Condition is where we put the things we want to search for. We will use the LBT Category 'Female'. The Semantic MediaWiki syntax requires this to have a special markup: type it exactly like this:

[[Category:Female]]

If you now click on the Find Results tab, you will see a table of the first 50 of several thousand females listed in LBT. Each line is a link which you can click to go to see her own specific page.

If you now add a second category, SMW will search and display results which match both categories (logical AND). Now enter

[[Category:Female]] [[Category:Master]]
and click on Find Results. (It may need a second click to refresh the search data.) You will now see a list of the first 50 females in the LBT who were Masters who engaged or freed Apprentices.

Add some properties

We can reduce the list of Company female masters by adding Death date properties to the list of search conditions. We will look for female masters who died during the eighteenth century. This requires using the appropriate SMW notation for the query:

[[Category:Female]] 
[[Category:Master]]
[[Death date::>1700]]
[[Death date::<1800]]

Note that Properties require two colons ('::') to distinguish them from Categories and that they can use relational operators (less than, more than, etc.). Note also that there are relatively few dates of birth in the database, especially for women.

Changing the output details

We can modify the information which SMW offers as output for queries by adding selection criteria to the Printout selection box.

For our female masters, we can ask for their first names and last names, for example, and for their date of birth and date of death. Add the following code into the Printout selection box:

?Firstname
?Lastname
?Birth date
?Death date

This produces a table with extra columns for each of the four selection criteria.

The Special:Properties page shows further properties which can be used as selection criteria for output.

Downloading search results

You might want to download search results to use them in a spreadsheet. In the query just done, it would be useful to have the names and dates in separate columns in the spreadsheet. To download the data from the table, click on the CSV button in the row of buttons on the right above the output table. 'CSV' stands for 'comma-separated values'. This is a standard format for loading into spreadsheets.

Note that the current size of the result set (20, 50, 100, etc) will apply also to the number of records in what you download. For large exports, change the limit to "Show 500 results per page" (or at least a number greater than your result set) so that your downloads are complete. If you are downloading more than 500 records, you'll need to advance to the next portion of the result set and then download those records, etc.

More help

Semantic_query_examples
This page contains a few worked examples of complex queries for LBT data which you could use to build your own searches. Note that you will have to break the combined queries illustrated on this page into the selection criteria for the left hand textbox ("Condition") and the output columns you want for the right hand text box ("Printout selection") on the Semantic search page.
Help:Semantic_search
This is the official help page for semantic searching.
Note that it is also shows examples of in-line searching which is not available on this website.
SMW User Manual
The SMW User Manual also has information which might be of help.