 Hello everyone. A bit of context about where this fits into ANZ, right in the middle, reliable services. So at least we hope they're reliable and pretty much they are. So the vocabulary widget is part of our offerings associated with search vocabulary in Australia. So let's get right into it. Here's an outline of the talk. I'm going to describe what problem this solves and what motivates the work that we've been doing on the vocabulary widget. A little bit of the history. Very brief overview of the current offerings and then go into some more details and then an invitation to you to go ahead and use it. So board context here is somewhat more general than what you've just been hearing about. This is the very board context of consuming a vocabulary and my colleague Joel Ben tells me I need more pictures so he's looking at this picture of vocabulary consumption which I hope you will enjoy later. Let's move on because text is actually better. Board context consuming a vocabulary more specifically concept selection. So the incorporation of a manual that is the human being selecting a concept, being able to do that within a service. Applications I'm sure you can think of data classification, validation, data validation, use in search fields etc etc etc. Very specifically we want to make it easy for web developers to get started with concept selection incorporated in their own services web forms. It is very much a get started but there's a lot of flexibility for you to go further so I'll show how that works a bit later on. A bit of history. The widget is something that we built some years ago to serve our own needs and it's something that we then opened up and made about more generally available. In particular it services research data Australia and not the portal but the back end of it which we call our registry, it's a metadata registry and in particular manual entry of metadata. That manual entry of metadata is drawn from two main vocabularies but three four. The main one is our own metadata schema which is an XML schema with CS that has some controlled vocabularies associated with it. So a number of the metadata elements have their values drawn from controlled vocabularies as an example of that. But also we use that are famous fields of research vocabulary as well and that's used extensively for subject entry. When you enter a record into research data Australia we ask you to provide some subject keywords and they're drawn from well we encourage FOR but you can also provide the SEO keywords and GCMD etc. We then subsequently released a controlled vocabulary widget the code which you could then use against three vocabularies the RIFCS vocabulary and the FOR and SEO vocabularies but what we've done is subsequently release research for vocabularies Australia and our partners have been madly publishing vocabularies in RVA and the widget is there and you can use it against any of the published vocabularies that are what we call widgetable of which there are almost 100 as of now. Let me show you some screenshots very quickly of our own internal use of the widget. So this is yeah if you use the metadata entry screens this should be familiar to you if not doesn't matter but there's just just some examples of how we use it ourselves. When you're defining a manually entering a collection in RDA there's a drop down here you see to select the type of collection data set software publication etc. and that drop down is published from one of the part of the controlled vocabularies for RIFCS. Similarly the subject type when you're entering subjects you can enter subjects from a number of different sources and that list of sources is also in the vocabulary and here's an example of actually entering a subject this also is driven by the vocabulary widget this is the FOR vocabulary and this is shown in tree mode and as you would expect the little plus signs to the letter of the keywords open up the next level down and there's three levels of vocabulary there. So if you're entering a field of research keyword you'll use the widget in tree mode at that point if you use if you're entering if instead of selecting FOR you'd select GCMD you'll have to type it in at least a few a few letters and this is now the widget in search mode and then you get a drop a drop down with some suggestions based on well not suggestions matches that against what you've typed in and then you click on the one that you want and it inserts it into the into the field for you. So that's how we consume vocabularies ourselves in our DA using the vocabulary widget. I want to just introduce what we are offering more broadly through the search vocabularies Australia and if you haven't seen it already I hope you check it out have a look there are over a hundred well over a hundred vocabularies published through RBA of which almost a hundred in this widgetable category and also if you don't if you think you might be interested in publishing through RBA but you're not quite ready to make it accessible to the world we have it we have a demo server as with RDA you can you can publish things try things out on a demo server. Vocabulary widget that's the main focus of this talk how do you find out about what is widgetable well you can use the browse facility and search facility in RBA and you will find that your browse or search results have this little icon that says widgetable that points you at the vocabulary that might be suitable for you to use. There's an example search there so all of these links you'll find in the presentation and you'll be able to download that after the session and try these links out or indeed try your own searches. We do embed the widget in every view page of every widgetable vocabulary so again another example that you can try later that is our own version of RIFCS in RBA and you'll see an example I've got a screenshot on the next on the next slide as well. We have a widget explorer which is a wizard that will generate both boilerplate and some or provide you with the boilerplate that you need and generate some customized code that you can use to get started with the widget and of course we have documentation and there's a link to the documentation pages as well there. A documentation will help you to get started with other modes of the widget but are not readily accessible through the widget explorer and help you to do further customizations. So the widget it's a selection widget it's for vocabularies that are published in RBA. There is JavaScript, a little JavaScript page that you link to and CSS and CSS. The CSS is particularly basic and feel free to do all sorts of fancy things with that or just not use it, use your own CSS if you prefer. The library is implemented using also using jQuery although we we've heard from some of our users that they don't like jQuery I can't understand why but apparently some people don't. I'm sorry about that but that seems to be a showstop for some people. So you embed links to the JavaScript and the CSS in your page and then you add a little bit of an extra little bit of JavaScript to invoke the widget and you select the vocabulary you want to use and the widget mode that you want to use. So what I've got here is a screenshot from a view page that shows an example of the widget and so if you do if you do come across a vocabulary that you like and you want to use that in my page you'll see already a button that you can press to get a sample code fragment to copy paste into your page and a link to the documentation and the link to the boilerplate code that you also need. There are some ground rules so this only works for vocabularies that we call widgetable which for now means a vocabulary that has linked data endpoints, linked data API endpoints which thanks to Simon in the SysVoc family of endpoints. So concepts and narrower and top concepts. Basically it means you publish your vocabulary in RVA and you check the checkboxes to import into Sesame and publish through SysVoc and then your vocabulary we will call that widgetable for you. However you might think that just because it's widgetable that it's going to work well in the widget and that's not the case you might be disappointed in some cases. Not all widgetable vocabularies will work in the widget and even if they do they might only work in certain of the modes. The basic rule is it has to be scoss. The SysVoc endpoints are scoss specific and we use them so we can't magically determine that you have a hierarchy from some other properties that you've invented. If it's scoss it will work well in tree mode basically. If you've used the appropriate properties to describe the hierarchy and you define some top concepts. So indeed scoss and then you'll be able to use it in search mode at least and for tree mode you need a hierarchy to be defined and you need the top concepts explicitly to be defined. So the widget works in a number of modes. Here's the list listed in increasing order of length of name that's a coincidence. There are four pre-packaged modes and although they are pre-packaged they should fulfill quite a variety of needs. You do have the opportunity to customize the behavior quite a lot even in the pre-packaged modes but there is an advanced mode and you can use that advanced mode to customize much much more of the behavior. With advanced mode you don't see anything to start with. You have to select what you have to describe with some JavaScript code what you want to happen. It's up to you. So you won't get a tree, you won't get a search box etc. If you go into advanced mode you have to do it yourself but the widget gives you the infrastructure to drive what have you decided to come up with. So I've got some screenshots of the various modes. Here's an example from ABS Fields Research Vocabulary display in tree mode. This tree mode obviously is for vocabularies in which the concepts are arranged in a hierarchy. We do require that for this to work that you have explicitly used these cost properties as top concept and now to define the hierarchy and then this will work nicely for you. Search mode this is where you don't necessarily have a hierarchy or you don't want to offer the hierarchy because it's too big and cumbersome to work your way through. His FLR displayed in search mode. You typically have a text field and that text field you start typing in letters and then you get display of the matches and then you click the one that you want. The display here shows the full set of options for what you can see in the list of suggestions. Here so there's the label, the IRI underneath and to the right the notation. There is one for this vocabulary. We've also got two other modes that drill down into a part of a vocabulary. The narrow mode and the collection modes and narrow mode where you have a hierarchy and you wish to select, you wish only to offer those concepts that are narrower than a specific concept. So again you have to use the cost narrower property in your vocabulary to specify that. The narrow mode works either with the drop-down. Here's an example of a drop-down but you can also specify text field and that text field has a lot of completion. So that's for when the concepts are arranged in a hierarchy. If you're using SCOS collections then you can use collection mode and again collection mode works either with a drop-down so select element or with a text field and again you have auto completion or if you have no idea you click within the text box and you press the down arrow and the full list of possibilities will appear. So again this is this is from River CS and so this works with sets of concepts that are arranged in a SCOS collection. Advanced mode this is this is really roll your own so if you don't if you really don't like what's what we're offering in these canned modes if you like and it's just not going to work for you you can roll your own and at this point you are working with like the back end of the widget the back end provides some services to get the top concepts to be able to do a search to get the narrow concepts etc and then you write some you you explicitly invoke those back end functions and then you write some event handlers to deal with what happens when the results come back from those back end functions. The documentation has an example that's a bit like narrow mode but it's got a list of clickable links to each concepts on a line. I think we use River CS for that. We've got a widget explorer which will help you to get started so it will give you the boilerplate that you need to incorporate just to do anything at all but it also generates the vocabulary specific code that you need to include. It's pretty nice step-by-step wizard. You will notice some similarities to the keyword aggregator if you use it. I don't know who came first on that but we seem to have done a very similar sort of thing. The vocabulary widget explorer does generate vocabulary specific code but it only offers it to you in the tree and the search modes but feel free to use that and then customize the end result so use change the look and feel or use one of the other modes. Again a good place to go further is to check out the documentation that will give you a feel. It's the dot I've spent many many hours working on the documentation the last few weeks and I think it's it's good now. It wasn't good before but it's I think it really does cover what you can do and it makes sense a lot more than it used to. So please have a look at that and feel free to try out the widget explorer, try the narrow collection modes and if you're again try the core mode. The documentation page does have a live demo of each of the modes that you can try and each one of those is linked to the source code of those demos so you can copy the page feel free to adapt those to your own needs. So please try it out and let us know what you think if you like it please go ahead and use it and if you do use it please apply for an API key that you use in calling in the calls to the widget that helps us to track who's using the widget and help us with our analytics that's optional but we do ask you do that if you adapt it and use it and use it on your page and that is it.