[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:22.09,Default,,0000,0000,0000,,{\i1}36C3 preroll music{\i0} Dialogue: 0,0:00:22.09,0:00:30.16,Default,,0000,0000,0000,,Okay so now to our speaker, he’s Lucas.\NHe's a SPARQL magician I'm told, so and he Dialogue: 0,0:00:30.16,0:00:35.23,Default,,0000,0000,0000,,will introduce you to his favorite\Nquerying language, SPARQL, and give you a Dialogue: 0,0:00:35.23,0:00:40.02,Default,,0000,0000,0000,,little introduction and in the second part\Nhe will do some live coding which is Dialogue: 0,0:00:40.02,0:00:45.84,Default,,0000,0000,0000,,always really interesting and funny and\Nyou can give him some things that he's Dialogue: 0,0:00:45.84,0:00:50.07,Default,,0000,0000,0000,,querying for you and I'm sure we'll have\Nlots of fun and interesting learning stuff Dialogue: 0,0:00:50.07,0:00:53.79,Default,,0000,0000,0000,,here so give a warm round of applause to\NLucas. Dialogue: 0,0:00:53.79,0:00:55.73,Default,,0000,0000,0000,,[Applause] Dialogue: 0,0:01:01.03,0:01:09.04,Default,,0000,0000,0000,,[inaudible] Dialogue: 0,0:01:09.04,0:01:13.44,Default,,0000,0000,0000,,Is this better? Aha! It's a bit too loud\Nso I'll just talk a bit until they have Dialogue: 0,0:01:13.44,0:01:18.73,Default,,0000,0000,0000,,figured it out. Yeah so this is going to\Nbe kind of two parts but not really that Dialogue: 0,0:01:18.73,0:01:22.42,Default,,0000,0000,0000,,separate but in the second part I'm\Nbasically going to write the queries that Dialogue: 0,0:01:22.42,0:01:27.01,Default,,0000,0000,0000,,you suggest so if you – if you see what\NI'm going to do here and then think oh I Dialogue: 0,0:01:27.01,0:01:31.27,Default,,0000,0000,0000,,have a great idea for something we could\Nperhaps query then just remember that and Dialogue: 0,0:01:31.27,0:01:34.87,Default,,0000,0000,0000,,we'll get back to that hopefully because\Notherwise the second half is going to be Dialogue: 0,0:01:34.87,0:01:40.04,Default,,0000,0000,0000,,really short if I don't get any ideas from\Nyou. But yeah, so this is about querying Dialogue: 0,0:01:40.04,0:01:46.19,Default,,0000,0000,0000,,linked data which allows you to do all\Nkinds of crazy things and answer all kinds Dialogue: 0,0:01:46.19,0:01:50.77,Default,,0000,0000,0000,,of crazy questions such as I think I had\Non the slides something like "what are the Dialogue: 0,0:01:50.77,0:01:54.39,Default,,0000,0000,0000,,largest cities with a female mayor?" and\Nif you wanted to find that out Dialogue: 0,0:01:54.39,0:01:59.20,Default,,0000,0000,0000,,traditionally you could like go through\NWikipedia and try to find all the largest Dialogue: 0,0:01:59.20,0:02:03.32,Default,,0000,0000,0000,,cities and see which ones have a female\Nmayor and which ones don't or perhaps Dialogue: 0,0:02:03.32,0:02:06.55,Default,,0000,0000,0000,,there's a category with all the cities\Nwith a female mayor but then you have to Dialogue: 0,0:02:06.55,0:02:12.20,Default,,0000,0000,0000,,sort them by population and it's a whole\Nmess and with linked data you can find Dialogue: 0,0:02:12.20,0:02:17.49,Default,,0000,0000,0000,,that out much more easily and also all\Nkinds of other things but let's start with Dialogue: 0,0:02:17.49,0:02:24.58,Default,,0000,0000,0000,,some simple fantasy linked data so this is\Na tiny snippet of linked data, some data Dialogue: 0,0:02:24.58,0:02:30.05,Default,,0000,0000,0000,,graph. It's just composed of a load of\Nnodes which are these ovals and rectangles Dialogue: 0,0:02:30.05,0:02:35.05,Default,,0000,0000,0000,,here and they're connected with arrows and\Neach of these forms kind of a triple Dialogue: 0,0:02:35.05,0:02:39.82,Default,,0000,0000,0000,,consisting of the start node and then the\Narrow and then the end node and that's how Dialogue: 0,0:02:39.82,0:02:45.25,Default,,0000,0000,0000,,we represent all the information you have\Nin there, in this linked database. So for Dialogue: 0,0:02:45.25,0:02:48.41,Default,,0000,0000,0000,,example we can read this as this talk\Nright now happens in the Esszimmer or the Dialogue: 0,0:02:48.41,0:02:51.96,Default,,0000,0000,0000,,dining room which is the name of this\Nstage here and it's going to be followed Dialogue: 0,0:02:51.96,0:02:55.93,Default,,0000,0000,0000,,by the live querying session which also\Nhappens in Esszimmer and the live querying Dialogue: 0,0:02:55.93,0:03:00.90,Default,,0000,0000,0000,,session in turn follows this talk again\Nand the Esszimmer, the dining room, is Dialogue: 0,0:03:00.90,0:03:06.05,Default,,0000,0000,0000,,next to the kitchen, the Küche, and the\Nkitchen is next to the dining room again Dialogue: 0,0:03:06.05,0:03:09.89,Default,,0000,0000,0000,,and both of them are part of the\NWikipakaWG which is part of 36C3 and the Dialogue: 0,0:03:09.89,0:03:17.34,Default,,0000,0000,0000,,talk happens right now and at the same\Ntime there's also some talk about how Dialogue: 0,0:03:17.34,0:03:22.11,Default,,0000,0000,0000,,state elections are climate elections or\Nsomething in the Chaos West stage, starts Dialogue: 0,0:03:22.11,0:03:25.53,Default,,0000,0000,0000,,at the same time, Chaos West stage is part\Nof the Chaos West Assembly which is part Dialogue: 0,0:03:25.53,0:03:31.67,Default,,0000,0000,0000,,of 36C3 as well and so this graph has a\Nfew important properties, for example Dialogue: 0,0:03:31.67,0:03:36.06,Default,,0000,0000,0000,,there's some redundant connections here,\Nyou could see, you could say, if this talk Dialogue: 0,0:03:36.06,0:03:39.18,Default,,0000,0000,0000,,is followed by the live querying then you\Ndon't really need to know that live Dialogue: 0,0:03:39.18,0:03:43.81,Default,,0000,0000,0000,,querying follows this talk, it's kind of\Nredundant information. You already know Dialogue: 0,0:03:43.81,0:03:48.90,Default,,0000,0000,0000,,it, but it doesn't hurt to have it, and it\Noften makes your life easier if you have a Dialogue: 0,0:03:48.90,0:03:53.65,Default,,0000,0000,0000,,little bit of redundancy in your graph and\Nthen if you find that one half of this Dialogue: 0,0:03:53.65,0:03:57.27,Default,,0000,0000,0000,,connection is missing for example you can\Nstill investigate what's going on and also Dialogue: 0,0:03:57.27,0:04:02.48,Default,,0000,0000,0000,,in here we have kind of bi-directional\Nconnection so Esszimmer is next to Küche Dialogue: 0,0:04:02.48,0:04:07.51,Default,,0000,0000,0000,,which is next to Esszimmer but this is two\Nseparate arrows and could also be that Dialogue: 0,0:04:07.51,0:04:11.79,Default,,0000,0000,0000,,only one of them is there so you don't\Nhave arrows which go into-, in both Dialogue: 0,0:04:11.79,0:04:16.01,Default,,0000,0000,0000,,directions at once in this data model, it\Nhas to be, if you want something like this Dialogue: 0,0:04:16.01,0:04:18.68,Default,,0000,0000,0000,,you have to have two separate arrows\Nbecause that keeps the data model very Dialogue: 0,0:04:18.68,0:04:25.72,Default,,0000,0000,0000,,simple. You just have subject predicate\Nobject and that's everything you have, and Dialogue: 0,0:04:25.72,0:04:33.21,Default,,0000,0000,0000,,then to query this graph, you kind of\Nselect a tiny part of it and then you Dialogue: 0,0:04:33.21,0:04:39.09,Default,,0000,0000,0000,,remove some part that you don't know about\Nfor example we know that this talk is Dialogue: 0,0:04:39.09,0:04:43.65,Default,,0000,0000,0000,,followed by live querying and if we remove\Nthe live querying part, then we can ask Dialogue: 0,0:04:43.65,0:04:50.65,Default,,0000,0000,0000,,something like... Okay, I did it the other\Nway around. Never mind, this way. This Dialogue: 0,0:04:50.65,0:04:53.53,Default,,0000,0000,0000,,talk is followed by which talk? and then\Nyou have a question but because you've Dialogue: 0,0:04:53.53,0:05:00.45,Default,,0000,0000,0000,,left out this part and then if you ask\Nthis question to a query service it can, Dialogue: 0,0:05:00.45,0:05:06.82,Default,,0000,0000,0000,,kind of, you can think of this like a,\Nerr, damn, I only know the German word for Dialogue: 0,0:05:06.82,0:05:11.62,Default,,0000,0000,0000,,this one, a, Schablone, template, so you\Nput this over the graph and this has to Dialogue: 0,0:05:11.62,0:05:15.66,Default,,0000,0000,0000,,match the existing node this has to match\Nthe existing arrow and then you see which Dialogue: 0,0:05:15.66,0:05:20.17,Default,,0000,0000,0000,,nodes can you put in here and in this case\Nthat's only the live querying or the other Dialogue: 0,0:05:20.17,0:05:26.51,Default,,0000,0000,0000,,way around which talk follows this one so\Nyou can have the beginning of the triple Dialogue: 0,0:05:26.51,0:05:31.49,Default,,0000,0000,0000,,can be a variable like this one or the end\Nof the triple can be a variable like in Dialogue: 0,0:05:31.49,0:05:38.54,Default,,0000,0000,0000,,this case and you can also have more\Ncomplicated patterns like, no there's not Dialogue: 0,0:05:38.54,0:05:42.28,Default,,0000,0000,0000,,a more complicated pattern, this is the\Nsame pattern. You have the question which Dialogue: 0,0:05:42.28,0:05:46.14,Default,,0000,0000,0000,,talk happens in Esszimmer and you have two\Nanswers: this talk happens in Esszimmer Dialogue: 0,0:05:46.14,0:05:51.82,Default,,0000,0000,0000,,and live querying happens in Esszimmer.\NBut you can also combine more graph nodes Dialogue: 0,0:05:51.82,0:05:57.66,Default,,0000,0000,0000,,like this, for example, which talk happens\Nin some room, which is part of the Dialogue: 0,0:05:57.66,0:06:02.39,Default,,0000,0000,0000,,Wikipaka-WG. So we have one free part here\Nand one free part here. But we know that Dialogue: 0,0:06:02.39,0:06:06.22,Default,,0000,0000,0000,,these two have to be connected with,\N"happens in", and then this has to be Dialogue: 0,0:06:06.22,0:06:10.82,Default,,0000,0000,0000,,connected with "is part of" to the\NWikipaka-WG. And you can kind of Dialogue: 0,0:06:10.82,0:06:16.61,Default,,0000,0000,0000,,construct– if you can phrase your question\Nas a kind of graph like this, where some Dialogue: 0,0:06:16.61,0:06:19.44,Default,,0000,0000,0000,,parts are predetermined that you already\Nknow about and the other parts that you Dialogue: 0,0:06:19.44,0:06:26.25,Default,,0000,0000,0000,,want to find. Those are these kind of\Nvariables which are here indicated with Dialogue: 0,0:06:26.25,0:06:30.99,Default,,0000,0000,0000,,just dashed lines. Then you can ask that\Nquestion to the graph and find the Dialogue: 0,0:06:30.99,0:06:35.93,Default,,0000,0000,0000,,matching results. In this case, you have\Nthese two matches, this talk happens in Dialogue: 0,0:06:35.93,0:06:40.14,Default,,0000,0000,0000,,Esszimmer as part of Wikipaka-WG and live\Nquerying happens in Esszimmer, is part of Dialogue: 0,0:06:40.14,0:06:46.76,Default,,0000,0000,0000,,Wikidata– Wikipaka-WG. And then, if you–\Nif we had more information in this graph Dialogue: 0,0:06:46.76,0:06:51.77,Default,,0000,0000,0000,,here, we might also have other rooms. For\Nexample, there's this library over there Dialogue: 0,0:06:51.77,0:06:56.08,Default,,0000,0000,0000,,which also is going to have some talks. If\Nwe had the whole schedule in here, we Dialogue: 0,0:06:56.08,0:07:01.07,Default,,0000,0000,0000,,would find those as well. And we could\Nalso adapt the query so that we don't even Dialogue: 0,0:07:01.07,0:07:06.86,Default,,0000,0000,0000,,make the Wikipaka-WG part fixed. We could\Nask for anything that happens in 33C3. So Dialogue: 0,0:07:06.86,0:07:11.36,Default,,0000,0000,0000,,that would be some variable, happens in\Nsome room, is part of some assembly, is Dialogue: 0,0:07:11.36,0:07:15.61,Default,,0000,0000,0000,,part of 36C3. And then we would find this\Nthing as well because it fits the same Dialogue: 0,0:07:15.61,0:07:21.53,Default,,0000,0000,0000,,kind of pattern: happens in, is part of,\Nis part of 36C3. Does that make sense? Dialogue: 0,0:07:21.53,0:07:31.54,Default,,0000,0000,0000,,Hopefully. I'm seeing a lot of nodding\Nheads. OK, that's great. So then we can Dialogue: 0,0:07:31.54,0:07:38.06,Default,,0000,0000,0000,,try to move ahead to actually ask some of\Nthese questions to a real query system. Dialogue: 0,0:07:38.06,0:07:43.03,Default,,0000,0000,0000,,Because in reality, you're not going to\Nactually draw these graphs, but you have Dialogue: 0,0:07:43.03,0:07:47.53,Default,,0000,0000,0000,,some kind of language where you phrase\Nthem instead, which looks a bit like this. Dialogue: 0,0:07:47.53,0:07:52.72,Default,,0000,0000,0000,,So you have the part: SELECT anything\NWHERE, that is kind of like SQL, and then Dialogue: 0,0:07:52.72,0:07:57.90,Default,,0000,0000,0000,,everything else is not like SQL. Forget\NSQL! I hear this is easier to understand Dialogue: 0,0:07:57.90,0:08:03.50,Default,,0000,0000,0000,,if you don't know SQL. I didn't know SQL\Nthat much when I learned SPARQL, and I Dialogue: 0,0:08:03.50,0:08:08.85,Default,,0000,0000,0000,,think it helped me, apparently. But what\Nyou write down here is these, is this kind Dialogue: 0,0:08:08.85,0:08:14.08,Default,,0000,0000,0000,,of description of the graph, and these\Ndashed parts, which are the variables Dialogue: 0,0:08:14.08,0:08:17.92,Default,,0000,0000,0000,,which you don't yet know. Those are marked\Nwith a question mark because that's kind Dialogue: 0,0:08:17.92,0:08:21.15,Default,,0000,0000,0000,,of what you use to ask a question. In this\Ncase, I've just called it "?talk", but it Dialogue: 0,0:08:21.15,0:08:27.07,Default,,0000,0000,0000,,could be any name, basically. And then\Ninstead of "happens in" as two words, I've Dialogue: 0,0:08:27.07,0:08:32.51,Default,,0000,0000,0000,,just written "happensIn" as one and then\Nwith the prefix "36C3" and it happens in Dialogue: 0,0:08:32.51,0:08:38.29,Default,,0000,0000,0000,,the 36C3 Esszimmer because I don't really\Nhave a separate dining room at home, but a Dialogue: 0,0:08:38.29,0:08:43.32,Default,,0000,0000,0000,,lot of people do. So if we just wrote it\Nhappens in Esszimmer, that would be pretty Dialogue: 0,0:08:43.32,0:08:48.11,Default,,0000,0000,0000,,ambiguous and no one would know which\Nwhich dining room you're talking about. Dialogue: 0,0:08:48.11,0:08:52.78,Default,,0000,0000,0000,,And by adding this prefix we know we're\Ntalking about just the dining room in Dialogue: 0,0:08:52.78,0:08:58.51,Default,,0000,0000,0000,,this, at thirty– 36C3. I think, I assume\Nthere's no other assembly that has Dialogue: 0,0:08:58.51,0:09:01.37,Default,,0000,0000,0000,,something called the dining room. If it\Ndoes, then we would have to add something Dialogue: 0,0:09:01.37,0:09:06.20,Default,,0000,0000,0000,,else here to make it clear. And I've used\Nthe same prefix for "happensIn" to make Dialogue: 0,0:09:06.20,0:09:09.97,Default,,0000,0000,0000,,clear which kind of "happens in" relation\Nwe're talking about, that it's one Dialogue: 0,0:09:09.97,0:09:15.65,Default,,0000,0000,0000,,specific to Congress events. And then you\Ncould ask this to a query service which Dialogue: 0,0:09:15.65,0:09:21.75,Default,,0000,0000,0000,,has this example graph in it, and you\Nmight get the response that it's these two Dialogue: 0,0:09:21.75,0:09:27.76,Default,,0000,0000,0000,,talks. And at the end, you have this\Nperiod here because if you read the whole Dialogue: 0,0:09:27.76,0:09:33.09,Default,,0000,0000,0000,,thing, it's kind of like a sentence again.\NBecause the talk happens in Esszimmer. And Dialogue: 0,0:09:33.09,0:09:36.81,Default,,0000,0000,0000,,if you have two sentences, then you have\Ntwo periods. So the talk happens in some Dialogue: 0,0:09:36.81,0:09:40.99,Default,,0000,0000,0000,,room. And this room is part of the\NWikipaka-WG. And because we've used the Dialogue: 0,0:09:40.99,0:09:47.51,Default,,0000,0000,0000,,same variable name here and down here,\Nthis has to be the same room. And it Dialogue: 0,0:09:47.51,0:09:50.79,Default,,0000,0000,0000,,couldn't just be two different things. So\Nif we use two different variable names Dialogue: 0,0:09:50.79,0:09:55.50,Default,,0000,0000,0000,,here, room and something else, then we\Nwould just get all the combinations of Dialogue: 0,0:09:55.50,0:09:59.26,Default,,0000,0000,0000,,talks happening somewhere and rooms being\Npart of Wikipaka-WG without them being Dialogue: 0,0:09:59.26,0:10:02.97,Default,,0000,0000,0000,,connected anyway, but because they use the\Nsame variable name they have to be Dialogue: 0,0:10:02.97,0:10:08.84,Default,,0000,0000,0000,,connected like this. And then you would\Nget these results we've seen earlier. What Dialogue: 0,0:10:08.84,0:10:13.83,Default,,0000,0000,0000,,you can also do is leave out the room. So\Nwhen I translate this into English, I Dialogue: 0,0:10:13.83,0:10:18.41,Default,,0000,0000,0000,,could say, the talk happens in the room\Nand the room is part of Wikipaka-WG. But I Dialogue: 0,0:10:18.41,0:10:23.16,Default,,0000,0000,0000,,could also say the talk happens in {\i1}some\Nroom, which is{\i0} part of the Wikipaka-WG, Dialogue: 0,0:10:23.16,0:10:26.30,Default,,0000,0000,0000,,as kind of a– I don't know what that's\Ncalled in English kind of a relative Dialogue: 0,0:10:26.30,0:10:32.51,Default,,0000,0000,0000,,sentence sub-something-clause where we\Ndon't really talk about the room in itself Dialogue: 0,0:10:32.51,0:10:36.60,Default,,0000,0000,0000,,just as a part of this larger sentence.\NAnd you can write that in SPARQL as well. Dialogue: 0,0:10:36.60,0:10:44.22,Default,,0000,0000,0000,,And then it looks like this. And these\Nsquare brackets kind of describe what the Dialogue: 0,0:10:44.22,0:10:48.48,Default,,0000,0000,0000,,room looks like without giving it names.\NSo in this case, you can only select the Dialogue: 0,0:10:48.48,0:10:51.96,Default,,0000,0000,0000,,talk up here and we don't have a room\Nvariable. But if you don't care about what Dialogue: 0,0:10:51.96,0:10:55.74,Default,,0000,0000,0000,,the room is, then that can be very useful.\NI've also changed something else here. Dialogue: 0,0:10:55.74,0:11:04.15,Default,,0000,0000,0000,,I've replaced the 36C3 in "isPartOf" with\Nschema, which is another prefix and schema Dialogue: 0,0:11:04.15,0:11:09.38,Default,,0000,0000,0000,,is kind of this collection of useful\Nprefixes and other nodes that you can Dialogue: 0,0:11:09.38,0:11:14.19,Default,,0000,0000,0000,,reuse, for example, if you're describing\Nthings you have on your website, you might Dialogue: 0,0:11:14.19,0:11:18.89,Default,,0000,0000,0000,,say you have an article with a\Nschema:title and a schema:publicationDate. Dialogue: 0,0:11:18.89,0:11:22.87,Default,,0000,0000,0000,,So this was mainly introduced by Google\Nand some other search engines. But we can Dialogue: 0,0:11:22.87,0:11:27.88,Default,,0000,0000,0000,,use the same vocabulary to talk about our\Ntalks because "isPartOf" is one of these Dialogue: 0,0:11:27.88,0:11:35.83,Default,,0000,0000,0000,,standard terms we can use for that. And\Nwhat else do I have. OK, the next thing I Dialogue: 0,0:11:35.83,0:11:41.19,Default,,0000,0000,0000,,have is actual queries. So I think I'm\Njust going to– I'm almost going to switch Dialogue: 0,0:11:41.19,0:11:45.35,Default,,0000,0000,0000,,to Wikidata, so I should talk a bit about\NWikidata. So all these examples here were Dialogue: 0,0:11:45.35,0:11:52.64,Default,,0000,0000,0000,,just on some example graph, which I made\Nup here and threw on a slide with a lot of Dialogue: 0,0:11:52.64,0:11:58.18,Default,,0000,0000,0000,,probably overengineered tikz LaTeX magic,\Nwhich I shouldn't have wasted that much Dialogue: 0,0:11:58.18,0:12:03.79,Default,,0000,0000,0000,,time about. But it looks nice. And… but if\Nwe want to write real queries, we could Dialogue: 0,0:12:03.79,0:12:07.47,Default,,0000,0000,0000,,load this thing into a query service, but\Nit wouldn't be that interesting because Dialogue: 0,0:12:07.47,0:12:12.22,Default,,0000,0000,0000,,it's kind of small. But there are a lot of\Nreal data graphs out there that you can Dialogue: 0,0:12:12.22,0:12:17.12,Default,,0000,0000,0000,,query with this query language, SPARQL.\NAnd one of the coolest ones, at least in Dialogue: 0,0:12:17.12,0:12:21.17,Default,,0000,0000,0000,,my opinion, is called Wikidata or\NWikidata. There's some kind of discussion Dialogue: 0,0:12:21.17,0:12:27.98,Default,,0000,0000,0000,,about how it's pronounced. And it's kind\Nof a free database of anything that's Dialogue: 0,0:12:27.98,0:12:33.91,Default,,0000,0000,0000,,relevant. And it's part of the same family\Nof projects as Wikipedia and Wikimedia Dialogue: 0,0:12:33.91,0:12:37.77,Default,,0000,0000,0000,,Commons and other things. And it's also\Nmaintained by the same community of Dialogue: 0,0:12:37.77,0:12:42.27,Default,,0000,0000,0000,,volunteers. And you can find all kinds of\Nreally interesting and cool and funny data Dialogue: 0,0:12:42.27,0:12:46.01,Default,,0000,0000,0000,,there. So all of these example queries,\Nwhich I have here, we're just going to ask Dialogue: 0,0:12:46.01,0:12:57.38,Default,,0000,0000,0000,,to Wikidata. But first, I will just give\Nyou one or two minutes to try to imagine Dialogue: 0,0:12:57.38,0:13:04.08,Default,,0000,0000,0000,,what this question would look like, either\Nin the graph format or in the SPARQL Dialogue: 0,0:13:04.08,0:13:09.34,Default,,0000,0000,0000,,format. Just try to figure out how you\Nwould formulate: "which software is Dialogue: 0,0:13:09.34,0:13:15.10,Default,,0000,0000,0000,,written in bash" as a kind of, this kind\Nof graph query. And then we can see what Dialogue: 0,0:13:15.10,0:13:22.97,Default,,0000,0000,0000,,we can come up with. So. I didn't think\Nthis through. I need some waiting loop Dialogue: 0,0:13:22.97,0:13:36.38,Default,,0000,0000,0000,,music now. Does anyone have a kind of idea\Nof what the graph looks like, because I'm Dialogue: 0,0:13:36.38,0:13:41.16,Default,,0000,0000,0000,,going to uncover it now and then you can\Ncompare, if it looks the same way. So it Dialogue: 0,0:13:41.16,0:13:45.76,Default,,0000,0000,0000,,would look like, this at least using the\NWikidata terminology. So instead of "is Dialogue: 0,0:13:45.76,0:13:51.79,Default,,0000,0000,0000,,written in", the property is called\Nprobing– programming language. And this Dialogue: 0,0:13:51.79,0:13:56.05,Default,,0000,0000,0000,,could also, this could be called "bash" or\N"Bourne Again Shell" or "GNU bash" or Dialogue: 0,0:13:56.05,0:14:02.01,Default,,0000,0000,0000,,something. Doesn't really matter. And in\NSPARQL, it looks like this, which is a lot Dialogue: 0,0:14:02.01,0:14:06.63,Default,,0000,0000,0000,,less readable, unfortunately, because one\Nof the things about Wikidata is that it's Dialogue: 0,0:14:06.63,0:14:14.29,Default,,0000,0000,0000,,multilingual. So instead of saying\N"programming language", we say "P277". And Dialogue: 0,0:14:14.29,0:14:17.51,Default,,0000,0000,0000,,I think that's beautiful, haha. No, but\Nthis is a property ID and you can look up Dialogue: 0,0:14:17.51,0:14:22.59,Default,,0000,0000,0000,,what this property is called in English or\Nin German or in any other language. So if Dialogue: 0,0:14:22.59,0:14:31.42,Default,,0000,0000,0000,,we look at Wikidata.org and look for – I\Nthink I forgot to zoom in. Yeah. There we Dialogue: 0,0:14:31.42,0:14:40.18,Default,,0000,0000,0000,,go. I hope that's readable. Property P,\Nwhat was it? 277. That is the property Dialogue: 0,0:14:40.18,0:14:45.02,Default,,0000,0000,0000,,"programming language", at least in… okay,\Nyou can't read that. There you go. At Dialogue: 0,0:14:45.02,0:14:48.22,Default,,0000,0000,0000,,least in English. In German it's\N"Programmiersprache", and it has tons of Dialogue: 0,0:14:48.22,0:14:51.53,Default,,0000,0000,0000,,other languages too. So you can use\NWikidata in any language you want, which Dialogue: 0,0:14:51.53,0:14:56.64,Default,,0000,0000,0000,,is very nice. I could also show this page\Nin a different language and then all of Dialogue: 0,0:14:56.64,0:15:01.33,Default,,0000,0000,0000,,this would look different. The downside is\Nthat the SPARQL query is not quite as Dialogue: 0,0:15:01.33,0:15:06.65,Default,,0000,0000,0000,,readable because you have to use all these\Nnumeric identifiers, but you don't have to Dialogue: 0,0:15:06.65,0:15:14.92,Default,,0000,0000,0000,,memorize them at least. So let's… oops,\Ntry to write this query. SELECT * WHERE Dialogue: 0,0:15:14.92,0:15:25.29,Default,,0000,0000,0000,,and we have the software, which is… which\Nhas the programming language "bash", and Dialogue: 0,0:15:25.29,0:15:30.59,Default,,0000,0000,0000,,then we have to add these prefixes first,\Nso bash is going to be a Wikidata item. So Dialogue: 0,0:15:30.59,0:15:35.64,Default,,0000,0000,0000,,we abbreviate that with "wd" and that's a\Nprefix. And then if I press control space, Dialogue: 0,0:15:35.64,0:15:41.66,Default,,0000,0000,0000,,or I think on Macs command space works as\Nwell, then it searches for bash and shows Dialogue: 0,0:15:41.66,0:15:46.85,Default,,0000,0000,0000,,me these suggestions and then I can just\Nselect the right one. In this case, "GNU Dialogue: 0,0:15:46.85,0:15:50.96,Default,,0000,0000,0000,,bash", and then I have the ID, and if I\Nmove the mouse over it again, then I can Dialogue: 0,0:15:50.96,0:15:55.76,Default,,0000,0000,0000,,see what this ID refers to. So it's not\Nquite as bad as– so on the PDF slides, you Dialogue: 0,0:15:55.76,0:16:00.88,Default,,0000,0000,0000,,just see the ID. But if you're actually on\Nthe query.wikidata.org website… let me Dialogue: 0,0:16:00.88,0:16:05.37,Default,,0000,0000,0000,,make that a bit larger so you can all see\Nit. And if you want to try that out on Dialogue: 0,0:16:05.37,0:16:09.18,Default,,0000,0000,0000,,your laptop, I don't know, here it's a bit\N{\i1}audio outage{\i0} And for the programming Dialogue: 0,0:16:09.18,0:16:17.29,Default,,0000,0000,0000,,language, we use a slightly different\Nprefix, which is "wdt", which stands for Dialogue: 0,0:16:17.29,0:16:21.27,Default,,0000,0000,0000,,"truthy". So we're only interested in\N"truthy" information and not all the Dialogue: 0,0:16:21.27,0:16:28.53,Default,,0000,0000,0000,,information. And then we find this\Nproperty P277. And if we run this query Dialogue: 0,0:16:28.53,0:16:34.62,Default,,0000,0000,0000,,with control-enter or with this button\Nhere, then we get a collection of other Dialogue: 0,0:16:34.62,0:16:40.24,Default,,0000,0000,0000,,IDs. Yeah. Does anyone want to get\Nsoftware which is written in bash? This Dialogue: 0,0:16:40.24,0:16:51.21,Default,,0000,0000,0000,,one has a very low ID that is going to be…\NLoading. There we go. Autopackage. Some Dialogue: 0,0:16:51.21,0:16:55.06,Default,,0000,0000,0000,,package management system that I haven't\Neven heard of, but it's written in bash. Dialogue: 0,0:16:55.06,0:17:01.13,Default,,0000,0000,0000,,OK, so… wait. Er, so here you can see all\Nthese statements and "programming Dialogue: 0,0:17:01.13,0:17:08.01,Default,,0000,0000,0000,,language: GNU Bash" is the one we looked\Nfor. And unfortunately… so this is not a Dialogue: 0,0:17:08.01,0:17:11.72,Default,,0000,0000,0000,,very useful list. So one thing we can do\Nin the Wikidata Query Service, which is Dialogue: 0,0:17:11.72,0:17:17.14,Default,,0000,0000,0000,,pretty specific to Wikidata, is to add the\Nso-called label service, which is Dialogue: 0,0:17:17.14,0:17:21.30,Default,,0000,0000,0000,,basically magic that you don't need to\Nunderstand. But you write something like Dialogue: 0,0:17:21.30,0:17:25.65,Default,,0000,0000,0000,,"serv" or "service" and then with\Ncontrol+space again for autocompletion. Dialogue: 0,0:17:25.65,0:17:30.60,Default,,0000,0000,0000,,And it suggests you this thing. And you\Njust keep that in your query at all times, Dialogue: 0,0:17:30.60,0:17:34.80,Default,,0000,0000,0000,,basically. And then you say, I would like\Nto have not just a software, but also the Dialogue: 0,0:17:34.80,0:17:41.20,Default,,0000,0000,0000,,software label. And then we get down here,\Nthe label of the software. And I can also Dialogue: 0,0:17:41.20,0:17:46.27,Default,,0000,0000,0000,,add the software description. And then we\Nalso see what, what is described. At least Dialogue: 0,0:17:46.27,0:17:53.15,Default,,0000,0000,0000,,if it has a description and then the query\Nresults are already a lot more usable. And Dialogue: 0,0:17:53.15,0:17:59.17,Default,,0000,0000,0000,,I'm just going to rename this to "item"\Nand then we can edit this query however we Dialogue: 0,0:17:59.17,0:18:04.34,Default,,0000,0000,0000,,want and the variable name will always\Nkind of match. Because the next query Dialogue: 0,0:18:04.34,0:18:07.61,Default,,0000,0000,0000,,won't be about software anymore. So it'll\Nbe confusing if you just still call it Dialogue: 0,0:18:07.61,0:18:13.21,Default,,0000,0000,0000,,"software". But, yeah, there is some\Nsoftware here like Apache Yetus, Ruby Dialogue: 0,0:18:13.21,0:18:18.78,Default,,0000,0000,0000,,Version Manager, Wikidata missing\Npictures, Pi-hole, all written in Bash. Dialogue: 0,0:18:18.78,0:18:27.79,Default,,0000,0000,0000,,OK, I have several more examples queries\Nhere, which are kind of simple, should I Dialogue: 0,0:18:27.79,0:18:34.10,Default,,0000,0000,0000,,skip ahead or is it good if I do a few\Nmore simple examples. Skip ahead? Is that Dialogue: 0,0:18:34.10,0:18:41.18,Default,,0000,0000,0000,,OK? OK, then let's. So who was born at sea\Nis not all that interesting. Just Place of Dialogue: 0,0:18:41.18,0:18:45.02,Default,,0000,0000,0000,,birth at sea. We have a special value for\Nthat and it's not a very interesting list. Dialogue: 0,0:18:45.02,0:18:48.78,Default,,0000,0000,0000,,I think a few results, just five or so,\Nbecause most people are going to have Dialogue: 0,0:18:48.78,0:18:51.89,Default,,0000,0000,0000,,"place of birth: Atlantic Ocean" or\Nsomething. Which places are located on the Dialogue: 0,0:18:51.89,0:18:57.18,Default,,0000,0000,0000,,White Elster, just something for the\NLeipzig people. And where does the Dialogue: 0,0:18:57.18,0:19:00.75,Default,,0000,0000,0000,,Neverending Story take place? This\Nactually kind of cute. Let's do that. Dialogue: 0,0:19:00.75,0:19:06.22,Default,,0000,0000,0000,,Also, this is a bit interesting because in\Nthis case, the variable is in the last Dialogue: 0,0:19:06.22,0:19:13.33,Default,,0000,0000,0000,,place and not the first one. So that… and\Nthen we have the Neverending Story in the Dialogue: 0,0:19:13.33,0:19:19.62,Default,,0000,0000,0000,,beginning and narrative location. And then\Nthe item is at the end instead of at the Dialogue: 0,0:19:19.62,0:19:24.66,Default,,0000,0000,0000,,beginning of a triple. And it works just\Nas well, except that a lot of these don't Dialogue: 0,0:19:24.66,0:19:31.80,Default,,0000,0000,0000,,have a label in English. So let's add\NGerman as a fallback language. And then we Dialogue: 0,0:19:31.80,0:19:37.63,Default,,0000,0000,0000,,get all of these places which someone\Nadded to Wikidata at some point. Let's see Dialogue: 0,0:19:37.63,0:19:42.41,Default,,0000,0000,0000,,if there's any useful information about\Nthem. So they all have IDs in the same Dialogue: 0,0:19:42.41,0:19:47.89,Default,,0000,0000,0000,,range. So it looks like they were all\Ncreated at the same time because the are Dialogue: 0,0:19:47.89,0:19:51.88,Default,,0000,0000,0000,,are just increasing all the time. So the\NGelichterland is a place from the Dialogue: 0,0:19:51.88,0:19:55.26,Default,,0000,0000,0000,,Neverending Story, it's a finctional…\Nfictional country. It has a capital, which Dialogue: 0,0:19:55.26,0:20:00.74,Default,,0000,0000,0000,,is this fictional place. It's located on\Nthe… this terrain feature, it's present in Dialogue: 0,0:20:00.74,0:20:05.60,Default,,0000,0000,0000,,the Neverending Story. And it depicts\Nhorror fiction. I'm not sure about that, Dialogue: 0,0:20:05.60,0:20:12.35,Default,,0000,0000,0000,,but let's leave it alone for now. OK,\Nyeah. And skip to a slightly more Dialogue: 0,0:20:12.35,0:20:20.12,Default,,0000,0000,0000,,interesting query, which is this one,\Nwhich popes had children. So what is the Dialogue: 0,0:20:20.12,0:20:24.58,Default,,0000,0000,0000,,graph going to look like for this? How\Nmany, how many triples are we going to Dialogue: 0,0:20:24.58,0:20:29.09,Default,,0000,0000,0000,,have? So triple is node, arrow, and\Nanother node, how many triples would you Dialogue: 0,0:20:29.09,0:20:36.50,Default,,0000,0000,0000,,need for "Pope has a child"? Let's do a\Nraising hands. Who thinks you need zero Dialogue: 0,0:20:36.50,0:20:43.38,Default,,0000,0000,0000,,triples, OK? Who thinks you need one\Ntriple? Who thinks you need two triples? Dialogue: 0,0:20:43.38,0:20:48.18,Default,,0000,0000,0000,,That's more people. Does anyone think you\Nneed three triples? No. OK, so mostly two, Dialogue: 0,0:20:48.18,0:20:54.25,Default,,0000,0000,0000,,but some people think one. So the one… the\Npeople who think it might need one triple, Dialogue: 0,0:20:54.25,0:21:02.65,Default,,0000,0000,0000,,perhaps are thinking of something like the\NPope, which is the leader of the worldwide Dialogue: 0,0:21:02.65,0:21:11.20,Default,,0000,0000,0000,,Catholic Church, has a child, this child\Nor it's called item, but that's not going Dialogue: 0,0:21:11.20,0:21:15.36,Default,,0000,0000,0000,,to have any results. Or it could be the\Nother way around. And you could say that… Dialogue: 0,0:21:15.36,0:21:26.37,Default,,0000,0000,0000,,oh let's just comment this out. The item\Nhas "father: the pope". And that doesn't Dialogue: 0,0:21:26.37,0:21:30.65,Default,,0000,0000,0000,,work. Because the items are not… the\Nchildren are not directly connected to the Dialogue: 0,0:21:30.65,0:21:35.17,Default,,0000,0000,0000,,item for the office of the pope, instead\Nit's going to be two levels. It's going to Dialogue: 0,0:21:35.17,0:21:40.40,Default,,0000,0000,0000,,say the child has a father, some person,\Nand then the person has the office pope or Dialogue: 0,0:21:40.40,0:21:44.69,Default,,0000,0000,0000,,has the position pope or is a pope or\Nsomething. So you need this level of Dialogue: 0,0:21:44.69,0:21:49.15,Default,,0000,0000,0000,,indirection. So in the graph that looks\Neither like this or it could be the other Dialogue: 0,0:21:49.15,0:21:54.88,Default,,0000,0000,0000,,way around. So either the child has a\Nfather pope, which has "position held: Dialogue: 0,0:21:54.88,0:22:00.93,Default,,0000,0000,0000,,pope" or the pope has a child and also a\N"position held", so that's kind of an Dialogue: 0,0:22:00.93,0:22:04.09,Default,,0000,0000,0000,,example of the redundancy I mentioned\Nearlier, we have the two directions Dialogue: 0,0:22:04.09,0:22:11.30,Default,,0000,0000,0000,,"child" and also "father"/"mother", and-\Nso you can ask your query in two ways, and Dialogue: 0,0:22:11.30,0:22:14.17,Default,,0000,0000,0000,,it doesn't really make that much of a\Ndifference, assuming that the data is Dialogue: 0,0:22:14.17,0:22:19.70,Default,,0000,0000,0000,,complete. And I think someone occasionally\Nruns queries to check if any of these Dialogue: 0,0:22:19.70,0:22:25.46,Default,,0000,0000,0000,,circles are missing. So let's try one of\Nthem, let's just stay with this one, so Dialogue: 0,0:22:25.46,0:22:32.03,Default,,0000,0000,0000,,the item does not have "pope" as father,\Nit has some pope, and then this pope has Dialogue: 0,0:22:32.03,0:22:42.72,Default,,0000,0000,0000,,"position held: pope". And then let's add\Nthe "pope" label and… yeah, pope label is Dialogue: 0,0:22:42.72,0:22:49.80,Default,,0000,0000,0000,,enough, and then we get 24 results! So we\Nhave a Duke of Parma which, who was the Dialogue: 0,0:22:49.80,0:22:55.15,Default,,0000,0000,0000,,son of Paul III. Paul III had three\Nchildren. Let's sort by this. Wow, Dialogue: 0,0:22:55.15,0:23:04.39,Default,,0000,0000,0000,,Alexander VI was very busy. And some of\Nthem just have, oh oh oh, we have Dialogue: 0,0:23:04.39,0:23:08.78,Default,,0000,0000,0000,,duplicates, Giovanni Borgia and Giovanni\NBorgia. Should I demonstrate Wikidata Dialogue: 0,0:23:08.78,0:23:13.55,Default,,0000,0000,0000,,editing now or do we just ignore this? So,\Nyeah, someone imported a lot of Dialogue: 0,0:23:13.55,0:23:19.05,Default,,0000,0000,0000,,information from this peerage database and\Napparently we have some duplicate items Dialogue: 0,0:23:19.05,0:23:24.14,Default,,0000,0000,0000,,here, let's just leave those alone for\Nnow. In fact, I think this and this also Dialogue: 0,0:23:24.14,0:23:29.77,Default,,0000,0000,0000,,looks suspiciously similar. Giovanni\NBorgia, unless he had two children of that Dialogue: 0,0:23:29.77,0:23:38.19,Default,,0000,0000,0000,,name. I mean, he could have. So this… we\Nhave a date of birth 1470s… 1498. No, that Dialogue: 0,0:23:38.19,0:23:44.97,Default,,0000,0000,0000,,might actually be different children. OK,\Nnot a very creative father in the names. Dialogue: 0,0:23:44.97,0:23:52.98,Default,,0000,0000,0000,,Yeah. And wait, that's a pope who's a\Nchild of another pope. Very interesting! Dialogue: 0,0:23:52.98,0:23:56.46,Default,,0000,0000,0000,,And another one. And another one. We have\Nthree popes who are children of other Dialogue: 0,0:23:56.46,0:24:02.00,Default,,0000,0000,0000,,popes. Let's search for those! So we would\Nalso need for that, that the item has Dialogue: 0,0:24:02.00,0:24:11.38,Default,,0000,0000,0000,,"position held: Pope", and I could copy\Npaste this, but just do this. So the item Dialogue: 0,0:24:11.38,0:24:14.30,Default,,0000,0000,0000,,should be… child should have a "father:\Npope" and the item should have "position Dialogue: 0,0:24:14.30,0:24:18.38,Default,,0000,0000,0000,,held: Pope", and the pope should also have\N"position held: pope". And in this case, Dialogue: 0,0:24:18.38,0:24:22.69,Default,,0000,0000,0000,,it would probably be less confusing to\Ncall these "child" and "father", because Dialogue: 0,0:24:22.69,0:24:26.48,Default,,0000,0000,0000,,this is also a pope now, but… variable\Nnames. One of the three hardest problems Dialogue: 0,0:24:26.48,0:24:30.49,Default,,0000,0000,0000,,in computer science, right? Yeah, we have\Nthree children who are… three popes who Dialogue: 0,0:24:30.49,0:24:36.54,Default,,0000,0000,0000,,are children of other popes. Wow. I'm\Nactually going to save this query, popes Dialogue: 0,0:24:36.54,0:24:42.47,Default,,0000,0000,0000,,who were children of other popes. But\Nactually, we can future-proof this a Dialogue: 0,0:24:42.47,0:24:47.91,Default,,0000,0000,0000,,little bit, because right now we've only\Nsaid that the father should be a pope. But Dialogue: 0,0:24:47.91,0:24:50.73,Default,,0000,0000,0000,,in case there's ever a female pope, let's\Njust switch this around and say that the Dialogue: 0,0:24:50.73,0:24:58.64,Default,,0000,0000,0000,,pope should have the child… item and then\Nit's going to work, even if the pope Dialogue: 0,0:24:58.64,0:25:03.14,Default,,0000,0000,0000,,happens to be female and is a mother\Ninstead of a father. There we go, same Dialogue: 0,0:25:03.14,0:25:13.07,Default,,0000,0000,0000,,three results. OK, and let's keep that,\Nand open a new tab for next queries. Yeah. Dialogue: 0,0:25:13.07,0:25:18.34,Default,,0000,0000,0000,,Which Microsoft software runs on Linux.\NOK. That's not that funny. So perhaps we Dialogue: 0,0:25:18.34,0:25:23.01,Default,,0000,0000,0000,,can just skip it… I don't know. That joke\Nkind of ran out of steam a while ago. Dialogue: 0,0:25:23.01,0:25:26.63,Default,,0000,0000,0000,,Basically looks like this and it's like\NVisual Studio Code and three other Dialogue: 0,0:25:26.63,0:25:31.23,Default,,0000,0000,0000,,programs, meh. What are some compositions\Nfor organ and orchestra. This isn't funny Dialogue: 0,0:25:31.23,0:25:35.71,Default,,0000,0000,0000,,at all, but I just find it very nice\Nbecause it's just an awesome sound. And so Dialogue: 0,0:25:35.71,0:25:40.86,Default,,0000,0000,0000,,that would be… the composition has the\Ninstrumentation "organ" and also Dialogue: 0,0:25:40.86,0:25:52.67,Default,,0000,0000,0000,,"orchestra", which we can write as… item,\Nitem label… composition… instrumentation, Dialogue: 0,0:25:52.67,0:26:11.65,Default,,0000,0000,0000,,this one, orchestra. And also,\N"composition… organ". And then, oops, Dialogue: 0,0:26:11.65,0:26:18.12,Default,,0000,0000,0000,,yeah, this should be "item"… and also I\Nforgot to add the label service. There we Dialogue: 0,0:26:18.12,0:26:28.30,Default,,0000,0000,0000,,go. And we have 12 results, which is nice\Nif you want to listen to any of those. We Dialogue: 0,0:26:28.30,0:26:38.57,Default,,0000,0000,0000,,could also check if any of them have an\Naudio file on Commons. Let's see. One, OK, Dialogue: 0,0:26:38.57,0:26:46.46,Default,,0000,0000,0000,,and I think we've heard this one already.\NSo, but… one thing that's kind of annoying Dialogue: 0,0:26:46.46,0:26:50.42,Default,,0000,0000,0000,,here, I should have mentioned this in the\Nlast query, I think. So I had to repeat Dialogue: 0,0:26:50.42,0:26:53.49,Default,,0000,0000,0000,,the item and the property ID, which is a\Nbit annoying and makes the query difficult Dialogue: 0,0:26:53.49,0:26:57.74,Default,,0000,0000,0000,,to read. And what you can do is leave that\Nout and you can also do this in the Dialogue: 0,0:26:57.74,0:27:04.66,Default,,0000,0000,0000,,previous case. So let's actually go one\Nslide back. So here I didn't write twice Dialogue: 0,0:27:04.66,0:27:07.35,Default,,0000,0000,0000,,that it's the software which should have\Nthe developer, and also the operating Dialogue: 0,0:27:07.35,0:27:10.86,Default,,0000,0000,0000,,system. I just wrote the software has\N"developer: Microsoft" and also with a Dialogue: 0,0:27:10.86,0:27:16.69,Default,,0000,0000,0000,,semicolon at the end instead of a period,\Nit has "operating system: Linux". So if Dialogue: 0,0:27:16.69,0:27:18.92,Default,,0000,0000,0000,,you read this as English it's just one\Nsentence where you don't repeat the Dialogue: 0,0:27:18.92,0:27:22.23,Default,,0000,0000,0000,,subject twice. The software has\N"developer: Microsoft" and "operating Dialogue: 0,0:27:22.23,0:27:26.22,Default,,0000,0000,0000,,system: Linux", instead of "software has\Ndeveloper: Microsoft" and "software has Dialogue: 0,0:27:26.22,0:27:31.35,Default,,0000,0000,0000,,operating system: Linux". And if you… if\Nthe property here is also the same thing, Dialogue: 0,0:27:31.35,0:27:36.33,Default,,0000,0000,0000,,then you can even leave that out and add a\Ncomma at the end and just list the two Dialogue: 0,0:27:36.33,0:27:41.17,Default,,0000,0000,0000,,values and you don't even have to repeat\Nthe instrumentation. So let's do that here Dialogue: 0,0:27:41.17,0:27:47.45,Default,,0000,0000,0000,,and abbreviate this query. And it has the\Nexact same 12 results, just slightly more Dialogue: 0,0:27:47.45,0:27:54.72,Default,,0000,0000,0000,,convenient to read and… to write at least,\Nhopefully also to read. I don't know. But Dialogue: 0,0:27:54.72,0:27:56.84,Default,,0000,0000,0000,,you don't use the comma that much. The\Nsemicolon is pretty useful, like we could Dialogue: 0,0:27:56.84,0:28:06.60,Default,,0000,0000,0000,,have written this as, the pope has, er,\Nthe child and also position held like Dialogue: 0,0:28:06.60,0:28:10.53,Default,,0000,0000,0000,,this. It means exactly the same, but you\Ncan immediately see that both of these Dialogue: 0,0:28:10.53,0:28:18.40,Default,,0000,0000,0000,,refer to the pope because there's just a\Nbunch of blank space here. Yeah, so then Dialogue: 0,0:28:18.40,0:28:27.69,Default,,0000,0000,0000,,we have this one. This isn't funny at all,\Nbut there are a lot of people who used to Dialogue: 0,0:28:27.69,0:28:33.00,Default,,0000,0000,0000,,be in the Nazi Party during World War 2\Nand then who later just went back into a Dialogue: 0,0:28:33.00,0:28:37.34,Default,,0000,0000,0000,,civil life and even received the\NBundesverdienstkreuz, the order of merit Dialogue: 0,0:28:37.34,0:28:42.32,Default,,0000,0000,0000,,of the Federal Republic of Germany. And\Nyou can find those… in this case I've done Dialogue: 0,0:28:42.32,0:28:46.60,Default,,0000,0000,0000,,it with three triples, which is, the\Nperson was a member of this political Dialogue: 0,0:28:46.60,0:28:51.51,Default,,0000,0000,0000,,party and received this award. And also\NI've added that they're "instance of: Dialogue: 0,0:28:51.51,0:28:55.04,Default,,0000,0000,0000,,human", because we also have a lot of\Nfictional data on Wikidata. You already Dialogue: 0,0:28:55.04,0:28:57.70,Default,,0000,0000,0000,,saw that with the Neverending Story stuff\Nearlier. So there might also be a Dialogue: 0,0:28:57.70,0:29:02.04,Default,,0000,0000,0000,,fictional character who was a member of\Nthis political party and who received the Dialogue: 0,0:29:02.04,0:29:07.30,Default,,0000,0000,0000,,award, and we're not really interested in\Nthose. So we add "instance of: human", and Dialogue: 0,0:29:07.30,0:29:11.42,Default,,0000,0000,0000,,then we are certain that we only get real\Nresults and not fictional results. And it Dialogue: 0,0:29:11.42,0:29:14.41,Default,,0000,0000,0000,,doesn't really cost us anything because\Nthe Query Service can optimize that pretty Dialogue: 0,0:29:14.41,0:29:22.16,Default,,0000,0000,0000,,well. So let's write that… actually, let's\Ndo that here. So the item should be Dialogue: 0,0:29:22.16,0:29:31.67,Default,,0000,0000,0000,,"instance of: human", which is Q5, because\Nit's a very common item, and "member of Dialogue: 0,0:29:31.67,0:29:39.92,Default,,0000,0000,0000,,political party". And you can see I can\Nsearch by the German abbreviation and find Dialogue: 0,0:29:39.92,0:29:44.25,Default,,0000,0000,0000,,this, even though it's not a label,\Nbecause there are search aliases. And also Dialogue: 0,0:29:44.25,0:29:48.69,Default,,0000,0000,0000,,"award received", the\NBundesverdienstkreuz, because I can't be Dialogue: 0,0:29:48.69,0:29:54.30,Default,,0000,0000,0000,,bothered to type in the whole English\Nname. There we go. And we find, I think… Dialogue: 0,0:29:54.30,0:30:03.72,Default,,0000,0000,0000,,how many results? Eleven results. Yeah.\NAnd this actually isn't quite correct, Dialogue: 0,0:30:03.72,0:30:10.25,Default,,0000,0000,0000,,because in theory, you don't get this\Norder, this order has like 11 parts or Dialogue: 0,0:30:10.25,0:30:15.31,Default,,0000,0000,0000,,something. You can get the Grand Cross\Nwith Distinction or you can get the Star Dialogue: 0,0:30:15.31,0:30:19.28,Default,,0000,0000,0000,,or whatever. I think it's listed somewhere\Nhere. Yeah, you can get the Grand Cross Dialogue: 0,0:30:19.28,0:30:22.58,Default,,0000,0000,0000,,Special Class, you can get the Grand Cross\NSpecial Issue, you can get the Grand Cross Dialogue: 0,0:30:22.58,0:30:27.02,Default,,0000,0000,0000,,First Class, blah blah blah. And so, in\Ntheory, any of these people should have Dialogue: 0,0:30:27.02,0:30:34.19,Default,,0000,0000,0000,,one of these awards and not just "order of\Nmerit". But I think when I checked, all of Dialogue: 0,0:30:34.19,0:30:42.19,Default,,0000,0000,0000,,them just had… all the results, just had\Ndirectly "order of merit". But actually, Dialogue: 0,0:30:42.19,0:30:48.23,Default,,0000,0000,0000,,no we can try to search for the correct\Nones instead. So it would not be part of Dialogue: 0,0:30:48.23,0:30:53.65,Default,,0000,0000,0000,,this directly, it would be… "award\Nreceived" would be some award, such as Dialogue: 0,0:30:53.65,0:31:03.31,Default,,0000,0000,0000,,this one, and then this award is part of\Nthe order of merit, so "award"… "part of"… Dialogue: 0,0:31:03.31,0:31:14.67,Default,,0000,0000,0000,,Let's see if that finds any results. Oh.\NOh. Oh, dear. Yeah, that, that… that's a Dialogue: 0,0:31:14.67,0:31:21.21,Default,,0000,0000,0000,,lot of results. "Herbert von Karajan".\NThat's that's depressing. OK, yeah. OK, so Dialogue: 0,0:31:21.21,0:31:24.00,Default,,0000,0000,0000,,I think I… when I tried this out and\Ndidn't find any results, I just did Dialogue: 0,0:31:24.00,0:31:30.43,Default,,0000,0000,0000,,something wrong because, this way we find\Na lot more results. And if we… so we don't Dialogue: 0,0:31:30.43,0:31:35.66,Default,,0000,0000,0000,,actually select the award here, because we\Ndon't care what kind of award they got. So Dialogue: 0,0:31:35.66,0:31:41.71,Default,,0000,0000,0000,,we could also use this abbreviation again,\Nlike this. So we just say they got some Dialogue: 0,0:31:41.71,0:31:47.28,Default,,0000,0000,0000,,award, which is part of the order of\Nmerit. And in this case, we could even Dialogue: 0,0:31:47.28,0:31:54.00,Default,,0000,0000,0000,,abbreviate that further and say, we put a\Nslash here. And then, that kind of Dialogue: 0,0:31:54.00,0:31:58.42,Default,,0000,0000,0000,,describes a path that you have to take\Nfrom this item to this item and you have Dialogue: 0,0:31:58.42,0:32:03.90,Default,,0000,0000,0000,,to first get to some award received. And\Nthen that has to be part of something Dialogue: 0,0:32:03.90,0:32:08.02,Default,,0000,0000,0000,,else. And you can add as many elements\Nhere as you want. And then we get the Dialogue: 0,0:32:08.02,0:32:17.54,Default,,0000,0000,0000,,exact same 802 results… and… lots of well-\Nknown names here. And if we want to find Dialogue: 0,0:32:17.54,0:32:21.50,Default,,0000,0000,0000,,the original 11 ones that directly had the\Norder of merit as the award received, we Dialogue: 0,0:32:21.50,0:32:25.97,Default,,0000,0000,0000,,can add a question mark here, which is\Njust like in a regular expression, it says Dialogue: 0,0:32:25.97,0:32:32.36,Default,,0000,0000,0000,,this part is optional. They can have\Ndirectly received this award or they can Dialogue: 0,0:32:32.36,0:32:36.09,Default,,0000,0000,0000,,have received some award, which is part of\Nthe order of merit. And then we should get Dialogue: 0,0:32:36.09,0:32:47.54,Default,,0000,0000,0000,,813. Yeah, 813 results, so 802, plus the\N11 from earlier. And… I'm starting this Dialogue: 0,0:32:47.54,0:32:53.02,Default,,0000,0000,0000,,with "instance of: human", which… and the\NQuery Service is going to re-order this Dialogue: 0,0:32:53.02,0:32:57.21,Default,,0000,0000,0000,,because searching for all the humans and\Nthen filtering for the ones who are in Dialogue: 0,0:32:57.21,0:33:01.27,Default,,0000,0000,0000,,this political party and so on wouldn't be\Nefficient. So I don't have to worry about Dialogue: 0,0:33:01.27,0:33:05.97,Default,,0000,0000,0000,,that. I could write it in this order, or I\Ncould shuffle it around. Doesn't make any Dialogue: 0,0:33:05.97,0:33:10.02,Default,,0000,0000,0000,,difference. The Query Service already\Nknows in which order to do these things. Dialogue: 0,0:33:10.02,0:33:14.11,Default,,0000,0000,0000,,So you don't have to worry about that. You\Ncan just start with "is a human" and then Dialogue: 0,0:33:14.11,0:33:23.31,Default,,0000,0000,0000,,add everything else. I think I have one\Nmore complicated query here. Yeah, so Dialogue: 0,0:33:23.31,0:33:27.62,Default,,0000,0000,0000,,that's one of the examples I mentioned\Nearlier, the largest cities by population Dialogue: 0,0:33:27.62,0:33:33.20,Default,,0000,0000,0000,,with a female mayor. So the graph for that\Nis, I think the largest one I prepared for Dialogue: 0,0:33:33.20,0:33:37.57,Default,,0000,0000,0000,,the slides, except the one in the\Nbeginning. And it looks like this. We Dialogue: 0,0:33:37.57,0:33:41.34,Default,,0000,0000,0000,,should have a city which is a city,\N"instance of: city", and it has a certain Dialogue: 0,0:33:41.34,0:33:45.99,Default,,0000,0000,0000,,population, and it has… so for the mayor,\Nwe use the same property as for head of Dialogue: 0,0:33:45.99,0:33:52.27,Default,,0000,0000,0000,,government. And if you don't know that,\Nyou could look at some city like Berlin Dialogue: 0,0:33:52.27,0:33:59.28,Default,,0000,0000,0000,,and maybe you know what the mayor of\NBerlin is called… what was it?. Something Dialogue: 0,0:33:59.28,0:34:04.54,Default,,0000,0000,0000,,"Müller", I think. Yeah. And then you can\Nsee, aha, the property for the mayor is Dialogue: 0,0:34:04.54,0:34:13.91,Default,,0000,0000,0000,,"head of government". Or you could also\Nsearch for, the city should have a mayor, Dialogue: 0,0:34:13.91,0:34:19.49,Default,,0000,0000,0000,,and then you'll still find "head of\Ngovernment", the right property. And that Dialogue: 0,0:34:19.49,0:34:24.88,Default,,0000,0000,0000,,mayor should be a human and she should\Nhave the gender "female". Oops. There's a Dialogue: 0,0:34:24.88,0:34:28.37,Default,,0000,0000,0000,,question mark there for no reason at all.\NThat's not a variable. That should be the Dialogue: 0,0:34:28.37,0:34:36.94,Default,,0000,0000,0000,,fixed value. Sorry. So let's put that\Nthere. We have a city which is "instance Dialogue: 0,0:34:36.94,0:34:49.76,Default,,0000,0000,0000,,of: city", and it also has a population\Nwhich we're going to use later and it also Dialogue: 0,0:34:49.76,0:34:55.14,Default,,0000,0000,0000,,has a head of government. No, that's\Nwrong. Not the "office held by head of Dialogue: 0,0:34:55.14,0:34:59.38,Default,,0000,0000,0000,,government", the "head of government"\Nitself, which we call the mayor and then Dialogue: 0,0:34:59.38,0:35:17.61,Default,,0000,0000,0000,,the mayor is "instance of: human" and\Ngender should be female… come on… female. Dialogue: 0,0:35:17.61,0:35:27.65,Default,,0000,0000,0000,,And let's select the city, cityLabel,\NmayorLabel and also the population. And Dialogue: 0,0:35:27.65,0:35:31.22,Default,,0000,0000,0000,,then we find some 83 results. That's not\Nyet the largest cities with a female Dialogue: 0,0:35:31.22,0:35:37.27,Default,,0000,0000,0000,,mayor. That's just all of them. And in\NWikidata we know about 83, apparently. And Dialogue: 0,0:35:37.27,0:35:41.74,Default,,0000,0000,0000,,if your local hometown has a female mayor,\Njust go ahead and add it to Wikidata and Dialogue: 0,0:35:41.74,0:35:47.01,Default,,0000,0000,0000,,it's probably relevant. It's not– So the\Nrelevance criteria are not as strict as on Dialogue: 0,0:35:47.01,0:35:52.53,Default,,0000,0000,0000,,Wikipedia fortunately. But if we want just\Nthe most populous ones, we can go a bit Dialogue: 0,0:35:52.53,0:35:59.76,Default,,0000,0000,0000,,back into SQL land and say we want to\NORDER BY the population and in SQL you Dialogue: 0,0:35:59.76,0:36:03.42,Default,,0000,0000,0000,,would write DESC afterwards and in SPARQL\Nit's different. You write Dialogue: 0,0:36:03.42,0:36:09.70,Default,,0000,0000,0000,,DESC(?population). Erm, I think it's nicer\Nthat way. But perhaps it would have been Dialogue: 0,0:36:09.70,0:36:13.74,Default,,0000,0000,0000,,nicer to just stick with the SQL syntax. I\Ndon't know. And we want to limit this to Dialogue: 0,0:36:13.74,0:36:19.16,Default,,0000,0000,0000,,just the ten most populous cities, for\Nexample. And here we go. Tokyo is Dialogue: 0,0:36:19.16,0:36:25.82,Default,,0000,0000,0000,,currently the biggest one, then Hong Kong,\NBaghdad, Surabaya, Rome. Yeah. And, oh. Dialogue: 0,0:36:25.82,0:36:37.19,Default,,0000,0000,0000,,This doesn't make that much sense, Caracas\Nhas two mayors. Anyone… yeah, exactly. So Dialogue: 0,0:36:37.19,0:36:43.82,Default,,0000,0000,0000,,we're only supposed to get the current\Nmayor. Head of government… yeah. Does Dialogue: 0,0:36:43.82,0:36:51.89,Default,,0000,0000,0000,,anyone know which one is the current one?\NOr we could just check Wikipedia… Caracas, Dialogue: 0,0:36:51.89,0:36:55.73,Default,,0000,0000,0000,,which hopefully doesn't get it's\Ninformation from Wikidata yet. So it's not Dialogue: 0,0:36:55.73,0:37:07.94,Default,,0000,0000,0000,,circular. And the mayor is… Carolina,\NCarolina Cestari… Cestari, I don't know. Dialogue: 0,0:37:12.09,0:37:14.66,Default,,0000,0000,0000,,{\i1}laughter{\i0} Dialogue: 0,0:37:14.66,0:37:25.42,Default,,0000,0000,0000,,OK, so let's add a new one. Ah…? Doesn't\Nhave an item yet, is that… is that the Dialogue: 0,0:37:25.42,0:37:31.37,Default,,0000,0000,0000,,mayor, or is chief of government something\Nelse? Doesn't occur anywhere else on the Dialogue: 0,0:37:31.37,0:37:45.42,Default,,0000,0000,0000,,page, of course. Local government… mayor…\Nno. OK, so let's just… I don't know, Dialogue: 0,0:37:45.42,0:37:55.06,Default,,0000,0000,0000,,doesn't she have a Wikipedia article? No.\NJust appears in some lists and then she Dialogue: 0,0:37:55.06,0:38:01.21,Default,,0000,0000,0000,,doesn't have a Wikidata item yet? No.\NThen… I don't know. We'll do some live Dialogue: 0,0:38:01.21,0:38:04.66,Default,,0000,0000,0000,,Wikidata editing. It wasn't part of this\Ntalk, but let's just do it. Carolina Dialogue: 0,0:38:04.66,0:38:17.27,Default,,0000,0000,0000,,Cestari… what country is that? Venezuela.\NVenezuelan politician, and that sounds Dialogue: 0,0:38:17.27,0:38:22.61,Default,,0000,0000,0000,,like a female name, so I'm just going to\Nguess and check that after the talk. So Dialogue: 0,0:38:22.61,0:38:29.33,Default,,0000,0000,0000,,she's definitely a human. And gender is\Nfemale and that is going to be enough for Dialogue: 0,0:38:29.33,0:38:37.93,Default,,0000,0000,0000,,our query. Do this search again. There we\Ngo. And set this to preferred rank. So Dialogue: 0,0:38:37.93,0:38:40.56,Default,,0000,0000,0000,,that's how the Query Service knows that\Nthis is the current value and it should Dialogue: 0,0:38:40.56,0:38:44.50,Default,,0000,0000,0000,,only return this one. And ideally, one of\Nthe head of government values should have Dialogue: 0,0:38:44.50,0:38:50.24,Default,,0000,0000,0000,,this preferred rank to mark it as the\Ncorrect current value. And then all the Dialogue: 0,0:38:50.24,0:38:53.64,Default,,0000,0000,0000,,other ones are additional data that you\Ncan use if you want. But it's not the main Dialogue: 0,0:38:53.64,0:39:00.86,Default,,0000,0000,0000,,value and we are not going to get it in a\Nsimple query. And then there's some error Dialogue: 0,0:39:00.86,0:39:06.26,Default,,0000,0000,0000,,because Caracas isn't some kind of\Npolitical territorial entity and it should Dialogue: 0,0:39:06.26,0:39:12.58,Default,,0000,0000,0000,,have a start time. I don't care right now.\NOK, so we run this query again and Dialogue: 0,0:39:12.58,0:39:21.40,Default,,0000,0000,0000,,hopefully get just one result for Caracas\Nthis time. No. Uhm, we have to wait a bit Dialogue: 0,0:39:21.40,0:39:26.45,Default,,0000,0000,0000,,until the Query Service is updated.\NBecause it's kind of asynchronous. It just Dialogue: 0,0:39:26.45,0:39:33.64,Default,,0000,0000,0000,,keeps watching for changes and eventually\Nit will get the new data, but… okay. It Dialogue: 0,0:39:33.64,0:39:42.08,Default,,0000,0000,0000,,might take a bit longer. Anyways. That's\Nhow that query works. Does that make kind Dialogue: 0,0:39:42.08,0:39:51.71,Default,,0000,0000,0000,,of sense? OK, great. Yeah, I think this is\Nalmost exactly what I wrote here. Yeah. Dialogue: 0,0:39:51.71,0:39:56.04,Default,,0000,0000,0000,,Except with some labels and the label\Nservice. Yeah. There is one problem here, Dialogue: 0,0:39:56.04,0:40:02.02,Default,,0000,0000,0000,,which is, for example, I happen to know\Nthat Mexico City is a very large city with Dialogue: 0,0:40:02.02,0:40:11.43,Default,,0000,0000,0000,,a population of… population: almost 9\Nmillion. So it should be right after Tokyo Dialogue: 0,0:40:11.43,0:40:19.26,Default,,0000,0000,0000,,in front of Hong Kong. And the head of\Ngovernment is a Claudia Sheinbaum or Dialogue: 0,0:40:19.26,0:40:23.98,Default,,0000,0000,0000,,something, which sounds like a woman. So\Nwe should get this result in the query. Dialogue: 0,0:40:23.98,0:40:29.09,Default,,0000,0000,0000,,The reason we don't is that Mexico City is\Nan instance of "big city" and we have Dialogue: 0,0:40:29.09,0:40:35.47,Default,,0000,0000,0000,,searched for "instance of: city". And\Nthere's some debate about does this class Dialogue: 0,0:40:35.47,0:40:39.86,Default,,0000,0000,0000,,even make sense at all? I think this is\Nactually the German classification of, a Dialogue: 0,0:40:39.86,0:40:43.86,Default,,0000,0000,0000,,big city is one with 100 000 Inhabitants,\Nand in other languages or countries, a big Dialogue: 0,0:40:43.86,0:40:49.00,Default,,0000,0000,0000,,city might be something else, but for now\Nthat… the data is what it is. Fortunately, Dialogue: 0,0:40:49.00,0:40:54.05,Default,,0000,0000,0000,,what we have here is the information, a\N"big city" is a subclass of a city/town, Dialogue: 0,0:40:54.05,0:41:04.60,Default,,0000,0000,0000,,which is a subclass of "locality", which\Nis a subclass of. Wait. We should arrive Dialogue: 0,0:41:04.60,0:41:07.79,Default,,0000,0000,0000,,at city at some point, but I think we've\Nalready gone past that. It's also an Dialogue: 0,0:41:07.79,0:41:12.08,Default,,0000,0000,0000,,instance of capital. Let's go down that\Ninstead. A capital is a subclass of city, Dialogue: 0,0:41:12.08,0:41:16.67,Default,,0000,0000,0000,,there we go. So if we can tell the Query\NService to follow these subclass Dialogue: 0,0:41:16.67,0:41:22.61,Default,,0000,0000,0000,,connections, then we should find these\Ncities. And one way to do that… to make it Dialogue: 0,0:41:22.61,0:41:29.50,Default,,0000,0000,0000,,work for Mexico City would be to say, it\Nhas to be "instance of", some, with the Dialogue: 0,0:41:29.50,0:41:37.16,Default,,0000,0000,0000,,path again, "subclass of: city" and then\Nwe would find Mexico City, but we would Dialogue: 0,0:41:37.16,0:41:42.69,Default,,0000,0000,0000,,not find all the… oh, we would still find\NTokyo because it's still a capital, I Dialogue: 0,0:41:42.69,0:41:47.32,Default,,0000,0000,0000,,guess. But we've missed a lot of other\Ncities, I think which we used to have… Dialogue: 0,0:41:47.32,0:41:53.61,Default,,0000,0000,0000,,yeah. Rome, for example, is gone. Because\Nit's… that's just an instance of city Dialogue: 0,0:41:53.61,0:41:57.42,Default,,0000,0000,0000,,directly. And we've now made the subclass\Nmandatory. What we should do is make it Dialogue: 0,0:41:57.42,0:42:02.49,Default,,0000,0000,0000,,optional, or even better, we would– we\Nshould say there can be any number of this Dialogue: 0,0:42:02.49,0:42:06.96,Default,,0000,0000,0000,,element. So there… it can be an instance\Nof city or it can be an instance of a Dialogue: 0,0:42:06.96,0:42:10.84,Default,,0000,0000,0000,,subclass of city, it can be an instance of\Na subclass of a subclass of city. You can Dialogue: 0,0:42:10.84,0:42:14.36,Default,,0000,0000,0000,,follow any number of elements, that what\Nthis… that's what this star means, just Dialogue: 0,0:42:14.36,0:42:19.39,Default,,0000,0000,0000,,like in a regular expression. And then we\Nprobably have to say we only want the Dialogue: 0,0:42:19.39,0:42:24.36,Default,,0000,0000,0000,,distinct ones because they are like five\Ndifferent ways to go through the subclass Dialogue: 0,0:42:24.36,0:42:30.05,Default,,0000,0000,0000,,tree until you've found "city". And we're\Nnot interested in the different ways. But Dialogue: 0,0:42:30.05,0:42:35.33,Default,,0000,0000,0000,,now we should get Tokyo and Mexico City.\NAnd Rome is also here and Caracas is Dialogue: 0,0:42:35.33,0:42:39.25,Default,,0000,0000,0000,,completely gone because we found enough\Nother cities which we were missing Dialogue: 0,0:42:39.25,0:42:45.81,Default,,0000,0000,0000,,earlier. So you kind of have to watch out\Nand sometimes use elements like this… Dialogue: 0,0:42:45.81,0:42:51.94,Default,,0000,0000,0000,,"subclass of"-tree is pretty common, or\Nwith a, something… order of merit, we had Dialogue: 0,0:42:51.94,0:42:56.84,Default,,0000,0000,0000,,to use this "part of". You have to watch\Nout if the results are plausible, or Dialogue: 0,0:42:56.84,0:43:00.57,Default,,0000,0000,0000,,ideally, you know some item that should be\Nin the results, and then you check, is it Dialogue: 0,0:43:00.57,0:43:05.78,Default,,0000,0000,0000,,there? Why is it not there? And\Ninvestigate like that. But that's a fixed Dialogue: 0,0:43:05.78,0:43:10.91,Default,,0000,0000,0000,,version of the query. And… yeah, if we\Nwere not interested in the mayor, we could Dialogue: 0,0:43:10.91,0:43:15.02,Default,,0000,0000,0000,,do the same trick again. But, yeah. It\Ndoesn't make that much of a difference. Dialogue: 0,0:43:15.02,0:43:19.12,Default,,0000,0000,0000,,And I think… yeah, that was almost the\Nonly difference. Yeah, except that I Dialogue: 0,0:43:19.12,0:43:22.83,Default,,0000,0000,0000,,removed the population so we can order by\Na variable that you don't select in the Dialogue: 0,0:43:22.83,0:43:33.76,Default,,0000,0000,0000,,end if you want. And I think I am out of\Nslides. So, yeah, if you want to see more Dialogue: 0,0:43:33.76,0:43:38.03,Default,,0000,0000,0000,,queries, you can look at these Twitter or\Nsocial media accounts. There's a huge list Dialogue: 0,0:43:38.03,0:43:43.30,Default,,0000,0000,0000,,of example queries on Wikidata, which is\Nso big that it's getting too big for a Dialogue: 0,0:43:43.30,0:43:46.50,Default,,0000,0000,0000,,wiki page, and people had to move some\Nqueries out there and it's kind of just Dialogue: 0,0:43:46.50,0:43:50.89,Default,,0000,0000,0000,,grown since 2015 or something. And there's\Na lot of garbage there, but also a lot of Dialogue: 0,0:43:50.89,0:43:55.97,Default,,0000,0000,0000,,useful queries if you want to look at\Nthat. And I had two more queries in the Dialogue: 0,0:43:55.97,0:44:00.90,Default,,0000,0000,0000,,talk description which we haven't talked\Nabout yet, and I think we have the time. I Dialogue: 0,0:44:00.90,0:44:04.40,Default,,0000,0000,0000,,can just try to open these. "Which films\Nstarred more than one future head of Dialogue: 0,0:44:04.40,0:44:15.21,Default,,0000,0000,0000,,government?" Does that work? It doesn't.\NCan I copy the URL here? Yeah, copy link Dialogue: 0,0:44:15.21,0:44:20.70,Default,,0000,0000,0000,,address. So that's a kind of longer query,\Nwhich is why it didn't really fit on one Dialogue: 0,0:44:20.70,0:44:26.48,Default,,0000,0000,0000,,slide. But the important film is you have…\Ner, the important part is you have some Dialogue: 0,0:44:26.48,0:44:32.48,Default,,0000,0000,0000,,film… instance of, or subclass of film, it\Nhas a publication date and a cast member, Dialogue: 0,0:44:32.48,0:44:41.07,Default,,0000,0000,0000,,which is the head of government. And the\Nhead of government held some position, Dialogue: 0,0:44:41.07,0:44:47.01,Default,,0000,0000,0000,,some head of government, er, some subclass\Nof head of government. And that should be Dialogue: 0,0:44:47.01,0:44:53.33,Default,,0000,0000,0000,,after the film was published. And then you\Nget a bunch of results. I think this takes Dialogue: 0,0:44:53.33,0:45:00.07,Default,,0000,0000,0000,,like 11 seconds or something. And you get\Nlike films with Schwarzenegger and one Dialogue: 0,0:45:00.07,0:45:05.75,Default,,0000,0000,0000,,other actor who became US governor. I\Ndon't remember the name. And you also get Dialogue: 0,0:45:05.75,0:45:09.89,Default,,0000,0000,0000,,a lot of… or several films from World War\NII with future French heads of government, Dialogue: 0,0:45:09.89,0:45:15.91,Default,,0000,0000,0000,,which is really cool. So, like a film that\Nwas shot about the liberation of Paris, Dialogue: 0,0:45:15.91,0:45:20.29,Default,,0000,0000,0000,,where it's… it's kind of a stretch to call\Nthem cast members, but they're definitely Dialogue: 0,0:45:20.29,0:45:26.19,Default,,0000,0000,0000,,in the film. And if we get the result,\Nthen I can tell you what the film is Dialogue: 0,0:45:26.19,0:45:35.38,Default,,0000,0000,0000,,called. Yeah, it might be busy right now,\Nso you get up to 60 seconds in the Query Dialogue: 0,0:45:35.38,0:45:40.21,Default,,0000,0000,0000,,Service and then in the end your query is\Nkilled if it takes longer than that. So Dialogue: 0,0:45:40.21,0:45:43.04,Default,,0000,0000,0000,,sometimes it can be a bit of a struggle to\Nmake the query work within 60 seconds. Dialogue: 0,0:45:43.04,0:45:48.36,Default,,0000,0000,0000,,There we go, 50 seconds. That was close.\NSo there's yeah, there's a "La Libération Dialogue: 0,0:45:48.36,0:45:52.45,Default,,0000,0000,0000,,de Paris" with Charles de Gaulle, who was\Npresident of the Council and president of Dialogue: 0,0:45:52.45,0:45:58.24,Default,,0000,0000,0000,,the provisional government, and also\NGeorges Bidault, I think, who was prime Dialogue: 0,0:45:58.24,0:46:02.70,Default,,0000,0000,0000,,minister and president of the Council, and\Nother stuff. We have several Indian films Dialogue: 0,0:46:02.70,0:46:09.59,Default,,0000,0000,0000,,with people who went on to become chief\Nministers. And then down here there's some Dialogue: 0,0:46:09.59,0:46:14.49,Default,,0000,0000,0000,,Canadian politicians, apparently. And then\Nhere's Arnold Schwarzenegger and Jesse Dialogue: 0,0:46:14.49,0:46:21.45,Default,,0000,0000,0000,,Ventura, who both became governors and\Nalso starred in several films. And the Dialogue: 0,0:46:21.45,0:46:26.32,Default,,0000,0000,0000,,other thing was, we have a lot of data\Nabout the British government because a lot Dialogue: 0,0:46:26.32,0:46:31.67,Default,,0000,0000,0000,,of volunteers have just been slaving away\Nat that data and adding and adding more Dialogue: 0,0:46:31.67,0:46:38.79,Default,,0000,0000,0000,,information. I think they've… they have\Nall their parliaments, complete with party Dialogue: 0,0:46:38.79,0:46:42.99,Default,,0000,0000,0000,,affiliations and everything for at least\Nthe last 100 years and some partial data Dialogue: 0,0:46:42.99,0:46:47.02,Default,,0000,0000,0000,,for a lot more than that, because they\Nhave a very long parliamentary history. Dialogue: 0,0:46:47.02,0:46:51.18,Default,,0000,0000,0000,,And then you can do queries like "how many\Npeople named John are there in Dialogue: 0,0:46:51.18,0:46:56.42,Default,,0000,0000,0000,,parliament", and "how many women with any\Nname". And you can see when the women were Dialogue: 0,0:46:56.42,0:47:01.71,Default,,0000,0000,0000,,finally more than just the men who are\Nnamed "John". And it's kind of an amusing Dialogue: 0,0:47:01.71,0:47:08.16,Default,,0000,0000,0000,,graph. Or not so amusing. Takes a while as\Nwell. I hope it doesn't take 50 seconds, Dialogue: 0,0:47:08.16,0:47:13.55,Default,,0000,0000,0000,,but it looks like the Query Service might\Nbe busy at the moment. But I think it was Dialogue: 0,0:47:13.55,0:47:19.91,Default,,0000,0000,0000,,something like in 1991 or so is the\Ncrossover point. Oh yeah. And I should Dialogue: 0,0:47:19.91,0:47:23.84,Default,,0000,0000,0000,,mention anyway, so everything we saw right\Nnow was just a lot of tables. But you can Dialogue: 0,0:47:23.84,0:47:31.17,Default,,0000,0000,0000,,also show results in different ways, such\Nas a line chart. There we go. So in 1992, Dialogue: 0,0:47:31.17,0:47:35.39,Default,,0000,0000,0000,,this was the first parliament which had\Nmore women than Johns. And then the Johns Dialogue: 0,0:47:35.39,0:47:41.48,Default,,0000,0000,0000,,have slightly declined and the women have\Ngone up to 220. How many people are in the Dialogue: 0,0:47:41.48,0:47:47.69,Default,,0000,0000,0000,,House of Commons in total? Does anyone\Nknow? No. So I don't know what percentage Dialogue: 0,0:47:47.69,0:47:52.50,Default,,0000,0000,0000,,this is. Uh, but, this was… yeah, this\Nlatest election from 12 December already Dialogue: 0,0:47:52.50,0:48:02.74,Default,,0000,0000,0000,,in there. Yeah. {\i1}indistinguishable{\i0}. What?\NSo the query looks like this. So this one Dialogue: 0,0:48:02.74,0:48:06.40,Default,,0000,0000,0000,,is broken into several parts. We first\Nfind all the members of parliament, so Dialogue: 0,0:48:06.40,0:48:10.51,Default,,0000,0000,0000,,they should be human, again, no fictional\Npeople, and then they should have some Dialogue: 0,0:48:10.51,0:48:15.54,Default,,0000,0000,0000,,"position held", which is a subclass of\N"member of parliament" in the House of Dialogue: 0,0:48:15.54,0:48:22.44,Default,,0000,0000,0000,,Commons. And then there should also be,\Num, a parliamentary term on that, so that Dialogue: 0,0:48:22.44,0:48:27.66,Default,,0000,0000,0000,,we know which parliament it is and when it\Nstarts. And then down here, we import all Dialogue: 0,0:48:27.66,0:48:35.23,Default,,0000,0000,0000,,those MPs and filter for just the ones\Nwith the "given name: John". And then we Dialogue: 0,0:48:35.23,0:48:39.99,Default,,0000,0000,0000,,filter for just the ones with "gender:\Nfemale". And there's an optional "subclass Dialogue: 0,0:48:39.99,0:48:44.26,Default,,0000,0000,0000,,of" in here, because currently the data\Nmodel is that there is a separate item for Dialogue: 0,0:48:44.26,0:48:49.41,Default,,0000,0000,0000,,transgender female and someone can have\N"gender: transfemale– transgender female", Dialogue: 0,0:48:49.41,0:48:52.94,Default,,0000,0000,0000,,which is a subclass of "female". And there\Nis a discussion right now to get rid of Dialogue: 0,0:48:52.94,0:48:56.52,Default,,0000,0000,0000,,that and have a separate property for that\Ninstead. And then all the trans people Dialogue: 0,0:48:56.52,0:48:59.39,Default,,0000,0000,0000,,just have "gender:", their right gender,\Nand you don't have to mess with subclass. Dialogue: 0,0:48:59.39,0:49:03.66,Default,,0000,0000,0000,,But right now we still… well, we need it\Nin theory, I don't think there are any MPs Dialogue: 0,0:49:03.66,0:49:08.54,Default,,0000,0000,0000,,in practice. But, you know, you know, you\Ncan just keep it in there. And then we Dialogue: 0,0:49:08.54,0:49:15.36,Default,,0000,0000,0000,,import the results and get them here\Neither as a line chart or as a table, if Dialogue: 0,0:49:15.36,0:49:20.77,Default,,0000,0000,0000,,you want to sort it by the time… yeah, the\Ndata starts in 1919, apparently. So we Dialogue: 0,0:49:20.77,0:49:25.45,Default,,0000,0000,0000,,have exactly a hundred years of history\Nthere. We can also show it as a bar chart, Dialogue: 0,0:49:25.45,0:49:30.53,Default,,0000,0000,0000,,if that makes more sense. No it doesn't.\NThat makes no sense. Line chart is the Dialogue: 0,0:49:30.53,0:49:35.06,Default,,0000,0000,0000,,right one. Oh, right, but if you show the\Nline chart again, then it breaks for some Dialogue: 0,0:49:35.06,0:49:39.06,Default,,0000,0000,0000,,reason, there's some bug there. So let's\Njust show it again. There we go. That's Dialogue: 0,0:49:39.06,0:49:47.16,Default,,0000,0000,0000,,the right… chart. Yeah, and I guess… oh\Nwow, it's already… 50 minutes, so I guess Dialogue: 0,0:49:47.16,0:49:55.36,Default,,0000,0000,0000,,this is the point where we start moving to\Nthe live querying part, and I was told I Dialogue: 0,0:49:55.36,0:49:58.69,Default,,0000,0000,0000,,should make at least a short break for the\Nstream, so the Angels know where to cut Dialogue: 0,0:49:58.69,0:50:02.77,Default,,0000,0000,0000,,between. But we could also take a 10\Nminute's break and then start the next Dialogue: 0,0:50:02.77,0:50:09.17,Default,,0000,0000,0000,,talk on time. Does that sound OK? Or is 10\Nminutes too long? Uhm, if you're going to Dialogue: 0,0:50:09.17,0:50:13.67,Default,,0000,0000,0000,,stay here, which would be very nice, then\Nplease think of some example queries that Dialogue: 0,0:50:13.67,0:50:16.82,Default,,0000,0000,0000,,you think we could write, and then I can\Ntry to write them, because otherwise I'm Dialogue: 0,0:50:16.82,0:50:21.57,Default,,0000,0000,0000,,not going to have much to do. But yeah,\Nlet's do a 10 minute break and see you Dialogue: 0,0:50:21.57,0:50:24.57,Default,,0000,0000,0000,,then. Thank you so far. Dialogue: 0,0:50:24.57,0:50:27.22,Default,,0000,0000,0000,,{\i1}Applause{\i0} Dialogue: 0,0:50:27.22,0:50:32.43,Default,,0000,0000,0000,,{\i1}Postroll Music{\i0} Dialogue: 0,0:50:32.43,0:50:55.00,Default,,0000,0000,0000,,Subtitles created by c3subtitles.de\Nin the year 2021. Join, and help us!