 So, it's probably time to go into the query session, isn't it now, I think? So, basically, what I was going to do was try and get everyone to sort of run through building a query from scratch together so that we can sort of understand how it works. And I guess, for people who know Sparkle already a little bit, there'll be some bits that are a bit, you know, maybe a little bit slow for a second, but we've still got some wiki-data-specific commands in there. So, the first thing to do is actually, we just want everyone to open up the wiki-data query service. So, you can normally just Google wiki-data query service, and that should hopefully get you the first result being this one here. And that is where you want to land. So, just let everyone sort of get there, you can type it in directly if you want. So, okay, so if everyone's got here, we're going to start building our query in a second. But basically, one of the starting points of building a query, I am going to try and do female chemists. I was going to do female scientists, but it was going to be a little bit broad and there's a few difficulties. So, a nice simple one is going to be female chemists. And I'm going to use my sort of, like, important result as my way of figuring out what the query should be. So I'm going to look up Marie Curie on wiki-data, so in that case I'm just Googling it. But a common way actually to get to the right item is to go through wikipedia. Because you see, well, actually, of course, she's, actually, there we go, she's there. So, you can just go straight to wiki-data, but one thing to remember is you can always get there by getting to the page knowing it's the right person. And then on the side there, sorry if you didn't see that, there was a little link on the side and there's always, there's always that little link on the left-hand side to get to the wiki-data item. So one way or another, we end up here, and now for our query, I'm going to scroll down and I'm just looking for occupation to see how it's been described. In fact, I'm just going to use a search here. Okay. So you can see here, she's got occupation, there's several values. She was a physicist, a chemist, and a university teacher, among other things. But this is the relationship I'm looking for. I'm looking for, I want to find people who've got occupation chemist and who are also female. So that's going to be the starting point of our query. And if you'll see this, so we can see that when I hover over it gives you a name. Occupation is a number, P106. A chemist is an item, another item of wiki-data, and it's got a Q number. But I'm going to go here and we're going to begin constructing the query. So if everyone could just copy this as I'm writing it, I'm going to just write the basic sort of structure of the query first. And then we're going to sort of take it from there. So the first line would be this select item with a question mark. Maybe I should go a bit bigger. We might be able to zoom in a little bit. Yeah, that's a bit better and I think I'll get rid of this for a moment. Okay, so select item, that's your first line that you want. And basically just press enter for a second and on the next line we're going to write where, and I'll explain what this all means a bit more afterwards. And we're going to do an open squiggly bracket like that. And then another squiggly bracket closed some way below. It doesn't really matter where. So this is the basic structure of your sparkle query. Select is telling you what you actually want to see back in your query. And that's going to basically relate to our columns that we're going to get. The where is where we're going to define what the relationships are that are going to define our query. Now, this is just a name that you can make up because this is what I'm going to call my things in my query. And I'm actually going to change it to person. So it's a bit more descriptive because we're looking for chemists. So we're going to start with our first line of actual query now. And that is what we're basically going to go for is we wanted this person that we've defined here with question mark person. We want them to have, and I'm just going to write this in natural language first, occupation of a chemist. So that's what we're looking for. This won't work in our query, but I just want to show you just so that we can see what we're essentially doing. So occupation, to actually put this property in, we're going to need this little prefix. And for now, you just say, okay, that's what I need to do to define a property, which is WDT colon. Now, this basically is the simplest way to say occupation something or date of birth something, and once you've done this, we're going to use our first Wikidata query service trick. And we're going to press control and space at the same time. Oops, I did not do that right. See what I've got to do back here. So control and space, and you should see type, it type of search to find an entity here. And I'm going to type occupation. And as you can see, it has come up with the property. It knows I'm looking for properties because of the WDT first. And if I select that, you can see what it's done. It's replaced it with the P106, which is what it needs to know. And if I hover over that, now for the occupation, now you want to say chemist. And just like we had WDT to just talk about a property, to talk about a value now, or an actual item rather, we type WD and now control space will work for finding items. And in this case, I'm looking for the Wikidata item for the concept chemist. And you see that's come up with this Q number, which I think, is that work for everyone? You can find that search. Now if we, what we do is we put a full stop at the end, because it's like a state, this is like a sort of a line and it's used to put a full stop at the end of a sentence sort of thing. Now I'm going to, and have you got that 593644? Double D codon. Now you should be able to run this query when you've got that in. If you've run your list, have you got a set of results that looks like this? We can see the major problem with this. It's true results. And if I click on that, I've got, and now we're not filtering to say females yet, so I've ended up with a male chemist here. But you can see I do have a list of chemists. It's just that I can't read what their names are. And of course what we want is their labels. Now Sparkle has built in ways of getting labels which will work across all services, things using Sparkle. But Wikidata has a label service which is particularly useful. So what we're going to do, and this might be a little bit awkward for without the control space because we have to do control space here in a blank space underneath it. And what we're looking for, there's loads of ready-made options here that might be useful. The one we're actually looking for is label. There's label service. And if you want, you can even type label. But we need to have this label service in. Now at the moment, that doesn't do anything. It just sits there. And the only rule is it kind of has to be within your where area inside the square brackets. But we're going to type person label with a capital L in our select area. So I've just added that on. And basically the label service will mean that if you add a capital L label to the end of any item that you've selected, you'll get its label. And you'll see what I mean with this. So we'll run the query. And actually we'll probably actually filter these results down a little bit to a female et cetera so it runs a bit more quickly. But I'll just let that run and we'll just see what that, there we go. So you see what we're left with now? We've now got two columns because we were selecting two things and we've got the item and the label. And so these are all the sort of names. And at the moment, the reason they're in English is because my label service is actually set to auto language first. So that'll come from, but I've then got English if it can't find out the automatic. But I could happily just change this for like Arabic or any other language. And it would automatically be saying, I'm looking for the Arabic labels, with an English full back. But in case you're adding the two letters. Exactly. And in fact, we'll do that just for our next little set results. That's Arabic with an English full back at the moment, AR, colon, EN. But what we're gonna do is we need to filter this further. So we're gonna do a new statement and basically in Sparkle, every new line that you're making is like filtering down further and further to smaller set. And we want the person to have, this time we're using the same syntax but we're looking for gender is the property that we're looking for. So I've written the WDT and I've done my control space but it's P21 is the ultimate thing we end up with. So the person has to have a P21, which is, and the item I'm looking for this time is female. And it says here, the description tells me it's a human who is female, perfect as opposed to female organism and some of these other things. But that's the one we're looking for. It's a ridiculously long Q number for female and male is also one, just one other one before that, you know, it's just because they messed up a little bit in the beginning and had an original concept of man and female, which needed replacing. So yeah, this is quite an exercise in memorizing numbers of the control space and up. I'll put another full stop on the end. And now when we run this, which some of you may have done already. Okay, so we're basically, you'll notice here that some of my results are in Arabic here. We are filtered down to women. These look like all women's names, the ones that are in English. You can see that basically in terms of Arabic labels, you know, where there's sporadically there, but we're still missing quite a lot of Arabic labels clearly for these women. I'm going to just change that back to English for a moment. Just thought we've gone at simple. Yeah. Yeah, I mean, basically what we've done there is if I was just to say Arabic only, it makes it a little bit clearer what's going on. So these are literally this one here, this item, no one has yet added the Arabic label. And if I go to this person, you'll see, okay, all into languages. And you can see that her name has been added in all these different languages, but not in, you can see that it's not in this language, it's not in Persian here, not in Hebrew. But in Tamil language, she actually does have a label there. So it's basically a matter of somebody who speaks Arabic comes along and goes, oh, yeah, I know her name is, you know, and that's basically it. And the story so far is that we've been, we've been defining our query with these lines here. And we've got the person has to have an occupation of chemists and the person has to have a gender, which is female. So we're so far, we've got to female chemists and we are selecting, these are defining what columns we're getting. And you can see that's the person, which is her actual Wikipedia to write them. And that's the label, which at the moment we've got running in Arabic. And I'm just changing that back to English for a moment. So effectively, what we're gonna do now is we've got female chemists. Now what I'd like to do is this is a little bit boring, this result set. I would like to see an image for whoever we can get an image for. So I'm gonna now say another line, exactly the same as the last ones that we've done. So WDT, and this time I'm looking for an image. And that's the one I'm actually looking for, image or relevant illustration of the subject, P18. Now the difference is here, and I'm gonna almost put a space here to show you the difference here. The first two lines I actually specified what I wanted this value at the end to be. In this case, I'm not gonna specify it. I need to just call it something because I'm not saying I want the image or all the results to have this exact image. I'm just saying what I want to know what the image is. So you put it in as a question mark. Now if I go up here and put image, nothing will show unless I actually select it, but it's not gonna sort of show me a new column with images or anything. But what I should have now is if I play this, you can see I've got a new column for the image. And so I've now got my personal label and the image and that's an image from Commons. And I'm just gonna show you that here, we have, it's a bit awkward the way my screen's jumping up and down there, but if you can see there that you have some display options after you've run your query. Now that we've got images, we've got our first few options coming up and the image grid is the one I wanna just quickly show you now. So now we're already, and it will take a moment to load them all up, but already with a simple query, we've already got something a bit prettiest to look at. It's like an image grid of female chemists. So there we go. So can you just spell that out again? Yes, so where it was was here and effectively it's that's got your default view. I'm gonna mine it just like keep on, you won't let me stay there right in the middle, but let me just browse zoom a little bit maybe. Okay, so yeah, the default view is table and that's where we started and the other ones are gonna come available. So there's loads of other visualizations here and what I wanna do is just take you through getting some of the, I wanna make the timeline option come to life and I wanna make the map option come to life. So what we're gonna do is, well, to get some kind of meaningful date to having a timeline, the birth date is the logical thing for people. So I want my person just like before to have this and I'm gonna do a control space. Oops, keep on doing that. Oops, lost it completely. Okay, so I'm gonna do a, what I'm looking for this time is date of birth and if I just type in any order, it should be able to find that. So p569 is our date of birth property. Yes, sure, yeah. These WDPP so long, identify them. I'm assuming you covered this before, so I do a follow up. Oh yeah, yeah, but basically the deal is is that we're using this prefix as the way of describing a wiki data property. So effectively all the descriptive properties like place of birth, date of birth, your image, your, you know, your height, all the properties we use to describe the data all have a unique P number and that's our identifier on wiki data. I must, I'm a very old serial. Well, they are sort of persistent. I'll give you an example here. Like just so the Q numbers are the actual concepts. So we have this is Joanna Budwig, that's her Q number always will be. But here are the properties used to describe her and you can see instance of is P31 and always will be, meaning what is it? Image is P18 and always will be. So they're just the same as the Q numbers in a way, but for uniquely identifying the properties and that's basically, and the prefix here, the WDT is, it gives us, it's what's called the truthy or simple version of the property and it just gives us a very simple answer to a question and basically it's the one you always want to use in the beginning is WDT colon and after that you use a slightly more complicated version which allows you to get deeper into it and get into the qualifiers and references. But for now, we're going to keep with the simple version because it does 99% of everything you need anyway. So what I want to do is I'll call this just birth dates. We're not allowed spaces. I mean, you can call these what you like. I've just done birth date with a capital D there. But as with everything, we're not really gonna, we're not gonna see a new column of results unless we add it to the top and bear in mind the visualization options can't see that data unless we select it. So as far as it's concerned, there is no date of birth until it's been selected to visualize it. So I'm gonna press play on that and we've now got a new column with the date of birth but I'm gonna go to table now and see what other options and now I've got timeline available. So now we have a timeline and you can see I can, this is the simple built in timeline for the query service. We'll show you shortly a histopedia version which is a little bit nicer. But already you can see the sort of power with a few lines. We've got timelines and image grids. These can all be shared. Yes, and this is one of the things I was gonna show you in a second is the fact that you can see that we have, on the left we've got one of these options just to share a link. Now what that'll be is that will share a link just to this page with the query visible and everything else. But after you've run the query, you've got these little options down here at the top and one of the great ones is short URL to results. And if I click on that one, this actually gives me a sort of a full page version of it. So it's a link that'll get someone just to the query results. And one little thing to add there, if I was to share that query, you'll see what it does over here. So this is my short URL to the results and you see I get a full screen. They even got a little search filter up there. But it's not in my timeline view. And so how do we choose which view we actually want for this? And the way we do that is by putting in a line with a comment. Now comments always come after the hash symbol. And basically you'll see it's actually come up with a whole load of options here, which is what it's looking for to know. And if I said default view timeline, that now knows that when I click run, that's the view that it wants. And likewise, now that I've done that, if I click short URL to result, that will be to the timeline or whatever view I've chosen. Okay, so we're just gonna move on now to get, is everyone okay with that so far? Any questions or anything? We're just going to do one last thing here, which is that we wanna get a map of where they were born. So we're looking to get a map of where all these different chemists were born. So we're gonna say the person has, and it's the same syntax again, but we're gonna say place of birth this time, which is a P19. And I'm going to say this is called just birthplace. Now, if I type birthplace here and I try and select this new birthplace, what I'll get is I will get the wiki data column with the wiki data item numbers for these birthplaces, like London, it will come up as Q42 and it will be a list of Q numbers. And just like I've done here with person label, it's actually what I'm really interested in is the birthplace label. So I've put the capital L label on the end. And if I just run that a second, actually, I'm gonna take off this default view timeline for a second as well. So I'm just gonna press run on that. Okay, so look, you see my new column here? I've got birthplace on the end, Nashville, et cetera, et cetera. I don't know why someone's got, I know that's not two different birthplace, that's fine. Now the problem is, you'll notice here, the map has not yet come to life. So we know where they were born, the query itself doesn't actually know where those places are yet on a globe. So all we need to do is use this, this is like the magic of sparkle is that you'll kind of, you'll find connections to things and you can really connect it to any other bit of data once you know the syntax. And so what we, so far, everything we've been finding out is about the person. But this time, we wanna find something out about the birthplace because we know there is this birthplace, we've got that now, but we want that birthplace, we want the coordinates of that birthplace and that's where we use the property coordinates location. And I'm gonna say coordinates. Now that one line there is kind of a magic of sparkle because we've said the birthplace is connected to the person and then we're saying that from that birthplace, we're connecting to the coordinates. And of course, that sort of chain of events could go on as long as you like. I'm gonna now select those coordinates and bear in mind, if I didn't care about actually seeing the birthplace itself in my columns, I could remove that, it wouldn't matter. We've defined how to get to the coordinates. So I'll just, I'll click play on that. And once you've copied that in there, you should be able to select a map and that's what we see. So we've got a map of the birthplaces of the female chemists in wiki data. So already with a very simple few definition lines, and you see we've only used the same thing every time. We've used WDT property, WD item or a variable we're looking for. And we've ended up with quite a rich map. And if you click on one of these dots, you'll see it pops up with a little card and a nice, a very nice thing to embed. Now one thing I'd like to point out just at this second here. So we've actually, we've kind of got to the objective that I was looking for that we've, we've now learned how to basically how to connect, how to find the data we're looking for. Because what we're basically doing is we're saying with every new line, we're saying it has to have this data. We actually really don't want to be doing that. The other issue on a map is that you're going to be seeing lots of points overlaid and potentially if plenty of them are born in London, you're going to see one dot in London because there's one centroid unless you, unless you find out which borough they were born in and that starts to divide off. I've just put that option just to quickly, everyone just copies that because the key thing is normally with an image, you really don't want to miss the result just because they don't have an image. And what you'll notice is you've got the count of results here. It said my last count was 173 results. If I run that again, I'm now up to 434 results in one fell swoop because the image condition is now taken away. And what you'll find is actually, to be quite honest, this will be a logical thing to do in this query. Say, you know what, I want this data, but only if it's there. I don't want to miss results if it's not. Put it around all of them. Now, basically I'm doing these around individual lines and it's a great way of using optional just to say look, this thing, I want it to be optional. And what it will amount to is you'll have occasional blank fields here which you never have without the optional. But basically that's the key to getting the extra results that we're missing. One little thing here is that this little thing is a bit of a combo. It goes together, doesn't it? We've got the person's place of birth and then we've got the place of birth coordinates. So with this one, if I wanted to make this optional, then I would actually wrap it around the whole double line in this case. Now, I was going to guess that this relationship between place and co-ordinate which could be quite complicated would be wrapped up in a service. Now, I've not seen the service thing before and I thought, oh, that's really cool. That's doing something that can be quite complicated. Yes, yeah. So why is there a place there? Well, there actually is, but it's for, the issue is it's for, like in this case, because there's the simple coordinates of, this p65 property is always the coordinates for anything. So it can be for a city or be classed as a center point. But then the main thing is, is that you actually, they have this service for working with coordinates and that's how you do queries of things that are in a surrounding area or in a boundary box. So you can do a query for what's within 10 kilometers of us, anything, in a radius and you bring it up on a map and you'll see a big circle of the dots. For that, you do use the around service which has got great ways of sort of. I know that to do things like saying, it's in the UK if it says it's born in Edinburgh. Well, that's normally something that you have to define yourself in your query but you can find those relationships because you're saying, look, I want a player's person who was born in a place and that place, I want it to be in Edinburgh or in Scotland or whatever is your criteria. So it's more of a connectivity thing but I have to say, this is where you want to explore here is in the example section and you'll see there's some really cool examples. It's kind of basically where you should just go and try and get inspiration for what you can do. And if you look at sort of like, let's have a look, I just typed, yeah, distance or within or something like that. Okay, airports within 100 kilometers of Berlin as it happens or places within one kilometer of the Empire States building. I'm just going to run that query and we'll see. So there we go and I'm just going to put that on a map and we'll see that's the result of this but it just gives you a little place to start if you want to look at how the label service works and I'll just show you that on a map quickly. So that's you see, that's basically what you've ended up with as you would expect a bunch of dots held within that circle. So really cool, I mean that's like some of the location based of the queries, you can do it as unbelievable. But essentially, that's the major, I mean what we've gone over now, that can write like almost such a whole massive range of queries, you know, like just go to an item. So I want to find, oh, I want to find cats, go to the page of a famous cat. Oh, how was he described? Right, it's an instance of cat. So I'll put that in my query. I want my thing to be WDT P31 cat and that's basically it. So what I would like to do, we've actually got like about 13 minutes or 13, 15 minutes left, I actually think that we've got all the skills here to actually just try and construct a query of our own here. Like just come up with something you're interested in and try to find the WikiData item for that thing. Like I just gave the example of cats but let's say that I was looking for my query, I wanted it to be planets. So I look up Mars, fourth planet from the sun. Okay, how do we know that's a planet and it's got, okay, instance of inner planet of a solar system. So maybe that's too specific for me but maybe I'm all right with that. But yeah, this is what I'd encourage you to do now. Like you can use anything here. Like say here, look, I've got part of the solar system. So if I was to go back here and say I wonder what other stuff is part of that, I'll delete all of these. I'm going to delete all of those. I'm left with the basic structure again and I'll say I'm looking for the item and I want the items label and I want the item to be WDT part of WD colon the solar system. So you see what I've done there. I just looked at a statement on the page and now I'm putting that into my query and when I type, there we go, I've got a list of things which are part of the solar system according to that. So that's the process. So there's about 10 minutes and I just would love it if everyone was able to think, okay, let me find a person or a thing I'm interested in. Maybe a building, might be a place, might be a planet, might be a concept, a mathematical formula or something like that. Just try and find the wiki data item that you would like your list to include and try and figure out how you would get a list of those things. The other thing is the examples section at the top of the wiki data query service is a good place to start off. Absolutely. Look, I mean, if you type a search there, I mean, I've got cats, that's that, that's come up with a few, but that's obviously they were right at the top. But if you were to type something you're interested in, okay, buildings in more than one country, some of these, when you open them up, are going to be more advanced queries. Something like that, places within one kilometer of the Empire State Building, you could easily change the Empire State Building. Absolutely true. Something local, I don't know. Yeah, he's absolutely, that's the beauty of modification here, because look, he's saying there, look, go to the query, I've hovered over that and I can find that that's the Empire State Building. Slightly different syntax that we were using because you can see it appeared first, basically because we're saying the Empire State Building needs to have a location of this location, and it's sort of just finding out what the location of it is. But you could change this to something else and we'll say, let's make that instead of the London Eye maybe. Yeah. And now I'll click play and with that one simple change, we should on our map be able to see things much more clearly. That is indeed the London Eye. So you see the idea and we can change the radius as well. If we look in here in that query, they had another little bit that was saying what the distance is and you see it's got radius is one, one of the label service parameters. So yeah, have a fiddle around, come up with any kind of query, either a modified one or if you're feeling really brave, go from scratch and try and build something. But basically, yeah, and just like holler as soon as you need a bit of advice about anything. But it was a challenge for you. Yes. Yes. The secrets on Facebook. Interesting, interesting. So we're basically looking for all the political parties in the world and we want to count up their members. So I guess the first thing is we need to firstly look up, sorry, I'll just look up the conservative or some party here. Is this something that's... Absolutely true. I mean, we know that this data is nowhere near complete because there is a huge project underway that Ewan was mentioning there. There's this every politician project and it's a huge initiative to try to get the data about every single, you know, politician, member of parliament across all countries described, you know, in terms of the term that they served and what's going on because it's considered such vital knowledge for people to be able to access. But it is possible. One thing we didn't go into here is any of the counting commands and the counting commands are incredibly powerful. But they are not too hard to learn but it's just another segment. It's like I consider that to be phase two after this. But the first thing I would do is I would just try and find out if we could get that list. So this is an instance of political party which seems like a nice real simple measure. So what I would like to do and I think as well, let's have a look and see if they have country. Okay, so here's an interesting thing just to do immediately is let's have, let's get rid of all of that a second. And I guess if everyone's effective, let's just get rid of all of that, sorry. Yeah, and obviously just let us know if I need a hand with anything in particular. I'm just going to show how I'd get to this. So basically we're looking for a party and we'll get the party label and my definition there was that the party had instance of it was political party. And you see it always, normally for me it basically involves looking at how it's been described and unfortunately you will find inconsistencies all the time where it might have been none of this for the British ones and then completely differently for the Spanish ones or whatever it would be. But actually what we've got here is quickly a list of political parties. So that's like we've got that with one line basically. The other thing that's of interest here just quickly before we do the counting thing is what about the country because then you can sort of order this by... I'm going to call that country. That's the country label. But that should at least give us a list broken down by country and if we were looking to count members now the question is how are the members described and I would have thought it's by the... on the persons page itself. So if we go to Theresa May I'm presuming she's going to be a member of the Conservative Party. We've got a member count on the item. Is that member count? Brilliant. Okay so let's have a look if that's directly available because if that's directly available and well filled out then it means we don't need any of the fancy sparkle counting commands because we can get the count as just a straightforward answer to one of our questions. So party has to have a member count it's a new one on me. I've not seen that property. And now hopefully because we've restricted our results to political parties this count should be what we're looking for. I'm purposefully not putting an option around this because we're actually interested in how many results actually have this meaningful data. 304 have our count. I haven't selected it yet. So it's obviously beginning to be used this might be part of the every politician project actually. But look yeah so we've got our count of members here and actually what we can do because we've now got a column with some numbers in it it's a great thing that we can just do immediately is just we get the bubble chart available which is a beautiful way of looking at counts so you can see it's a funny old shape at the moment because I haven't ordered it by something and if you actually look at there we go so it goes yes and what we've got I don't know why that's a very strange little glitch I lose whether it's still there but I can't see it so basically what we'd like to do here is at the end afterwards after the end of our bracket we can just do order by and if I order by count it will start with the smallest one but I would like a descending count so I want the big ones on the top so I just type descending and then I can put count in brackets here and this is just a way that you can order your results if you did it with a birth date instead it would try and order them chronologically it's like a kind of a clever ordering oh yeah we are there aren't we but I'll just press play on that yeah far away we will be brilliant brilliant that's our final result there interesting little result yeah this is just the JavaScript our timeline engine has now been sort of taken apart so you can actually use it with any data and it's sort of a free for non-commercial use things just kind of go ahead and use this but basically yeah this is sort of one of the things I mean it's I've defined a lot of these demos just by running running queries basically let me just get a good example there so let's give them so I basically ran a wiki data query to get some data and then I've sort of thrown it in and made a slightly more customized version of the interface to control the island record albums you know with decade decade markers and effectively this is actually using the ranking system and you can see there the idea behind it that you need to you know you zoom out and you get the important ones and you zoom in and it slowly shows you more but yeah it's a great example of how that's me running a query and downloading the data because they had a download option there and just using it to build this thing you know you can just use it for whatever you like and of course if you know how to code a little bit you can do really powerful things but even without that one of the download options is just CSV and you can open it in a spreadsheet start manipulating it and doing things with it