 Hello and welcome to this tutorial. My name is Chris Langley. I teach history at Newman University and I'm the co-director on the project Mapping the Scottish Reformation. Now Mapping the Scottish Reformation takes information from manuscripts held in the National Records at Scotland, puts them into this service wiki data that you're going to find out about today and then makes that data accessible to non-specialists in easy-to-use formats. And what I want to show you today is how to start using this resource wiki data with this 88 million items as you can see and to try to not only understand what's on there but how you can extract even more information and to run your own queries and to answer the questions that you have. So here we are we're on wiki data right now and I'm logged in and I want to show you one of the people or the types of people that we're interested in on Mapping the Scottish Reformation. So there's a quite spicy minister in Midlothian in the 17th century by the name of Gideon Penman and I want to show you Gideon Penman for a number of reasons. Now you can watch other tutorials that explain wiki data and how they split up entities but the key thing we need to know here is that individuals, places, even concepts on wiki data can be split into properties and you can see here that the instance of he's given this P31 number, gender is a P21 number, occupation, ministers are interested in our project P106, educated at is P69 and then you can see each answer has a corresponding item which is a key number. Okay so you can see that huge key number for the University of Edinburgh and for minister there's another key number and so on and so on. So the power of wiki data lies in the fact that everything is encoded like this. If something has a P number, if something has a Q number, if something even has a qualifier underneath it like the references that you can see here whatever's in that schema you can search for and you don't need to know the answer before you start and that's the real power of wiki data that's the reason we use it on mapping the Scottish Reformation. So how do you eke out this power? Well the key is the wiki data query service and it's on this left hand side navigation menu here and if I just open that in a new tab and keep Gideon Penman open for you you'll see what comes up this kind of dauntingly open white space. Now the wiki data query service requires some working knowledge of the Sparkle language but I'm here to tell you that it's very easy to learn at least parts of it. Okay so what I'd like to do is to look for other ministers like Gideon Penman and where they were educated in particular and if we go back to my tab with Penman you can see you already know he's a minister and we know he was educated at the University of Edinburgh but how similar is he to other ministers? So let's see if we can do this on the wiki data query service. So before we do anything we need to tell wiki data what we're looking for what we want to churn out at the end and because I'm looking for ministers I'm gonna write that I'm looking for ministers that's my label. Now I need to tell the query service where I'm going to look for this data where is it going to run this query so if we put where and then the curly brackets there and then we tell it that we're going to look for ministers it's everything about our minister here and we need to know he's we need to be able to filter the millions of people that are on wiki data just to those people who have the occupation minister and you can see here that occupation of minister is P106 so I'm going to put in WDT P106 when I press space and hover over it I can just check that I'm right yes that's occupation and now I can put WD and now I want to look for all the ministers and they there's minister if I hover over it there's this huge great queue number so what I can do is I can just highlight that go back into my query put the queue number in hover over it and I know I'm looking for ministers put a false stop there just to say that I finished that line that's really important put another little squiggly bracket at the end and ask it to run happy days there's over 5000 ministers on wiki data and that's ministers who have the religious occupation and christianity of the minister not a political minister so that's wonderful and what a brilliant load of results I could I can leave now well unfortunately I can't because this minister this queues 8027 I don't know who the hell this guy is so we need to find out who he was and to do that we need to ask wiki data to convert that item number into a human readable label and the way we do that is to use the inbuilt wiki data labelling service and what's wonderful here is I can just search on the examples on the wiki data query service for and just crib lines of code that people have written before and the one that I always keep on on my on my clipboard to copy and paste is the query service so if I just right click this one and just show you what I'm talking about this is the line here this service and there are a number of services on wiki data that you can use that kind of make your life a little easier so if I go back to my query now I copied that give it that I can now put the service in and if I go up here what I need to do is tell it to give me the human label so I just write minister and this is the really key bit capital l label is it going to work yes it is there you go so as well as minister in this column in our results now we have the minister label as well and you can see there are absolutely loads of them so that's really an opening gambit but of course I said to you I want to find out where these guys were educated so you can try and do that so I want to find out something else about our minister now so question mark minister and then I'm going to look for a property but I'm not going to go back to that giddy impendement file because I can do something else you might have seen the thing float up at the bottom of the screen to press control space and I am going to search here by keyword for that property and there it is educated down just to make sure we're right p69 we have educated at for giddy impendement p69 so I've got p69 there and I want p69 to do something else for me because that's the guy's uh alma mater so I'm just going to put there alma and of course I want it to come up in my results so alma needs to go at the top and then I can draw through this again and it shows me now another another column in my results here on the right hand side you can see they're not human readable again so what I can do at the top is just tell it to give me alma mater label hello there it is alma mater label so I can see the exact university not just a key number for the item of the university so things are getting kind of interesting here but let's go another layer down and find out something else about our minister so question mark minister I want to know where this guy lives because there's ministers there's 1977 ministers on here some of which um aren't of interest to me in my capacity working in mapping the Scottish Reformation so what I want to do now is to find out where these people live so what I want to do is if I put in the WDT I can press control space and I want to look where they live with residents and if we go back to Gideon at the top here my example you can see residents there is P551 and we've got P511 but of course that's the minister's residence so now I want to bring this out as another column so I can say residents lovely put it at the top so it comes out as an extra column I'll ask it to execute the query and to run the thing and you can see there it goes again you're learning the lessons here already residents is in one of those terrible queue numbers so on I need a do press type in label and it tells me where they live as well and you'll notice now that a lot of the people who you see in front of you were educated and lived in Scotland the reason for this is because in mapping the Scottish Reformation this is how we've structured our data to use Alma Mater residents and minister as an occupation so we're starting to filter through to our results now even though we've never seen all these results together we've just been pulling them out of manuscripts but now with wiki data we can see all of them coming up so there you go that's all of the results there you can see the full wiki data entry on the left hand side but you get these these nice kind of labeled results as well on this table and you can change what your your results look like on the side here and table reading is the default option but what if I want some more fun with this well let's find out more about where these people live so if we look up residents for example we can ask wiki data to pull the coordinates of those residences so if I put coordinate location onto here you can see there p625 and I can add this as an extra element in my query at the top so it's going to be a new column and I can run the query again and you can see you put some coordinates on there too and that's lovely if you can make maps in your head but now you'll see when you click on the view options that map has appeared and when map appears you can see all of them and you can drill into these guys a little bit more you can see them all over the place a lot of them in Scotland this is the part of Scotland we're exploring in our project and you can see it's a nice little label there etc so that's a really simple way to do that but there are some other kind of modifications here that I'd really like to show you and in particular I want to show you how to refine some of these labels here and because as you can see it's got full screen the labels look a little bit ugly so what I want to do is just to show you some of the things about how to format those labels so you can see on that top line we have what we want and the query to pull out for us but if we press enter and we leave that top line free we can create some defaults and you can see if I put a hashtag it allows me to automatically pick what view I want to default to in the search results so if I put default view map next time I press the query it will should yes automatically show it me as a map not a table and of course if you want any other sort of view you can just put the hashtag in again and it will show you what to what to do so you can have it as a timeline or an image grid or a map or whatever so we'll keep it as map so that's that's what our default queries but remember still these labels don't look that great you know nobody wants to see those coordinates if you've got a an external user and we've been creating a lot of mock-ups and we've been really aware that our users don't want to see those those bits extraneous information they just want the data that they've come for so to remove that coordinate what we need to do is we need to ask wiki data to hide some things and be a little bit sneaky about it so on that top line by default view I need to tell it what to hide and on this occasion what I want to do is to hide um I want to hide those coordinates so I'm going to put in speechmarks hide it would help it was in lowercase hide colon and then I'm going to tell it which things I want it to hide on the label so coordinates is definitely definitely one of them no if I finish that off with the square bracket and the curly bracket you see I'll run the query again it will default to the map okay it'll default to the map and I'll zoom in on some of these guys that I'm really interested in you can see we don't have that that nasty that nasty coordinate now so thank you for watching this tutorial hopefully it's giving you a sense of some of the ways you can explore wiki data how you can query that data but also how you can refine some of the ways in which wiki data results present themselves to you but also to your users as well so thank you very much for for watching please stay tuned for more updates from our project mapping the Scottish Reformation and please enjoy using the power of wiki data