Introduction to the Swedish Project
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Ainali, Jan
Eriksson, Daniel
Citations in Swedish Parliamentary and Judicial documents and their use
 Hello and welcome to this wiki site session. We're going to talk Swedish Parliament and New Digital documents and their use. And your host tonight is me, Jan Einle and Daniel Ekshaw. Hello. How are you doing Daniel? Very well thanks. It's a wonderful rainy evening here in Stockholm. We had a pleasant day here. A little bit first of an autumn day here in Amsterdam. So what we're going to talk about today is quite of a long project, but we're still just in the midst of it, I would say. We have so much ideas, but it's about this golden treasure of the open data portal of the Swedish riksdag, the Parliament of Sweden. But before we go into the depth of that, we want to give you a little bit of introduction to how we got started. And before we go into depth, I want to give you some housekeeping things. So everything today, we have the WMF the Wikimedia Foundation Friendly Space Policy that we're here to. So please be friendly to watch each other in the chats. And we have the chats activated here both on YouTube and on Periscope and we're also streaming this to the Swedish Wikipedia group, Facebook group. So you can all comment there and we will see it and can bring it up. And we have already had like a friendly hi-all from FIWI here. So please ask us questions during this entire session because I think there are things that you might want to know more of that we have so internalized to even bring it up because we have been thinking and talking about this a lot. Yeah, there might be a lot of special peculiarities with how the Swedish system works that we don't quite think about but not everyone knows. Yeah, and we have learned a lot about the Swedish peculiar system when we have digging into this. And I think that's almost like it's everything when you go into the Wikidata and think, ah, I know this topic, I can model this. And then of course you see, ah, no, it's much more complicated in reality. And what else do we have? So you can comment directly where you're watching, but if you rather want to, you can also comment in the Telegram group for Wikisite. And yeah, that's about it. So let's dive into the introduction of Swedish project. I'm going to share my screen here. This is the share screen. So Wikiproject Sweden. I guess most of you people know about Wikiprojects in general. And Wikisite is of course kind of a Wikiproject. But we, when we started here, it turned out that there were already a lot of things done in regards to Wikidata and Sweden. And I guess most of the countries have this kind of properties country box where you can see the properties that are available to you when it's related to your country. And that's sort of where we started. But when we started to get into the nitty-gritty of things, we saw that there were already things being done before we even got here. So one of the first thing is this sub-project from the Wikiproject EveryPolitician which is of course a much larger project that started years ago and which had much larger scope like trying to get every politician onto Wikidata and see if it loads here. Yes. And we have this little bit of tracker here and I think we have just gotten up to two stars here on Sweden during this because one of the first things we wanted to do before actually going anywhere was to get all the parliamentarians into this. And we're going to meet some of the people who have been in that process as well. And the most complicated things about that was that most of the politicians already had an article on Swedish Wikipedia but their Wikidata items weren't very good at all. So we had to improve them and that was tough because since they had some data it was hard to run a bot because it's easier if there's no data you can just add in everything. So we did a lot of work by hand to get that up and running. How did you solve it? I think we may have just lost the article. I think I just exited the stream there. Good to have you back. I was trying to ask what you would do to solve it, maybe that's going a bit or too fast into what we were going to talk about later. How did you solve the problem of disambigrating or not adding duplicate politician? No, I think that's a great question to start with because that's what you run into in the beginning. Luckily in the Swedish open data set there's an identifier for the parliamentarians which has been of great help to actually point like this is exactly this one because of course you have a few parliamentarians with the common Swedish names so you can have three or four with the same name but they've been there over the years. That helped us a lot to get started. Let's see if I can get back to share my screen here again. This is where we were. Yes. That's where we got started and this actually started last year about this time. I thought I can do this by hand and be done by Christmas. It took a little bit of a longer time than that but eventually we got it done. Then it was easier to backfill with the rest and then when we had the politicians there it also seemed easier to start adding more things to it and that's where we actually got into starting a Wiki project. Of course we weren't the first trying to do a Wiki project in our country so we copied proudly the design from Wiki Project India and just customized it with our colors and made a logo for ourselves and that's in our background here. Then we started with some plans and ambitions like what we want to do with this project and how can we collaborate and a few people joined and we actually started a telegram group just so that we could chat in Swedish and not spam the general Wiki data group with all our nitty gritty details because there are always a lot of nitty gritty details. Then when we had something like oh this is a larger question that relates to more countries or all the countries then we bring it up to the general Wiki data group or going on Wiki and having a discussion or going to a property talk page. I think having a place to shout out ideas or questions in a more live fashion almost or having fast real-time answers is very helpful when you're stuck on something and you need advice so it's been a very good catalyst I think for getting some of this work done that we're going to talk about today. Yeah. I'm going to mark a few of these. These projects were already related to Sweden and existed before we started this project. So there have been sub projects in specific topics. Some of them quite large because the Wiki loves monuments that includes like 150,000 monuments so that's quite a big one. They're working on my PC right? Yeah. But this one now we could actually join forces. Everyone who had some sort of common thing about Sweden to some interest. And these are the two things that we're going to talk about today. We're going to talk about the Riksdag documents and the court decisions. And of course here are all the things we have. Do you have anything thoughts in general Daniel on how this over viewing project has helped us? So I think I mean it's had it's been a place to sort of showcase I guess what is happening around Sweden related topics in general and to bring together this first group of projects that have some kind of relationship to Sweden that were a little bit overall on Wiki data. And I think it is mainly I think it's working as a showcase where people can get ideas for oh someone has done this already but what if I were to do something similar but with this other data set or without this other group of objects. Yeah. And then of course we have had this project page to talk on. We have had this telegram group in Swedish which makes it very easy for us because as you can hear we're not native English speakers. This is our second language. So as soon as we go into details especially when you go into details about the parliamentarian processes like it's tricky even for a swede knowing the difference of the like inquiry reports and other kinds of documents and what they actually are. So following back into your native language has helped me a lot. Yeah. I mean we try to keep the discussions on Wiki in English to I guess to share our thoughts and ideas with other people who might be interested in seeing them but having a place of Wiki where we can discuss that in in our native language has definitely helped. Yeah. And of course doing it on English on Wiki has also helped because we have had gotten a lot of help from other people discussing how we should use different kind of properties. I think one of the biggest thing was that after getting all our parliamentarians on there the way we connected them and their offices to the party they represented we used the wrong property for that in the beginning. So we used the member of party where we should use the parliamentary group and the nuances in the labels in Swedish made it really unintuitive for a swede to know this is not applicable to us and then after discussing like no but every other country using it in that way. So perhaps we should just change the label in Swedish to make you understand and of course that makes querying a lot easier afterwards and I think we will get back to that a little bit later how that is of course a factor in everything. So just quickly going through this project before we move on into the other things. Yes. So what I was going to say besides the the telegram group and being on Wiki we are also doing online editathons but not really editathons we have more like having online meetings to discuss because we haven't edited much have we Daniel? It's been very little editing. Yeah. But we meet like having a steady time each week just sitting down and chatting a little bit well like what happened and what our ideas sometimes that unlocks so much of the things that are hard to express in words especially when you come into the complex things of qualifiers and modelling. I think also even if the chat is great I think talking well not face to face but at least on a video meeting that you can maybe faster iterate or come up with new ideas faster in that setting. Yeah. So let's head into our first topic of today which is is it the core decisions we're starting with? I believe so. Yes. Do you want to share the screen? Yeah I think that might be a good idea perhaps I can give some introduction just to what it is even without sharing the screen. So why would you want to do this? Why would you want to put core decisions on wiki data? Sweden is a bit different from some countries that well the one that I know mostly perhaps is the US which you hear a lot about in the news because the Supreme Court in the US is rather powerful and important. The Swedish Supreme Court is maybe a bit more anonymous but it's still quite important and in recent years I think taken a bit more of a or using its power and actually accepting precedent where before they maybe would not want to step in where the law is unclear or ambiguous now they actually step in and say this is what we believe the law should be and if the legislative branch is not happy with that they will have to change the law. So they are a little bit changed the way they do things and it's kind of interesting to be able to look at some of those patterns. And of course what I looked at was as well the US so on Wikipedia pretty much every Supreme Court case I think in the US has a Wikipedia page already. Everything is modeled great in wiki data perhaps and some of them that are modeled out. So I'll show you one of my or one of the more famous perhaps US Supreme Court cases. You already put my... Yes, so this is quite a famous case right, the Citizens United versus Federal Election Commission which is I think about probably some American is going to tell me I'm wrong here but I think it's about how companies can finance campaigns in elections and specifically it said that corporations do have the right to free speech and financing a campaign in elections is free speech according to US law or the US Supreme Court anyway. So that's kind of what this case said in a nutshell. And if we go through quickly what it is I think I should change this to help people. Yeah, help our viewers perhaps. Indeed. Of course it's got an instance of a Supreme Court decision for some reason there are two instances out here. Maybe someone should look into that. What is the difference between a Supreme Court case and a Supreme Court decision? I'm not sure. So it has a country and a jurisdiction, it has a publication date obviously, it has some significant events that are all the oral arguments and the decision dates. It's got a citation and this is how you would if you write a text about this decision how would you refer to it? So this is getting into the interesting stuff for WikiCite. And there are often for legal texts and court decisions there are ways to refer that are rather standardized and in the case of the US Supreme Court there are a number of ways you can refer to a court case depending on which publisher you are using for your... I think there are duplicates from that. Probably, yeah. No, they're different, there's a space in between there. Is there a space? Ah, okay, maybe I should not. Would you leave that to someone else who knows better than I do? So it has a court, right? And then it's published in the US United States reports. It's got even a commons category, it's quite a famous decision. It's got a majority opinion that was written by Anthony Kennedy here. Alright, that also has a reference there. Indeed. And then there are a few other identifiers on the page in Wiki. There's also quite a lot if someone is curious. There's also quite a lot of other information on the Wikipedia page that you could actually bring in and insight on there. For example, there are a lot of opinions on this that we're going to talk about a bit later. How we actually modeled the opinions. Yeah, I think Phoebe or once had us here. Yeah. Indeed. Indeed. So that was a US example. And so I looked at that and stole quite a lot of the modeling. I guess there's one more thing that is actually showcased on this item, which is how you model the different opinions. Yeah. Then I went to sort of, okay, what can we do for Sweden here? So what is the data source for this? Well, there is, of course, there is the Supreme Court website and this is all in Swedish, but we, let's open up one and look at it. Anyway, I think I'm going to search for one that is from last year. It's because it makes life a bit easier to show something. So these are all the different decisions, right? We can pick one that is a funny name perhaps. Trying to see if it has something interesting, but maybe not. We'll be about to leaking roof. The leaking roof. All right. Sounds very interesting. So this was a question about the responsibility for correcting a problem in an apartment where there wasn't damage posed to the apartment and to another part of the house. So who was responsible for paying well? So typically, you know, litigation around who pays what and probably some insurance companies involved here. So this is the sort of website that I had to work with when it comes to sources. And this is the website and then you have a link to the PDF which contains the pool written decision. And of course for 2019 and I think a few years back you have a little bit of actual data here on the side which helps. There's the law supply, there is a name that is given by the court to the case, there is a case number and there's a few keywords that are sort of helpful. So one of the first things that it was just to sort of scrape this website and scrape the name and this is what we talked about the legal citation. So this is how you would refer to this case in Swedish legal text. But I'm pretty soon this, I realize that this information is not that great. So we actually have to go and look at the final case. Now you're not sharing that view. You have to share again. Okay. Of course. So here it goes. So here's the written case then. And it's got some interesting information here. So one of the things that I really wanted to get at was this actually down here. At the very bottom. It says in this decision have been taken part the justices and the justice and the judges. So these are the judges that took part in this decision. This is a bit of a Swedish court perhaps. Not like in the US where the whole court always decides in the full chamber of nine justices in Sweden. There are typically five justices that decide one case. And the court has decided court has 16 or so justices that they are specialized in two different department departments. One about criminal cases and one about civil cases. They tend to only decide decisions in those, in the cases within their area except for a few very special decision where they overturn a part of previous precedent where they would actually have a full chamber of all the 16 justices that decided together. And then there's another peculiar thing here which is the, it's called referent in Swedish or maybe a reporter or a reporter or reporting judge in English which is the justice that is in charge of that case. So that's also something we wanted to record. And then try to make it more a little bit faster this time. So if we go back then to actually look at this case we can search for it. So the name is the available on Wikipedia. Search for it's name of the item of course. And so here we can see whatever the decision from the Swedish Supreme Court would look like once it was imported then. So we have it, it's a decision of the Supreme Court of Sweden. It's got a title which is set by the court. So consider this the official title. And if for some cases that are older that was not given a title by the court we just put this as no value to indicate that. So that way we don't get for example problems when we add citations to these documents otherwise we would get to constrain violation because the document doesn't have a title. It's got a language publication date, the citation, so some of the things you've seen. And then I've added here which are the judges that were part of deciding that case and we've added a little qualifier here for the reporting judge. I guess published in is kind of interesting. It's published in a special review yearbook of this court that is called so we can actually, these actually have ISBNs and stuff so they are model like a typical edition edition object. You have a link to this PDF as well. We have a majority opinion here so this has part of a majority opinion and here we come to the different types of opinions. In this case the all the five judges agreed or justices agreed and they all ruled the same so they all joined this opinion. There's not really information about who wrote an opinion in the court so we don't have an author on this in Sweden. And then we have added some citations here also which we are going to talk about much more in depth how we did later. But these are citations to Q items which I think probably represent other legal texts that we're also going to talk about later. So the actual draft legislation that was going through parliament for example. We also got a special Supreme Court case number which is a special identifier for all these cases we can use to get back to that website we saw earlier on the court. That was a brief overview John do you have any questions from the audience or anything? We have some general discussion about court cases and how they could be modeled in the case and the decisions and to be clear then we have mostly been working with the actual decisions in this import. And you were about to start with that but what we were starting to dream about why start with the court decisions is that we realized since they are so important they start sort of a chain reaction. Because the court, the Supreme Court is the ruler of how a law is going to be interpreted and then it might lead to politicians wanting to change the law if it doesn't go in the way that you thought it would be or how it was supposed to be or times has changed since the law was written perhaps by technology or society. And here we started to imagine alright so this could be the start which feeds into a political process and this is where the parliamentarian documents will take on. Yeah it's exactly right and we've seen a few cases in the last years now where these as I said the court has made decisions where the law is ambiguous and then more or less told the legislature the legislative branch that you should fix this. Do you have any examples of things this refer to or from? Maybe. I was thinking of looking at this opinion so we can see. Do you mean a court case referring to something? Not citations but... Yeah or maybe we take that in the second session with the citations. I had otherwise these sort of cause and effect things I think. The example I was thinking about now is a bit too recent so I don't think we have that modeled but there was just a few weeks ago a case of a court decision that led to the government starting an inquiry into the change. Yeah. But this is an example of something a bit more difficult when it comes to modeling the different opinions and this is a model that I did not draft. It was drafted for the US Supreme Court cases and I just stole that proudly. So we got majority opinion. Here there were two justices that agreed on the majority opinion which is the main body of the text. And then there were two justices that had a dissenting opinion that meant that they wanted to rule differently in the case. They have a special opinion supporting that. And then you have a different opinion which another justice had which means that they agree with the decision but they don't agree with the reasons that were given. So they have another way to get to the same result. Alright. There is another peculiar thing here which is called an addendum which is often written by or often but sometimes written by the justices to either clarify their own position or why they voted in a specific way or they want to tell the legislator that they think it's ought to be fixed. So that's for example Stefan Linskouk who is the former, I believe he's the former Chief Justice. He was kind of famous for writing these opinions to the legislator saying that you should fix this. He wrote actually quite a lot of those. Alright. So hopefully they will show up when we're getting further into this project. And I guess maybe we can talk a little bit about the challenges of importing. You already saw that this was a PDF file that we were reading this from. So I actually didn't want to go through all of these hundreds of cases, about 100 cases every year I think, for years. I didn't want to go through all of those by hand and adding the justices. So as with the politicians one of the first things I did was actually just make sure that the whole history of justices on the Supreme Court was correct in Wikipedia and I had quite a lot of help from the Swedish Wikipedia page that had a very nice list article that I could basically scrape and import to Wikipedia. So wherever Justice was a red-linked on Wikipedia, I sort of could almost guess that it would not have a Wikipedia item either. And that helped me get them in better and it had also the period of time they were on the court and so on. So I got quite a lot of information for free that way. So once I'd done that I could write a little bit of a script that would go through and scrape those PDFs. Well it was a bit tricky because those PDFs, they aren't written to be machine readable and there's slight variations in style how you write it and it had varied a little bit over time so there was quite a lot of trials and error and in the end I got about a 5-10% error rate on them. So I would still create most of the information about the case and the item but there might be that the justices were not included or there was not all opinions were given justices that joined them and so on. So it would just let my script spit that out in the log for me and then I would sit and work through that log file after I've uploaded to like 5 years worth of cases or something and just manually go through that file. So instead of having to do 100 cases a year I could do maybe 5 or 10 and just parts of them manually. So that helped quite a lot. Now you used Wikidata integrator and custom script for doing that. And I think we also almost skipped a little bit of a step here because you touched up on it when you mentioned modeling but I can really recommend using some sort of template or a table and there are these different kinds that you can use. Now I'm zooming in too much and I'm going to zoom out a little bit here. Maybe I skipped that because I myself did not know about this when I did it. So this is a place where collaboration on Wiki is really helpful because here we can sketch out how we think we should model this based both on the data that we have and also on how we're seeing the properties being used on other places on Wikidata. And it's also a great place for other people to find and come with suggestions. And as I said I think I actually sketched this out partly after the factor after I started my imports but it was quite useful. Maybe we have something else that is useful below there. Yes, this is a great tool called Integrality which helps you keep track of data and here we're still trying to figure out what tables are most useful for us but we added a few that we thought were going to be interesting like which laws apply to these court cases. Are they citing other work? And here you can see quite a lot of these cases actually do cite other work. And then of course main subject which can help you find topic areas of things. We still have some work left to do on the classification. And here we see this sum so far of the number of court cases or decisions. And with that I think should we move on to the parliamentarian documents? Yeah, that sounds like a good one.
 Hello and welcome to this wiki site session.  We're going to talk Swedish Parliament and  New Digital documents and their use. And your host  tonight is me, Jan Einle and Daniel Ekshaw. Hello.  How are you doing Daniel? Very well thanks.  It's a wonderful rainy evening here in Stockholm.  We had a pleasant day here. A little bit first of an autumn day here  in Amsterdam. So what we're going to talk about today  is quite of a long  project, but we're still just in the midst of it, I would say.  We have so much ideas, but it's about this golden  treasure of the open data  portal of the Swedish riksdag, the Parliament of Sweden.  But before we go into the  depth of that, we want to give you a little bit of introduction to how we got started.  And before we go into depth, I want to give you some  housekeeping things. So everything  today, we have the WMF  the Wikimedia Foundation Friendly Space Policy that we're here to. So  please be friendly to watch each other in the chats.  And we have the chats activated here both on YouTube and on Periscope  and we're also streaming this to the Swedish Wikipedia group, Facebook group.  So you can all comment there and we will see it and can bring it up.  And we have already had like a friendly hi-all from FIWI  here. So please ask us questions  during this entire session because  I think there are things  that you might want to know more of that we have so internalized  to even bring it up because we have been thinking and talking about this a lot.  Yeah, there might be a lot of special peculiarities with how the Swedish  system works that we don't quite think about  but not everyone knows. Yeah, and we have learned a lot about  the Swedish peculiar system when we have digging into this. And I think that's  almost like it's everything when you go into the Wikidata  and think, ah, I know this topic, I can model this. And then  of course you see, ah, no, it's much more  complicated in reality. And what  else do we have? So you can comment directly where you're  watching, but if you rather want to, you can also  comment in the Telegram group for Wikisite.  And  yeah, that's about it. So  let's dive into the introduction of Swedish project.  I'm going to share my screen here.  This is the share screen.  So Wikiproject Sweden.  I guess most of you people know about  Wikiprojects in general. And Wikisite is of course  kind of a Wikiproject.  But we, when we started here,  it turned out that there were already a lot  of things done  in regards to Wikidata and Sweden. And  I guess most of the countries have this kind  of properties country box where you can  see the properties that are available to  you when it's related to your country. And that's sort of  where we started. But when we started to get into the  nitty-gritty of things, we saw that there were already  things being done before we even got here. So one  of the first thing is this  sub-project from the Wikiproject EveryPolitician  which is of course a much larger project  that started years ago and which had much larger  scope like trying to get every politician onto Wikidata  and see if it loads here. Yes.  And we have this little bit of tracker here and I think we have just  gotten up to two stars here on Sweden during this because one of the first things  we wanted to do before actually going anywhere was to get  all the parliamentarians into this. And we're going to meet  some of the people who have been in that  process as well.  And the most complicated things about that was that  most of the politicians already  had an article on Swedish Wikipedia but their Wikidata  items weren't very good at all. So we had to improve them  and that was tough because  since they had some data  it was hard to run a bot because it's easier if there's no  data you can just add in everything. So we did a lot of work  by hand to get that up and running.  How did you solve it?  I think we may have just  lost the article.  I think I just exited the stream there.  Good to have you back. I was trying to  ask what you would do to solve it, maybe that's going  a bit or too fast into what we were going to talk about later.  How did you solve the problem of disambigrating or not  adding duplicate politician? No, I think that's a great  question to start with because that's what you run into  in the beginning. Luckily in the Swedish  open data set there's an identifier for  the parliamentarians  which has been of great help to actually point like this is  exactly this one because of course you have a few parliamentarians  with the common Swedish names so you can have three or four  with the same name but they've been there over the years.  That helped us a lot to get started.  Let's see if I can get back to share my screen here again.  This is where we were.  Yes.  That's where we got started and this actually started  last year about this time.  I thought I can do this by hand and be done by Christmas.  It took a little bit of a longer time than that  but eventually we got it done.  Then it was easier to backfill with the rest and then when we had the  politicians there it also seemed easier to start adding  more things to it and that's where we actually got into  starting a Wiki project.  Of course we weren't the first trying to do a Wiki project  in our country so we  copied proudly the design from Wiki Project India  and just customized it with our colors and made a logo  for ourselves and that's in our background here.  Then we started with some plans and ambitions like what we want to do  with this project and how can we collaborate and a few people joined  and we actually started a telegram group just  so that we could chat in Swedish and not spam the general  Wiki data group with all our nitty gritty details  because there are always a lot of nitty gritty details.  Then when we had something like oh this is a larger  question that relates to more  countries or all the countries then we bring it up to the general Wiki data group  or going on Wiki and having a discussion or going to a property talk page.  I think having a place to  shout out ideas or questions in a more  live fashion almost or having fast real-time answers  is very helpful when you're stuck on something and you need advice  so it's been a very good catalyst I think for getting some of this work done  that we're going to talk about today. Yeah.  I'm going to mark a few of these. These  projects were already related to Sweden and existed before  we started this project. So there  have been sub projects in specific  topics. Some of them quite large because the Wiki  loves monuments that includes like 150,000 monuments  so that's quite a big one.  They're working on my PC right? Yeah.  But this one now we could actually join  forces. Everyone who had some sort of  common thing about  Sweden to some interest.  And these are the two things that we're going to talk about today. We're going to talk about  the Riksdag documents and the court decisions.  And of course  here are all the things we have. Do you have anything  thoughts in general Daniel on how this  over viewing project has helped us?  So I think I mean it's had  it's been a place to sort of showcase I guess what is happening around Sweden  related topics in general and to bring together  this first group of projects  that have some kind of relationship to Sweden that were a little bit overall  on Wiki data. And I think it is mainly  I think it's working as a showcase where people can get ideas for  oh someone has done this already but what if I were to do something similar  but with this other data set or without this other group of  objects. Yeah. And then of course  we have had this project page to talk on.  We have had this telegram group in Swedish which makes it  very easy for us because as you can hear we're not native English  speakers. This is our second language. So as soon as we  go into details especially when you go into details about  the parliamentarian processes like it's tricky  even for a swede knowing the difference of  the like inquiry reports and other kinds of documents  and what they actually are. So  following back into your native language has helped me a lot.  Yeah. I mean we try to keep the discussions on Wiki in English to  I guess to share our thoughts and ideas with other people who might be interested  in seeing them but having a place of Wiki where we can discuss that in  in our native language has definitely helped. Yeah.  And of course doing it on English on Wiki has also helped because we have had  gotten a lot of help from other people discussing  how we should use different kind of properties. I think one of the biggest  thing was that after getting all our  parliamentarians on there the way  we connected them and their offices  to the party they represented we used the wrong property for  that in the beginning. So we used the member of party where we should use  the parliamentary group and the nuances in the  labels in Swedish made it really unintuitive for  a swede to know this is not applicable to us and then after discussing  like no but every other country using it in that way. So  perhaps we should just change the label in Swedish to make you understand and  of course that makes querying a lot easier afterwards  and I think we will get back to that a little bit later how  that is of course a factor in everything.  So just  quickly going through this project before we move on into the  other things. Yes. So what  I was going to say besides the  the telegram group and being on Wiki  we are also doing online editathons but not really  editathons we have more like having online meetings to discuss  because we haven't edited much have we Daniel?  It's been very little editing. Yeah.  But we meet like having a steady time each week  just sitting down and chatting a little bit well like what  happened and what our ideas  sometimes that unlocks so much of the  things that are hard to express in words especially when you come into the  complex things of qualifiers and modelling.  I think also even if  the chat is great I think talking well not face to face  but at least on a video meeting that you can  maybe faster iterate or come up with new ideas faster  in that setting. Yeah.  So let's head into  our first topic of today  which is  is it the core decisions we're starting with?  I believe so. Yes. Do you want to share the screen?  Yeah I think that might be a good idea  perhaps I can give some introduction just to  what it is even without sharing the screen.  So why would you want to do this?  Why would you want to put core decisions on wiki data?  Sweden is a bit different from some countries that well the one that I know mostly  perhaps is the US which you hear a lot about in the news because the  Supreme Court in the US is rather powerful and important.  The Swedish Supreme Court is maybe a bit more anonymous  but it's still quite important and in recent years  I think taken a bit more of a or using its power  and actually accepting precedent where before they maybe would  not want to step in where the law is  unclear or ambiguous now they actually step in and say this is what we believe  the law should be and if the legislative branch is not happy with that  they will have to change the law. So they are a little bit changed the way  they do things and it's kind of interesting to be able to  look at some of those patterns. And of course  what I looked at was as well the US  so on Wikipedia pretty much every Supreme Court case I think in the US  has a Wikipedia page already.  Everything is modeled great in wiki data perhaps  and some of them that are modeled out. So I'll show you one  of my or one of the more famous perhaps  US Supreme Court cases.  You already put my...  Yes, so this is quite a famous case right, the Citizens United versus Federal Election  Commission which is I think about  probably some American is going to tell me I'm wrong here but I think it's about  how companies can finance campaigns in elections  and specifically it said that corporations  do have the right to free speech and financing  a campaign in elections is free speech according to US law  or the US Supreme Court anyway. So that's kind of what this  case said in a nutshell. And if we go through quickly  what it is I think I should change this to  help people. Yeah, help our viewers perhaps.  Indeed.  Of course it's got an instance of  a Supreme Court decision for some reason there are two instances out here. Maybe someone should  look into that. What is the difference between a Supreme Court case and a Supreme Court decision?  I'm not sure.  So it has a country and a jurisdiction, it has a publication date  obviously, it has some significant  events that are all the oral arguments and the decision dates.  It's got a citation and this is how you would if you write a text about  this decision how would you refer to it? So this is getting into the interesting stuff  for WikiCite. And there are often for legal texts and court decisions  there are ways to refer that are rather standardized  and in the case of the US Supreme Court there are a number of ways you can refer to a court  case depending on which  publisher you are using  for your... I think there are  duplicates from that. Probably, yeah.  No, they're different, there's a space in between there.  Is there a space? Ah, okay, maybe I should not.  Would you leave that to someone else who knows better than I do?  So it has a court, right? And then it's published  in the US United States reports. It's got  even a commons category, it's quite a famous decision. It's got a  majority opinion that was written by Anthony Kennedy here.  Alright, that also has a reference there.  Indeed.  And then there are a few other identifiers  on the page in Wiki. There's also quite a lot  if someone is curious. There's also quite a lot of other information on  the Wikipedia page that you could actually bring in  and insight on there. For example, there are a lot of opinions  on this that we're going to talk about a bit later.  How we actually modeled the opinions.  Yeah, I think Phoebe or once had us here.  Yeah.  Indeed.  Indeed.  So that was a US  example. And so I looked at that and stole quite a lot of the  modeling. I guess there's one more thing that is actually showcased on  this item, which is how you model the different opinions.  Yeah.  Then I went to sort of, okay, what can we do for Sweden here? So what is the data source for this?  Well, there is, of course, there is the Supreme Court website and this is  all in Swedish, but we, let's open up one and look at it.  Anyway, I think I'm going to search for one  that is from last year.  It's because it makes life a bit easier  to show something.  So these are all the different decisions, right?  We can pick one that  is a funny name perhaps.  Trying to see if it has something interesting, but maybe not.  We'll be about to leaking roof.  The leaking roof. All right. Sounds very  interesting. So this was a question about  the responsibility for correcting a problem in an apartment  where there wasn't damage posed to  the apartment and to another part of the house. So who was responsible for paying well?  So typically, you know, litigation around who pays what and probably  some insurance companies involved here. So this is the sort of  website that I had to work with when it comes to sources.  And this is the website and then you have a link to the PDF which contains  the pool written decision.  And of course for 2019 and I think a few years back you have a little bit of  actual data here on the side which helps.  There's the law supply, there is a name that is given by the court to the  case, there is a case number and there's a few keywords  that are sort of helpful. So one of the first things that it  was just to sort of scrape this website and scrape the name  and this is what we talked about the legal citation. So this is how you would refer to this  case in Swedish legal text.  But I'm pretty soon this, I realize that this information  is not that great. So we actually have to  go and look at the final case.  Now you're not sharing that view.  You have to share  again.  Okay.  Of course. So here it goes. So here's the written case then.  And it's got some  interesting information here. So one of the things that I really wanted to get at was  this actually down here.  At the very bottom.  It says in this decision have been  taken part the justices  and the justice  and the judges.  So these are the judges that took part in this decision.  This is a bit of a Swedish court perhaps.  Not like in the US where the whole court always decides  in the full chamber of nine justices in Sweden.  There are typically five justices that decide one case.  And the court has decided court has 16 or so justices  that they are specialized in two different department  departments. One about criminal cases and one about civil cases.  They tend to only decide decisions in those, in the cases  within their area except for a few very special  decision where they overturn a part of previous precedent where they would actually  have a full chamber of all the 16 justices that  decided together. And then there's another peculiar thing here  which is the, it's called referent in Swedish or maybe a reporter  or a reporter or reporting judge in English  which is the justice that is in charge of that  case.  So that's also something we wanted to record.  And then try to make it more  a little bit faster this time.  So if we go back then to  actually look at this case we can search for it. So the name is  the available  on Wikipedia. Search for it's name of the  item of course. And so here we can see  whatever the decision from the Swedish Supreme Court would look like  once it was imported then.  So we have it, it's a decision of the Supreme Court of Sweden.  It's got a title which is set by the court. So  consider this the official title. And if for some cases  that are older that was not given a title by the court we just put this  as no value to indicate that. So that way we don't get  for example problems when we add citations to these documents  otherwise we would get to constrain violation  because the document doesn't have a title.  It's got a language publication date, the citation, so some of the things you've seen.  And then I've added here which are the judges that were part of  deciding that case and we've added a little qualifier here for the  reporting judge.  I guess published in is kind of interesting.  It's published in a special  review yearbook of this court that is called  so we can actually, these actually have ISBNs and stuff so they are  model like a typical edition  edition object. You have a link to this PDF  as well. We have a majority opinion  here so this has part of a majority opinion and here  we come to the different types of opinions. In this case the all the five judges  agreed or justices agreed and  they all ruled the same so they all joined this opinion.  There's not really information about who wrote an opinion in the court so we don't have  an author on this in Sweden.  And then we have added some citations here also which we are going to talk about much more in depth how we did  later. But these are citations to  Q items which I think probably represent  other legal texts that we're also going to talk about later.  So the actual draft legislation  that was going through parliament for example.  We also got a special Supreme Court case number  which is a special identifier for all these cases  we can use to get back to that website we saw earlier on the court.  That was a brief overview  John do you have any questions from the audience or anything?  We have some general discussion about court cases and how they  could be modeled in the case and the decisions  and to be clear then we have mostly been working  with the actual decisions in this import.  And you were about to start with that  but what we were starting to dream about why start  with the court decisions is that we  realized since they are so important  they start sort of a chain reaction.  Because the court, the Supreme Court  is the ruler  of how a law is going to be interpreted  and then it might  lead to politicians wanting to change the law  if it doesn't go in the way that you thought it would be  or how it was supposed to be or times has changed  since the law was written perhaps by technology or society.  And here we started to imagine  alright so this could be the start which feeds into  a political process and this is where  the parliamentarian documents will take on.  Yeah it's exactly right and we've  seen a few cases in the last years now where these  as I said the court has made decisions where the law is ambiguous  and then more or less told the legislature  the legislative branch that you should fix this.  Do you have any examples of  things this refer to or from?  Maybe. I was thinking  of looking at this opinion so we can see. Do you mean a court case referring to  something? Not citations but...  Yeah or maybe we take that in the second session with the  citations. I had otherwise  these sort of cause and effect things I think.  The example I was thinking about now is a bit too  recent so I don't think we have that modeled but  there was just a few weeks ago a case of  a court decision that led to the government starting an inquiry  into the change. Yeah.  But this is an example of something a bit more  difficult when it comes to modeling the different opinions  and this is a model that I did not draft. It was drafted for  the US Supreme Court cases and I just stole that  proudly. So we got majority opinion. Here there were two justices  that agreed on the majority opinion which is the main body  of the text. And then there were two justices that had a dissenting  opinion that meant that they wanted to rule differently in the case.  They have a special opinion supporting that. And then you have a  different opinion which another justice had which means that they agree  with the  decision but they don't agree with the reasons that were given. So they have another  way to get to the same result. Alright.  There is another peculiar thing here which is called an addendum which is often written  by or often but sometimes written by the justices  to either clarify their own position or why they voted in a specific  way or they want to tell the legislator  that they think it's ought to be fixed. So that's  for example Stefan Linskouk who is the former, I believe  he's the former Chief Justice. He was kind of  famous for writing these opinions to  the legislator saying that you should fix this.  He wrote actually quite a lot of those. Alright.  So hopefully they will show up when we're getting further into this  project.  And I guess maybe we can talk a little  bit about the challenges of importing. You already saw that this was a  PDF file that we were reading this from. So I actually  didn't want to go through all of these hundreds of cases, about 100 cases  every year I think, for years. I didn't want to go through all of those  by hand and adding the justices. So as with the politicians  one of the first things I did was actually just make sure that the whole history of  justices on the Supreme Court was correct in Wikipedia  and I had quite a lot of help from the Swedish Wikipedia page that had a very nice  list article that I could basically scrape and  import to Wikipedia. So wherever  Justice was a red-linked on Wikipedia,  I sort of could almost guess that it would not have a  Wikipedia item either. And that helped me get them in better  and it had also the period of time they were on the court and so on.  So I got quite a lot of information for free that way.  So once I'd done that  I could write a little bit of a script that would  go through and scrape those PDFs.  Well it was a bit tricky because those PDFs, they aren't written to be machine  readable and there's slight variations in style how you write it  and it had varied a little bit over time so there was quite a lot of  trials and error and in the end I got about a 5-10%  error rate on them. So I would still create most  of the information about the case and the item but there might be that the justices  were not included or there was not all opinions were given  justices that joined them and so on. So it would  just let my script spit that out in the log for me and then I would sit  and work through that log file after I've uploaded  to like 5 years worth of cases or something and just  manually go through that file. So instead of having to do 100 cases a year  I could do maybe 5 or 10 and just parts of them  manually. So that helped quite a lot.  Now you used Wikidata integrator  and custom script for doing that.  And I think we also almost skipped a little bit  of a step here because you touched up on it when  you mentioned modeling but I can really recommend  using some sort of template or a table  and there are these different kinds that you can  use. Now I'm zooming in too much and I'm going to zoom out a little bit here.  Maybe I skipped that because I myself did not know about  this when I did it. So this  is a place where collaboration on Wiki is really  helpful because here we can sketch out  how we think we should model this based  both on the data that we have and also on how we're seeing  the properties being used on other places on Wikidata.  And it's also a great place for  other people to find and come with suggestions.  And as I said I think I actually sketched this  out partly after the factor after I started my  imports but it was quite useful.  Maybe we have something else that is useful below there. Yes, this is a  great tool called Integrality which helps you keep track  of data and here we're still trying to figure out what  tables are most useful for us but we added a few  that we thought were going to be interesting like which laws apply to these  court cases. Are they citing other  work? And here you can see quite a lot of  these cases actually do cite other work.  And then of course  main subject which can help you find  topic areas of things.  We still have some work left to do  on the classification. And here we see this sum  so far of the number of court cases  or decisions.  And with that I think should we move on to  the parliamentarian documents?  Yeah, that sounds like a good one.
WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_0_5999.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_6000_6527.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_6528_8075.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_8076_8387.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_8388_10079.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_10080_11591.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_11592_11735.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_11736_12755.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_12756_14771.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_14772_15047.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_15048_21323.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_21324_21887.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_21888_24083.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_24084_25079.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_25080_25343.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_25344_25571.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_25572_25859.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_25860_26003.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_26004_26975.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_26976_27203.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_27204_27503.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_27504_27623.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_27624_27863.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_27864_28991.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_28992_29039.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_29040_29135.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_29136_29195.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_29196_29651.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_29652_30107.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_30108_30347.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_30348_30467.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_30468_30755.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_30756_32519.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_32520_33635.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_33636_36647.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_36648_36935.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_36936_37031.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_37032_37439.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_37440_37991.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_37992_38063.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_38064_38363.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_38364_41735.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_41736_43499.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_43500_44099.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_44100_50951.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_50952_51683.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_51684_52211.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_52212_52343.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_52344_52403.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_52404_53747.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_53748_53903.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_53904_54107.png WikiCite_2020__Citations_in_Swedish_Parliamentary_Vid1_54108_54218.png