okay there's this video that I wanted to make but didn't which was about this tweet or rather about this thread which is pretty long and the reason why this is so interesting is that first of all it talks about gnome and a new feature about gnome which looks pretty good and that is if you have a light theme or a dark theme and you're switching from one to another there is now a nice transition which looks pretty good actually like the plasma version of this transition is quite scattered scattered so this actually looks pretty good and what is really impressive about this thread is that this developer whose name I won't even try to pronounce because I would get it wrong actually explains the implementation which is pretty simple if you read all of this I'll try to shorten it up the simple ways that it takes a screenshot and then waits for 250 milliseconds takes another screenshots and then crossfades from one to another I'm simplifying and that was actually impressive because it's very simple when you think about it I was already thinking about some complex animations but it's not actually and he even addresses this animation thing is and say saying that it wouldn't actually work because you would rely on all applications to actually be able to animate their colors within the app and apparently that's not really feasible especially I guess for third-party apps so this solution is pretty interesting and I was like oh it's a pity that Plasma doesn't have it but now it has so this is the blend effect and you could say that sounds familiar that sounds like this and if you read this this is the most beautiful tax I ever most funny tax I ever found on a major quest for kitty plasma the solution is heavily inspired copied from gnome which is like an admission I guess that there was some discussion even within kitty chats about this thread and my guess is that this thread also reached David Edmondson that actually implemented it so what does it look like it looks like this which is beautiful it's perfect and of course there might be some flaws as an example I guess that if you have a video player running a video there will be some stuttering in the transition for the video itself this is just my guess which is actually addressed here and it's in I mean recognizing that this issue might happen not here but I wanted to try this unlikely kwin is acting weird and doesn't actually compile for me please have pity I didn't want to spend some hours trying to fight so that is the news and it's really interesting so how is this one done so first of all this is a kwin effect and you might know kwin effect because many of them are actually exposed to the user if you open up system settings you can go into the kwin section which is actually called window window management and there's a desktop effects section I'm going by memory maybe it's something effects and there are a lot of effects some of them include blur but also contrast the contrast effect there's also the desktop cube the sliding there's the desktop cube is actually gone sorry about that and this effect in particular as you can see here and here disappeared here is actually flagged as an internal effect and what that means is that the effect isn't actually exposed to the user so there is no button to actually disable this which probably makes sense like why would you want to disable this it's just an animation when you change theme so this concept of kwin effects that have a lot of control on what kwin does not complete control but can do a lot this animation is implemented through a kwin effect some of them are exposed to the user some of them aren't the internal parts so we kick the window for x milliseconds then perform a crossfade between the cake and the current contents this is the same idea as this thread explains it does mean sorry this is actually addressed here as well any video is paused for half a second but pragmatically it's not really bothersome I fully agree we know the user is primarily interacting with system settings unless you have automatic theme changing but that isn't supported yet on kd plasma or gnome yet so that shouldn't be an issue and then some more technical details we are using off-screen textures it's not actually a screenshot that was you know and finally finally in the future this could also do q-style changes decoration changes anything okay so wait a second what does that mean because it's actually it's a lava it's actually interesting so what we are doing here if i'm correct is switching between light and dark themes and we are talking about as we can see here color themes which are a different thing compared to q-styles and a different thing compared to decoration and there's even more so what are q-styles if you look at an application the q-style is the actually it's a c++ style that decides the style of the application and you might have heard of kevantum breeze is the default one there's kevantum there also lightly which is a more transparent one which is forked from breeze and it's just the aspect of the application the color of it in breeze is defined by the core theme which is the one we are actually animating so we are keeping the breeze q-style and we're just changing colors now third-party themes like lightly also support changing colors as far as i know and in theory the animation should apply to those styles as well whereas kevantum might often kevantum themes redefine their own colors so probably they would just ignore these colors here depend on the kevantum theme in particular then there is decoration and the decoration is actually the title bar so the title bar right now if you change the title bar there is no animation but with this patch uh well david is implying that there might be in the future an animation to actually change the decoration and then there's an anything which could be anything like what else do we have plasma themes uh i guess plasma themes aren't mentioned but those could be supported as well well what's a plasma theme is the theme that actually styles plasma so the panel kickoff and applets not the applications so that was everything for me from me i hope you found this useful and i think it's a pretty nice feature and when i saw it i was like yeah i saw it with a couple of weeks a couple of weeks late but still and i really really appreciated the tweet from the gnome developer whose name is again too difficult from for my poor pronunciation pronunciation skills and because that tweet allows also some discussions outside of gnome and might lead to some actually things getting implemented in other desktops as well as we've just seen so thanks and keep doing that see you tomorrow


For 237 years, our Chaplain Corps has provided a ministry of presence to members of the naval service and their families, both ashore and afloat. We've been led by the call to serve God by serving our sailors, our Marines, our Coast Guardsmen, and their families. From the USS Constitution in 1812 to the USS Arizona at Pearl Harbor in 1941 to the Sands of Iraq in 2003 and today, the mountains of Afghanistan, you have sustained, inspired, and mentored the war fighter. In crises like September 11th, Hurricane Katrina, Operation Unified Response in Haiti, and Operation Tomodachi in Japan, you have brought a message of hope and redemption and grace in the wilderness to all corners of the globe. Who among us does not need to hear this message? Each day, Navy chaplains and religious program specialists work together, reaching out to Navy, Marine Corps, and Coast Guard personnel with spiritual care and encouragement. From the battlefields of Bellow Wood, to the frigid Chosin Reservoir, to the jungles of Vietnam, to places like Camp Leatherneck and Kandahar, chaplains have been a source of comfort and refuge for sailors and Marines as they enter into sacred spaces and face the barriers to hope. As you have embodied the true meaning of servant leadership, while remaining steadfast to a high code of ethics and integrity, you have an integral role in shaping the 21st century sailor and Marine, ensuring that they have the spiritual resilience to cope with the inevitable hardships of military life and the ability to remain ever ready to do what is required of them as war fighters. Above all, you care for all with compassion. The demands of the past 11 years alone have placed a heavy burden on our military and their families through your delivery of religious programs like Crado, small group Bible studies and Vacation Bible School, and work in programs like Safe Harbor and your Healing Ministry throughout our naval hospitals. You continue to have a profound and uplifting impact on the lives of many. Your innovative approach to shore ministry enriches and reenergizes the lives of our service members and their families. I am humbled and honored to serve as your chief of chaplains. Our legacy is rich and our future is full of promise.  Whether active or reserve, we are truly one chaplain corps unified by one mission, the call to serve. We are indeed called, and you are serving very well. May God continue to bless your ministry on the deck plates, out in the field, operating forward and ashore. Happy anniversary. Happy anniversary. Happy anniversary chaplains.


do you ever read papers where on the x-axis they have really long labels and so they put them at an angle or maybe 90 degrees and you're you're just kind of kind of have to crane your neck and then for the rest of the day after you read that paper well you're kind of like this yeah well in today's episode of code club we'll see what we can do about that ah my neck that is not a great practice but too often i think we are left feeling if we don't have many options well in today's episode of code club we're going to look at long axis labels and what we can do to make them better in previous episodes we created a plot where the labels on the x-axis are rather long and my solution at the time was to put in line breaks to kind of make them go over three lines and that way they wouldn't be so long they overlap we wouldn't have to put them on an angle we'll revisit all those different approaches and we'll throw those by the side and i'll show you an even better approach at the end so be sure you stay tuned all the way through all right folks here's my code here in our studio schubert diversity dot r again remember if you want this starting code go down below in the description you'll find a link to a blog post for today's episode where you can get this starting code chunk also if you want the data you want to see how to install our studio r get the packages i'm using be sure you check the video that's linked above that will tell you everything you need to to get going very good so again this is my schubert diversity dot r script um leaving off basically where we were at the end of the last episode um if you haven't seen that go ahead and check it out it's not required uh let me go ahead and run this so you can see what we get in the end this is where we left off at the end of the last episode more or less i did change one subtle thing and that was to remove my line breaks here on the x axis labels and so you can see the problem right these labels are rather long and we'd rather them not be so long so what can we do well the solution that most people take is to rotate those labels so that they're easier to see and so they don't run over each other there's a couple ways that we have to to solve that problem of getting the rotation so let's go ahead back to our code and if we come down here to our element markdown for axis text x and if you're using element markdown or element text it doesn't matter the argument's going to be the same that we could put an angle equals 45 and that will rotate the text 45 degrees so let's give this a run and see what we get sure enough we've now rotated them 45 degrees but something you'll notice is that the label is centered at where it crosses the x axis right and what we'd rather have it be is perhaps right justified so the right end of the label is down here at where it crosses the x axis how do we do that i thought you'd never ask so sure enough down here we can do h just so h just is horizontal justification there's also v just for vertical justification so let's do h just equals zero i always get my zero and one confused i think though this is going to be left justified and sure enough it you'll see that it is left justified so let's do one instead and that should make it right justified and sure enough we now see that our labels are right justified and are pretty well justified again we have this problem i guess for the way you're seeing it you're gonna again crane your neck and and you can play with this angle you know if you want it to be 90 degrees so that it's up and down i think as people get more labels and more things across the x axis that angle kind of shifts to end up being more vertical to the point where you're really just kind of tilting everything so an alternative to setting the angle and the h just in element markdown or element text is to come back up to scale x discrete and to do guide equals and then we'll do guide axis angle equals 45 and so this will set the angle for us as well as the justification we now see that we've got that angle set for us and of course we could do any angle that we want here in this guide axis we can you know do 60 and we'll get a steeper angle to everything and and things start getting pretty messy right let me get rid of that another nice feature within guide axis is that you can give it the option n dot dodge and what n dot dodge does is you give it a number and it basically makes different rows for each of your labels and so if you say n dodge equals two then you get two rows and it'll dodge our reposition your x axis labels so that there's two rows let me see show you what we mean so what we see in this output is that we now have two rows of x axis labels they no longer overlap with each other however this third one the cdiff positive one does run off the right side of the figure but what we've got are two rows of labels so healthy and diarrhea plus cdiff and then in the second row diarrhea and cdiff negative i'm sure this works in some situations but in this situation i'm really not feeling it it's still quite long and kind of gets kind of messy here in the text so let's go ahead and put the line breaks back in i am using element markdown which allows me to insert html into the labels and um and so what i can do here is i can use the br tag which is a line break in html if you were using element text you would use backslash n instead of br so i'll put another br here and i'll copy this and and paste it in to put my n on the on a third row so we'll go ahead and run that and see what things look like and i still have my dodge on but you can see that i have those over the different line breaks let me replace n dodge with angle equals 45 again to show you what this looks like with a little bit more compact representation and that looks a little bit better i'm still creating my neck to see what it looks like or see what i'm reading again if i did angle equals 90 again you're creating your neck so that you can um see what's going on the other thing that i'm noticing is that as the label gets longer or the angle gets more steep it is adjusting the y axis but my text that i have to indicate significance is getting more and more compressed so i would if i if i went with this i'd have to go back and readjust the position of those things looking at this i'm reminded of an episode i did previously on the z pattern and that when we approach a figure at least in western cultures we read the figure in a z orientation and as i was thinking about this figure and thinking about the z pattern i was thinking well the information that's important is actually at the bottom um and you know if we if we could perhaps rotate our plot say 90 degrees that that would be pretty slick because then i could have i could have my x axis labels on the left side and because they're long i can read them without granting my neck um and i then have the important information about you know what the different groups are on the left and then i can see across to the right the different values of what's going on so let's give that a shot something that we might end up doing in the end is we could rewrite our gg plot to switch our x and y but say we're not really ready to make that type of investment how might we change things well i'm going to come down to the bottom here and i'm going to add cord flip and what cord flip will do is flip my coordinates 90 degrees so let's go ahead and give this a run and see what we get and so we see is that it's flipped at 90 degrees a couple problems though first of all my x axis labels um are definitely running over each other and i think that's because i forgot to turn off the angle equals 90 in that uh guide underscore axis function also before i had um my healthy in the first column followed by uh diarrhea seed of negative followed by seed of positive so my order here is all out of whack also i've got my uh significance indicators you know they're kind of in the wrong place so let's see if we can't clean this up a little bit first thing we can do is let's get rid of that angle equals 90 and i will also then come down and access text y and so that already looks better i'm not craning my neck it's a lot cleaner to read i think so the next thing that i want to take on is the order of my three groups i i think i like this and so i'm going to stick with it so i think i want healthy up top followed by seed diarrhea and seed of negative and finally diarrhea and seed of positive i set the order for that up here where i was reading in metadata and define disease that as a factor and i set these levels so i could copy and paste and and change the order of these things or i can use the rev function which is short for reverse so to show you how that works if i run rev if i run rev down here at my prompt then i get case dire real control non dire control reverses the order of everything so i'll go ahead and run everything again and those three groups should be flipped sure enough i now have healthy diarrhea and seed of negative diarrhea and seed of positive so the next problem is that my indicators of significance are now in the wrong place this bar and the ns need to be dropped down and this bar and the star need to be raised up if we come back down here to where we are adding those things at position two three which is position two three on the x axis is now position two three on the y axis this starts getting confusing we'll come back to that i'm going to change this now to one two and i'm going to put ns at one point five so let's do little steps we'll give this a run and we now see that we have ns and our bar at the right place so the next thing i want to do is move this bar and the star up and so that is going to start instead of at one it's going to start at three and come down to one point five so we now want to move the star and so that's going to be midway between three and one and a half two point two five and sure enough we've got our star i just want to bump that star and the ns over a smidge so i'll put that to 25 and this the 34.5 and i think we'll be in good shape now so that looks great again i think this is a lot more readable sure we can turn the angle on our axis labels but should we hmm i kind of think not something that you might also want to play with is where do we justify these labels what we could do again is we could say h just equals zero and we see that that's now left justified i still like i kind of liked it the other way where it was right justified because now we have this big gap between healthy and the axis so maybe we'll leave it the default which was h just equals one so one last thing that i'm thinking about with this figure that would maybe make it read a little bit better but again it's going to be a little bit different than what we're used to is this x axis label which is really you'll recall the y axis label is on the bottom and so i have to look through all this stuff before i look to the bottom and see what it is what if i actually put this up at the top how would i go about doing that well it's actually not that hard what we can do is we can add a scale y continuous and so we'll call it because we flip the coordinates scheme um what's y is now x and what's left we actually want on the right because that's going to be on the top staying with me so we can do position equals right and that will put it on the right and then it will flip it it should be on the top voila well what do you think i i think this is kind of cool um another way that we could have gotten to this is perhaps by having a title across the top telling people what they're looking at in terms of what variable we're plotting again for scientific publications we generally don't have titles at the top of each of our panels and a paper um i kind of like this um i know it's quite a bit different than what people are used to seeing we're used to having that x axis at the bottom um but again it shows the reader immediately what we're looking at let me know down below in the comments do you prefer do you like this look with the x axis on the top or on the bottom um i think i i'm kind of liking this a little bit um and kind of excited about it but at the same time i know that this is going to be really different from my audience um to think about one thing that i'm noticing as i talk to you and to think through the logic now of how we're working with this plot is that everything is different right so right is really top x is really y y is really x um it gets confusing and so while cord flip might be useful for um exploring our data long term it's going to be a pain right it's really going to cause problems as we're trying to think through and maintain our code long term so what would i do well actually would probably at this point get rid of cord flip and change everything to get it to look the way i want using kind of naming things the way they're supposed to be named so i'm going to go through that with you to show you how we would do it without using cord flip and so what we'll do basically is that everywhere we have an x we'll change it to a y and so i expect errors as we go through because things are going to get a little bit sloppy um and so again wherever i have an x i'm going to put a y and a y and x and we'll see if we can do this with minimal problems so again instead of right we're now going to be top um this all looks good um and then this is going to be axis text y so again here is a situation where it gets kind of confusing because the text is on the y axis but we used cord flip and we define the text on the x axis so this is a case where we still want it to be axis axis text y and i think we're in good there here now we want to change our x and y um and uh y uh y and x y x y x and i think we're good so we'll give this a run again something that you know i i think we could quibble about is where do we want that x axis label do we want it on the top or in the default position on the bottom um in terms of readability i kind of like it up at the top here because it's immediately clear what you're looking at sure you know it doesn't take much to look to the bottom and see you know it's inverse simpson index um but i do kind of like having everything referenced at that top row right like i'm using healthy as my reference position that i want my audience to compare everything back to so why not also have the default values of those index reference values for the inverse simpson index also at the top you know i could go either way again let me know down below what you think let's take some time and compare these two representations of the same data in the original version um again i have long long labels but i think the the better look for this would be to kind of wrap those labels like we ended up but leaving them um on the x axis and i so i think this is a clean representation so the problem with the angled version is that again you have to kind of crane your neck to the side to read it and to understand what's going on that's not so desirable also one of the things that was in the back of my mind as i approached this problem was this idea of the z pattern and that we like to read things in a z pattern or if not a z more of like an f um where again we kind of go left to right and kind of moving down i think this new representation of the of the data really embodies and encapsulates that z pattern or the f pattern um as again i can read across to see i'm looking at the inverse simpson index i can see the value range for my um x axis and then i can look at healthy i can then look at diarrhea and cdiff negative diarrhea and cdiff positive and i don't have to crane my neck to the side to figure out what's going on i really prefer this new version a lot more to the other i'm surprised at how much more i like it um again let me know uh what you think and if you like this better i know sometimes in this field of microbial ecology we can tend to have very long variable names um on that x axis where we might have some bacterial uh name uh as you know basilis sodalis or escherichia coli and then in parentheses we might put you know some some name or ot designation or some other bit of information and so those labels can get really long and so flipping the coordinates like this really improves the readability so you don't have to read about changing things on the angle that being said if you do need to move things on an angle or dodge things you can do that using the guide axis function in scale x discrete or you can do some of that also in the theme function for the the axis text and we also saw how you could use chord flip to flip the x and y axes but in the long run that gets difficult to maintain because it's hard to think about what's left what's up what's down what's x what's why and so if you like the flipped orientation i would encourage you to go back and recode your figure while it's still relatively simple and while you remember what you're looking at so that x means x y means y we're making making our yes mean yes and our no mean no right anyway i hope you found this episode interesting and transformative i dare say i want to remind you that i started with a critique right that there's something that is not at me about the figure and so by working through that critique and always trying to make it better i think that we have come upon a figure in the end that regardless of where you think that x axis belongs is a lot more readable and interpretable than when we had originally again always be willing to critique what you're working with and share what you've done with your friends and um and other people that that you know might be stakeholders so to speak in how to interpret those results anyway enough said uh again i hope you enjoyed this please be sure to share this with your friend if you're a student or a postdoc i'd be really intrigued if you share these two visuals with your pi ask them what they prefer do they prefer having the columns vertical with labels at the bottom or do they prefer having the columns go to the right with the labels on the left ask your pi what they think um and again let me know down below uh what you find out anyway see you next time for another episode of code club


You see this? I finally got COVID. Going insane, I'm stuck in my house. I don't like quarantine. No, me gusta. And you know where I got COVID? From a nice old lady. That's right. I went over to her house last week to help her with the project. When I walked in the door, she said, oh, I have some allergies. It's nothing. And I trusted her. And then I got COVID. Boo. So the moral of this story is don't trust any old ladies who seem sweet because they might be harboring a deadly virus. Luckily, it's been very mild for me. I've had it for about five days now. Minor cold symptoms, little phlegm in the throat. I cough every now and then, little bit of boogies in the nose. That's it. And I'm very grateful because I know that COVID can hit some people very hard. I've been vaccinated and boosted and all that stuff. But this is a bummer.  I don't want to pass this on to anybody else. So I've just been hanging out by myself. And it's beautiful. It's like the most beautiful week of the year here in Boulder. I was supposed to spend Mother's Day with my mom.  That sucked. You know, you heard me in my last video talking about how excited I was to see Amelia after coming back from Mexico. I don't want to get her sick. So we've just been doing the FaceTime thing, which is fun, but it's not nearly as fun as seeing somebody in person. So let this be a lesson to you. If you're hanging out with somebody and they have cold symptoms, like their stuffy nose or something, wear a mask around them because you never know.    Hello, is anybody out there? I've been talking to myself a lot lately and now I'm talking to you. Ooh, is it scary? I'll get there, I promise. I'll get there. We're getting closer. I'm going a little crazy, as you can see, at home all alone, but when life hands me lemonade, I mean, when life hands me lemons, I make lemonade. And in this case, I'm just gonna go do something that I love doing and that means sleeping under the stars and riding my bike. I picked out a local trail up here that has some camping access called the Serran St. Vrain. It's about 15 miles away, up a pretty steep mountain, past a cool little town called Jamestown. And I just wanna go just sleep in the woods. For me, nature is where I go to heal, to think, and to just feel good. And they do tell you when you do have COVID to not exert yourself physically because your body needs all its energy to fight off the virus. But in this case, I've been sitting around for five days and I just wanna get on my bike and go outside and yeah, so that's what I'm gonna do, a little backyard bike packing. Why don't you take a seat, Ryan? Don't mind if I do.  And I wanna do this and show you what I bring so you can say, hey, that looks pretty easy. I can go do an overnighter with my kids or with my wife or whatever and show you how accessible it is to get out of the house just for a night. So here we go. First up, the Nemo Dragonfly. What is the Nemo Dragonfly? It's a tent. Yeah, there's a tent inside of this thing. It's their new bike packing tent and I'm excited to try it out. I've never slept in this before. My new 20 degree quilt. Might get cold up there. It is the Rockies. My super lightweight thermal, thermal, thermal, thermal. A nice warm hat. Ole, a long sleeve night shirt. Long pants and my trusty puffy. How long can I spin like this? Nobody knows. Ah, there's something behind my ear. Oh, ha, look at that. It's my tiny Stary Pen. I'm gonna be camping next to a creek and obviously I need H2O. We all do. It's something humans need. Water, never leave home without it. Or at least have one of these. So if you do find water, you can purify it. Thank you for listening to my Ted Talk. 38 miles per burrito. Okay, we will put that to the test with this football-sized burrito. This is gonna be my dinner. And a drone for droning. Hello. And a GoPro for GoPro-ing. And my Mexican Lucha Libre mask to scare away any potential chupacabra sightings. Okay, so this is just really simple. And the main reason why I'm getting out there is because whenever I'm slightly depressed, bummed out, or stressed, or just not feeling right, as long as I'm doing something, I feel better. Especially if I'm doing something outside that involves moving my body, sleeping under the stars, just checking out Mother Nature, listening to birds, listening to the creek, water, whatever it is, it takes me out of my little pity party.   So, let's go do it. Biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, biddle, let's go guys, let's go, let's do this. Da, da, da, da, da, da, da, here we go. It's time for adventure. You know what I love about panniers? They're way easier to pack than bike packing bags. You can just toss everything in. And I don't travel with panniers very often anymore, so it's kinda nice to break them back out. So close. I am bringing my Priority 600 because I'm gonna only ride in pavement. And I don't need my 600X. I've had this bike for four years. It's my everyday commuter. And of course it has pinion and gates. Oh yeah, one, two. Of course I'm gonna wear a helmet and my special good luck Amelia sunglasses. Let's do this. All the flat riding is over. From here on out, it's about 14 miles up. I'm gonna be gaining 3,500 feet of elevation. One of my favorite things about riding a bike in the springtime in Boulder are all the flowers. Are the buds. It smells so good. There's lilacs and all sorts of other stuff. The whole world smells like candy land. And I'm a fan. And I'm glad that my COVID hasn't killed my sense of smell. Hello dears. I see you hiding under the tree. That'll harder. Okay, okay, okay. Left hand, can you? Can you believe that this is my backyard? I love it. I love you Boulder. Look, a sign with tons of bullet holes in it. You know me.  This is James Town.  It's gotten a lot steeper since James Town. I'm having to work for it now. Petal, petal, petal baby. Petal power. You know, being on a bike simplifies everything. I haven't thought about COVID for the past two hours. All I've thought about are, you know, the beauty around me, the trees, the chipmunks I see scampering into the woods, the deer, my breath, the sound of the tires rolling on the pavement, all the simple things. All the things that are hard to hear when you're inside. I'm on dirt. I love dirt. And the trailhead is real close. I think I'm getting closer. Pretty much anywhere is good to go. This is beautiful. Look at these big old trees. Here we go. Clean water. No whammy's, no GRDEs. Ta-da. I'm excited so far about this tent. It's bigger, taller, and looks cool. Now that was a true test of whether or not my lungs are okay with COVID. Huh. I think I've told you this before, but I think food always tastes better when you're outside. Woo, woo, woo. But life is good. Life is really good. Even with COVID, life is good. And I'm so glad that I got out of the house today. Because the last, the previous seven days, I've been kind of grumpy, having a pity party. Meh, I got COVID. I can't see Amelia. And you know, not only not seeing Amelia, but I had to cancel two races. I couldn't see my mom on Mother's Day. There's been a lot. But I'm very grateful that I have a mild case. I know that this can be very serious. And some people have struggled with it and have serious side effects still today. And of course we all know that almost a million people have died just in the United States. So it's something to take seriously. And that's why I have isolated from people.  And hopefully I test negative soon.  And you know, one of the interesting side effects, one of the positive aspects of getting COVID is that I've had a lot of time to sit in my room and reminisce about all the good things in life.   And so I've been thinking of Amelia a lot. And one of the big things is, the exciting things is the future, the future of with Amelia and what we're gonna build together, a beautiful life together and adventures and love and you know, who knows what. And so I've had a lot of time to plan life for the past seven days. There's no doubt about that. Ah, my arm is getting tired, holding this camera up. And this moon right now is incredible. Buenos noches. Well, good morning. I slept really well. And the most exciting thing last night was definitely the moon. It was just moving slowly across the sky, creating all these cool shadows in this forest right here. It was definitely worth the price of admission. Oh, yes. You beautiful piece of flat ground.  I feel so much better. I really do. The sun is coming up right behind me and I'm gonna put the cameras away and just ride home. Thank you so much for joining me on this little mini adventure.  And man, just that little bit of time into the stars refreshed my soul. And please like and subscribe and do all that fun stuff that you do on YouTube. I would appreciate it. Have a good one. We'll see you next time.


Today, I'm talking about the Android HAL, and this is where I was about two years ago. I had just an off-the-shelf, it was actually a Beagle board, not a Beagle bone, it was pictured there, and a sensor board, and I want to put the two of them together. It seems like that should be easy, right? All the source codes out there, all the drivers are there, Android is completely open source, but it was, there was no documentation, right, and a common thread I keep hearing at this conference, it seems like we're all going and sort of combing through the source code and reverse engineering, you know, the big picture out of all these details. And so that's what I want to share today. Another reason you might want to do this is for off-the-shelf devices, right, on what I was showing before, traditionally, you know, you have sensors talking to the application processor over chip-to-chip interconnect, I squared C, SPI, and, but what I think there's some really interesting possibilities for connecting up, say, an off-the-shelf, you know, no-name Android TV to a Bluetooth temperature sensor. Or you know, over there you say, well that looks like another one of those boards, but what's interesting about that board from FreeScale, and if you download these slides, you can click through these links to these to actually find them, that's a USB sensor hub, and so you can, you know, put it in your own little box, connect it up on USB, no soldering, no header pins required, all right? Or maybe you just want to get more functionality out of the phone you have, because like so many things the hardware provides a lot more functionality than the software makes available. In particular, on the Galaxy S3, it has a barometer, and the barometer needs a very good temperature sensor on there, and, but the sensor how the chips with that device doesn't bring the temperature sensor out. Why not? It's probably the best guess at ambient room temperature you have. So you know, this is, I hope with what I'm talking about today, you could go grab your device and start poking around and see what you can see if you can unlock a little hidden functionality. All right, so yeah, you should be able to do this, start experimenting, integrate some new sensors, and you know, get an idea of when things aren't working, where you need to start debugging. Here's the problem. It's actually better than it was a couple years ago. But if you go Google that, this is the page that comes up, and it basically points you towards the header and says, this is the hell.  How do I do that? And like I said before, the scorecode's there, but not much of the big picture. All right, so here is the big picture. And if you went to the camera 2.0 talk yesterday, this is a similar kind of diagram because Android, they use the same how sort of mechanisms for sensors, GPS, camera, right? They're trying to insulate the Android internals from, you know, device to device changes. And so every device that ships has its own, you know, slightly different sensors.so or lib sensor it's sometimes called, you know, I'll go back and forth using it interchangeably along with how, but they're all the same thing, they're that blue box, and if you're making a device or you want to change how the sensors work, you want to put your code there. So let's walk through the data flow, not such a different slide. So all the way at the top we have applications, all the way at the bottom we have silicon, you know, these great mems devices. And what's great about doing this, if you replace the how, is all those apps you can download from the Google Play Store and elsewhere, they use the standard Android APIs, they can now talk to the sensors on your device.  I think that's one of the great parts about Android. So just walking through how this goes, let's say you fire up an application that requests the accelerometer. That comes down here to the sensor manager, you know, inside Android, and the sensor manager is what takes care of if you have three applications and they're all asking for the accelerometer data, it keeps track of who's listening and at what rates and who wants the data. That comes down here as a request to the sensor how, if the accelerometer isn't turned on, the sensor manager knows that and tells the how, hey, go enable the accelerometer and once you enable it, please set it at this rate. And you'll notice if you're familiar with the Android sensor manager APIs where you request, you know, the fastest rate or the slower rate, that translates pretty directly into the sensor how call. And this is where it starts to get different on each device is the, depending on the sensors that you have connected and what drivers they have, that how is going to have some intimate knowledge that, okay, for the accelerometer, I need to use CISFS to enable it and there's a CISFS entry for that device. That goes through that Linux infrastructure, standard drivers, all the way down to the silicon. Likewise, you'll, so that's the enable and then what happens is the sensor manager keeps the timer and starts asking the how, hey, do you have any data, do you have any data at whether it's five hertz or 200 hertz or whatever the system can do. All right. So, kind of talking a little bit more at the top of the stack here, I'm going to have a little map to keep that bigger picture in mind. This is one of my favorite sensor apps, it's nothing fancy, but it's fancier than anything I would have built myself, which is usually just text streaming on a console. And it tells you all the sensors that the how says are there, right, so you can actually have more sensors on the device, but if the how doesn't bring them up, the sensor manager isn't going to know about it and neither will any of the apps. At the keynote yesterday, the guy from NASA was talking about the CellBots data logger, and it's another great sensor application. And I think this is part of the joy of Android, you don't have to write those. So, kind of jumping around a little bit, I'm not going to talk about sensor drivers, this is actually a real key sticking point when you're trying to hack on devices, is are the drivers doing, are they available for your sensors? Do they have any incompatibilities with what you want to do? And I've talked for a long time about this, and actually a little shameless plug, and I'm going to be giving a talk at Design West about reusing sensor drivers that are already out there and porting them to different systems. All right, so I won't talk about sensor drivers today. I'm going to talk a little bit about the Linux infrastructure that the HAL really relies on, or you're going to rely on if you're building the HAL. And you think about those drivers as having kind of a bottom API, that they use to access SPI or I2C or USB. But at the top level is really where the HAL gets involved, is what's the top level interface that those drivers present? And most, two years ago, a year ago, maybe even, most drivers had input event interfaces. And I'll go into detail. I'm going to talk about input event today. Sensor manufacturers are moving away from this and doing IIO drivers and some different methodologies, but what's great about input event drivers is they're easy to write, and they're also very easy to work with command line, which is why I'm going to talk about them today. But I think the big key with the Linux infrastructure is there's so many tools out there, don't reinvent the wheel. Use something that's there. Input event framework hails from the days of way back when. It's really rooted in mice, keyboard, and joysticks. And I think a lot of people kind of look sideways at it when they first see it, but it really is handy to work with. Here's the demo part. And the thing I want you to remember out of this demo is that the input event framework, it presents the sensors as a name that you can understand, like MPU 6050 accelerometer, and a whole stream of events. All right. So usually the first thing you want to do, kind of backing up here is what I want to show here is it's hard to write the HAL if you don't know how to read the data. So that's why in this demo I'll walk through finding out what sensors are there and reading the data, and then the HAL is going to have to do that same thing we're going to do with command line. All right. So here we go. So we start up adb shell.  You should be able to cap them, right? You should be able to, you can go in ls, you know, all the input event drivers show up in dev input. But it's, you know, which of those 14 devices is the one we're interested in? So to do that, you just have to remember this magic, you know, incantation here. In the proc file system there's a place where you can find out all the names and gory details about each of the devices. So on here you can see that there's a, there's a light sensor. You know, we've got some other jack. You know, a lot of buttons and different other peripherals show up as input event devices. The ones that we care about for the sensor HAL, obviously the sensors here. And what you want to look for is this line that says handlers and that tells you the device file that you can read. And so the accelerometer that I want to look at is on event six. So let's go cat event six. And this is kind of a setup here because catting is a bad idea. It's not going to hurt anything. And there's all that garbage.  Well, because it's not, that's a binary file. It's a whole series of these input event structs which have a time stamp code. They've got some other stuff I'll talk about. But at the command line it's great. There's something built in. It's in every Android distribution, you know, every Android device I've tried has get event. And you can use get event. I'll use the dash t to get a time stamp because that's a key property of input devices. There it goes. All that data comes out. And if you look here, so we've got the format is time stamp, event type, event code, and then data. So event type is telling you if it's a zero, sorry, this is whether it's a sync or relative absolute. You don't have to pay too much attention to know that this is real data and this is saying, hey, these three records go together. That's a sync. Then the code, zero, one, two, that's x, y, z. And if you look at the values, that actually makes sense for an accelerometer because what do accelerometers do mostly? They measure gravity coming down. And you can know that it's sitting flat on a table. And so, right, we do our conversion. This is actually a negative number really close to zero. That's really, you know, x, y. Those are both pretty close to zero. And this right here, 2,000 hex, just, you know, because I've spent too much time doing that. I know that's what gravity shows up on this sensor as. Now, that doesn't look like, you know, an Android sensor. It was saying 9.8 meters per second squared is what gravity is coming down as. And that's a big job of a sensor is to convert those driver values into floating point, you know, real engineering units. And what can mess you up is if the driver is, say, in a, right now it's in a 4G mode, but that accelerometer supports like an 8G and a 2G. And if somebody's changed the mode on you or you've changed the mode and forgot about it, that conversion factor changes. And so it's something that the how has to keep track of if you're going to switch ranges or you're going to do anything strange. All right. So yeah, use get event. It's very handy. And in fact, you know, I've taken, qualified to see how well the sensors are working on a platform just by piping this into a file, pulling it out, you know, parsing it up. There's a whole lot you can do with this before the rest of the Android system is built if you're building your own board. And you just want to know, hey, how good are the sensors working? Right. So input events are data pipe. If you look in the header, there is technically a back channel for force feedback joysticks that I've been tempted to piggyback on. But really it's the common way to do it is to use makesysifest entries for control. And here you'll see this little demo will start up. It's going to go read a bunch of data, I think. Oh, first I'm going to turn it off. There we go. So this is our good friend Echo. And this, you know, how do you find this path? Where does that magic come from? That's, you got to go read the driver and see where it's putting it. This particular driver, sometimes, some people put them in CIS class sensors. They put the enables. If you dig around in CIS class sensors, you might even be able to find ways to, you know, read the raw data or read calibration values. The Samsung devices tend to put them here for the drivers on Samsung devices, I should say. Okay. So, oh yeah, got to redirect in the file. So now I try and get event again and no luck, right? It's trying to... Nothing happening there as we expect. I'm going to go back, enable the sensor, and events show up, right? And so those actions right there are most of what your HAL needs to do. I mean, there's other details, but that's the key thing is how the HAL needs to operate the sensor drivers to enable them and get the data out of them. So, here is this header, go open it up, take a look at it. And here's the important bits. Input event devices make input event structs. And it's the same thing we were printing out with get event, time stamp, a type code value. And, you know, the difference between, you know, you'll see over there some of the types of key that shows the keyboard legacy of this. And the difference between relative and absolute, you don't have to worry too much. You know, a mouse is a relative device where every time you move it, it just spits out a delta. And a touchpad is an absolute device. And when you're hitting the top left of the touchpad or the bottom right, those are always the same. It's always 00 or 128, 128. Why that matters is a subtle detail on the input event system filtering out values, but I won't go into that too much. The event codes, XYZ is pretty simple. You have a light sensor. That's when things start to break down, you know, it's just a single-axis sensor. So, what is the event code that it should output? You know, I think that on this device, it shows up as like EV gas, or something like gas pedal, right? There's a lot of game heritage here. I've seen magnetometers that return EV hat. What is that? And the standard starts to break down. But for regular sensors, people, they usually show up like this. What bugs a lot of people about input event system is that you have four of these structs to represent what is really three, probably 16-bit values. So there could be a little bit of overhead, especially some of these high-rate gyroscopes that are, you know, one kilohertz of data. Yeah, it's a lot of extra baggage to be bringing along, which is why people are like IIO. But it's useful. Okay. So here's some links you can click on, some more reading about input event. I'll let you guys check that out later. It's a lip sensor. Okay, time. It's primary job. Is it startup? It tells Android, hey, here's the sensors I have. And then as we just did command line, it needs to control the sensors and read the data. Okay.  You open up sensors.h. And this is the function pointer you need to implement that does get sensor list. Ugly, but the best part is you find someone else's implementation and you just tweak on that. So it makes sensors available and it has more methods like activate, it's enable, disable, set delay, how fast you want the data, be wary of milliseconds and nanoseconds and all that. And this sensor data, when you pull, see that struck sensors data? Sensor data T, this one right here. So we got those input events that had values that were integer values. Inside that sensor data T, it wants floating point values. So that's really the job of lip sensors to convert those driver values into Android's preferred engineering units. And here we go. That's what I was just talking about. And this sensor data T has a nice union so you can get at it as like a vector or an x, y, z, or we've got a few more things in there. Another thing besides doing units is also the orientation of sensors. This drives everybody crazy. I spent more hours in my life than I care to admit because someone has laid out the sensor on the board one sensor this way and the rest of them all that way. And it really comes into the fact that y plus y is supposed to be here and z out that way. And it's a real time waster to get them all oriented in the same direction. And that's another big job of lip sensors. So there's the header link. Take a look. There's actually, it talks about, there's some decent comments in the header about Android's conventions for how it wants sensors. As I said, adapt an existing implementation. If you are cooking your own, I recommend one of these rowboats, one from a rowboat. A lot of the ones if you look in the AOSP tree on Nexus devices will have proprietary links to sensor manufacturers, sensor fusion. And it really gets in the way of what you want to do. And this is kind of a more simple place to start. I don't really like this. I think this sensor base is the class. This is in that canonical implementation of LibSensor. They utilize this class. And I think this represents a lot of what people don't like about C++. And it's kind of thrown together. But it works. And what it does, you derive your own from sensor base an accelerometer sensor or gyro sensor. You can do a generic three-axis sensor, however you like. And utilize this input event. Someone else has done the ugly bits of pulling the input event and getting that. So you can reuse that. It takes care of issues you don't want to. All right. So go ahead and follow these links. Here's one from the Samsung Tuna. What is that, the Galaxy Nexus? I always get all those Nexus names confused. And you look in there and you'll see that the light in the pressure sensor are just brought out in the same way that they are in the TI-Robot LibSensor. But then for the inertial sensors, the magnetometer accelerometer gyro, it's all taken care of by the InvenSense MPL layer. And that can be problematic if you are trying to re-implement the HAL. So back kind of in the... Oh, my box is off there. Some more stuff to read about Linux infrastructure. Like I said, IEO is definitely, if you're looking at the sensors, the latest InvenSense drivers are all IEO, the latest ST drivers are all IEO. And there are lots of legacy... Legacy has a bad connotation. There's lots of input event drivers out there too. And some more reading on the lower sensor device standards as well. All right. So things to remember. You want to implement the glue in between the HAL. Re-use what you can. And try and find drivers that you can use. Nobody likes debugging drivers. All right. So what's next? The HAL hasn't changed in the last three Android releases. The implementation of sensor managers changed though. So it used to be you could only have one accelerometer in a system. Now, if your implementation of the sensors says that there are two accelerometers in ICS, both of those will show up. Sensor fusion demons, that's that binary bit I was talking about that InvenSense puts out. Sensor platforms actually puts one of those out too. They make it a little harder for the hackers and all of us. But if you do present just the raw sensors, Android will compute some sensor fusion for you. It's not great. I wouldn't steer spacecraft with it or little robots. But it gets the job done. These dedicated sensor processors are an interesting idea. I sort of see it as the flip side of graphics processing. There's a surprising amount of math and physics that goes into this stuff and a lot of computation. And if you can, you know, anything you do to keep that application process from waking up. So people are either putting dedicated sensor hubs or combining the touch controller with a sensor hub together or the GPS in the sensor hub. And it's an interesting architecture choice. Along with that, you know, in the future, I really see something more like an open GL for sensor processing happening, especially as we start pushing the bounds of what these virtual sensors are and what you can do with them. Like I said, those virtual sensors, we think are pretty interesting. So that's all I have. I'm happy to take any questions. Yeah. All right. The question is, I mentioned sensor fusion. I didn't talk about it a whole lot. Where does it show up? Let's go back here. So sensor fusion, there's nothing to say it can't happen right here. It's typically, if not straight in the how, there's some fusion from that, I should say the InvenSense MPL. They, straight from the how, they load up a shared object library. And that shared object library does the fusion. The AKM is a magnetometer, a compass manufacturer. You go to AKM's website, you can download their AKM demon, which used to be on the Crespo device, I believe. And you think about a demon, you can run top and you can see, wow, I think that AKMD takes 5% or 6% of the CPU when you're doing a full device orientation. Which is, that's the tough thing that sensors want to do. With these dedicated sensor processors, the always on kind of thing, if nobody's listening to the sensors, calibration's always running in the background. And I was talking with dedicated sensor processors, they're starting to push that calibration and even some fusion down into the hardware. And it has some interesting battery trade-offs with the requisite increase in bill of materials costs. Yeah, so there's a, if you provide a, if you don't provide a rotation vector, so rotation vector orientation, the sensor service will actually use the MP light and do some fusion for you. You know, another one of my, I'm going to get on my soapbox about virtual sensors is that, so you could also think of screen orientation as sensor fusion. It's taking the accelerometer and trying to figure out, are you holding it this way or are you holding this way?  If I'm laying on the couch and it's got it wrong, I want to see it this way. And I think that's part of the problem is that they're doing some sensor fusion, trying to make this virtual screen orientation sensor. They're doing it up here, whereas if they would have made that a virtual sensor in the how, somebody else has a better idea. Maybe they want to use the camera and track my eyes and correlate that with gravity and say, hey, gravity, you know, the device is facing this way, but he's really looking like that. So let's not change the screen. Unfortunately, that's not something you can do because there is a little bit of fusion happening up there. So I guess that's one other question. Yeah, IO, industrial, I believe, input-output, industrial input-output. So, you know, sensors have this, there's such a broad connotation, right? I mean, you can think of a camera as a light sensor. Why doesn't that show up here? But, you know, strictly more sensors, I've seen people talk about, you come from the PC world on Linux and there's like hardware mon for monitoring fan speed and CPU temperature. Those are sensors. But they're very, they're kind of low-rate. The information that comes out, you know, it isn't very fast. On the other end, you have people like at CERN, who, you know, they have sensors in the super colliders that are like gigabits of data a second. And so the, you know, input event definitely won't work for them. You can actually see in one of the complaints about IO, that they say, well, that doesn't even work. And IO comes from the, from analog devices, right? Sensors, another way to look at a sensor is really, the silicon, it's this mem stuff is doing very minute changes in electrical properties and they have really good analog to digital converters in there. And so, you know, they're kind of fancy analog to digital converters or device specific. And the kind of data rates that analog devices was seeing, you know, they wanted to buffer a lot of data. The input event system wasn't working for that. You know, they want to do one, one kilohertz data rates. And so IO has support for buffered data, multiple channels of data being able, rather than, remember I talked about how a magnetometer coming back is, you know, EV hat. What's that about? You can actually name each of the data channels that are coming out. The downside to IO though, in my opinion, is it's too, it's overly flexible. You know, whereas I can get an input event device and read X, Y, Z and I've got 90% of what I want. And so the IO, you know, just because you, your LibSensors targeting one IO driver doesn't mean you can instantly go to another one. It may look quite different. That is a, that's a good question. So the question is, if you have multiple accelerometers, which one, which one takes precedence? And, you know, actually I haven't looked at the Sensor Manager API for that. But I've brought up, I think, Donna Hallen brought two of them up and they show up. So good question. I'll follow up and look into that. Okay. Well, if that's all the questions, please feel free to come on up if there's anything else you want to ask. Thank you.


Welcome to the Judge Ben Show. My name is Ben Joseph. I'm a retired Vermont Superior Court Judge. This is a program in which I interview people about legal issues in Vermont. And it's actually now one in a series of interviews that I've done on the subjects of domestic violence and sexual assault. We're taping this today. And it's amazing. My guest is Amy Fitzgerald, whom I have known for many years. Amy's had quite a career. She is now the, let me see if I get this straight. The executive director of the British Columbia Society of Traditional Houses. Did I get that right? Oh, good. And she deals a lot with people who've had women who had trouble with domestic violence. And I really thought it'd be great to talk to her about how they handle this stuff in Canada. And here we are, 3,000 miles apart. And we're giving her a shot. Amy, thank you so much for doing this. I really appreciate this. It's my pleasure to be here. And thanks to the technology, we can do this. We can do it. Well, how long have you been executive director of this organization? I have been the executive director of the BC Society of Traditional Houses for two years. And before that, I was the director of training. I was initially hired to do training for them. Legal issues, related to family violence. Are you still a member of the bar in Vermont? I am an active member of the bar in Vermont. I am not a member of the law society here. But I can provide legal training and general legal information to frontline workers, which was my initial job here. And then I became executive director. What are the goals of your organization? So we are a provincial umbrella organization. So we are not frontline. We are the network that supports the frontline programs across British Columbia. So we train, support, advocate on their behalf, provide them skill enhancing, promising practices, lots of webinars right now, lots of online trainings. So we are the folks behind the frontline folks who are doing the work 24-7. How many member organizations do you have? So we now have 114 member programs across British Columbia. The organization has been around since 1978. It started with four women's shelters. Here they call women's shelters, transition houses or safe homes. It started with six, and they're the folks who banded together and said we need to have province-wide voice and province-wide advocacy and training. So they started it back in 1978. So it's been growing since then. And in British Columbia, we have seven regions across the province. And so we have houses and member programs in every single region. And then we also have a program that's specific to children and youth. It's a specialized counseling service for them. For when moms come into shelter, they get specialized psychoeducational counseling. And that's called the PEACE program. So we also oversee that portfolio or provide support and training. And that's 86 programs. And they're nestled in the women's transition housing supports program. So do you provide legal services to people or? We, there are some transition houses that have legal advocates on staff that are funded specifically to address family law matters. And they are funded by the Law Foundation of British Columbia. And they, so we provide support to them as well. And then we work very closely with Rise Women's Legal Center, which is a pro bono legal clinic based here in Vancouver, but it's affiliated with the University of British Columbia School of Law. So it's a working clinic where students come in and work there for a year and are supervised by lawyers. And so they provide a family law hotline and triage cases. They do unbundled summary legal advice virtually. And they also run a virtual legal clinic. And the virtual legal clinic actually predated the pandemic. And it was interesting, but it was to reach rural and remote communities where there were no legal resources available. So they, and they're run out of transition houses. So the woman would be in the shelter and then have the ability to connect with a lawyer using the technology and the internet that was provided at the shelter. I was recently told that one half of the homicides committed in Vermont last year involved incidences of domestic violence. Is there some overlap here in British Columbia? Yeah, absolutely. Significant number of homicides. I would say it's not quite as high as that number here, probably more like 40%, but very similar circumstances. And also a high use of firearms here. Although, you know, you don't, Canada has more restrictive gun control legislation, but still homicides and domestic violence are often committed with firearms here as well. Do these member organizations handle cases where the children are abused in the home? Yes, so it's usually a circumstance where that's part of the reason why the peace program, which was the children who were abused program originally and was recently rebranded, was created. Was there, the children were seen as either direct or indirect victims of the family violence in that setting. And when they would come into the shelter setting, there was a need for a specialized support services for them. And so that's absolutely, you know, sort of complimentary portfolio that the frontline folks are providing. Well, I always, I don't want to be precise. Most of the victims you deal with women? Yes, they are. So, and are there self-identified women who come into the shelters, but yes. And the majority of victims of intimate partner violence or domestic violence or family violence is consistently women. Not, you know, there are male victims as well, but the statistics are in concert with the statistics in the U.S. that women are predominantly the victims. Like 95% or something like that? It's like 90, yeah, 90 to 95%, absolutely. So that's the reality. And the reality is the majority of perpetrators are male. That is the reality. So, you know, it's better to acknowledge the reality so that you can address it. And there are programs that provide support services for perpetrators as well. And particularly those who are pre-charged and looking for support services and looking for sort of the equivalent of like a batters and prevention program. That's a voluntary program. And is that a nonprofit or some kind of separate from your organization? Yeah. So some of the houses themselves, you know, acknowledge that they're focused, they're mission and mandate to support women and children fleeing violence, but they also acknowledge that there's a bigger prevention element here that unless you're talking to the perpetrators and trying to address some of the underlying issues related to their behavior, we're just gonna be running shelters for the rest of the time. So sort of with the thought that we're trying to put ourselves at work, I think there was a recognition by some of our houses that we also need to provide voluntary counseling and support services for male, you know, that identify themselves as perpetrators. And we're more perpetrators.  Well, it's a daunting task. Has the pandemic affected the volume of cases? Yeah, so we, our houses, because of the provincial health mandates, had to reduce their capacity at 50% because of the physical distancing. So houses that let's say had 10 beds now had five beds. So the capacity was significantly impacted. What happened here was the... I mean, social distancing in the place? Yeah, social distancing in the place. So the houses stayed open 24-7 throughout the pandemic and they still are providing services. And for circumstances where you are at capacity or over capacity, their main funding sources is a provincial organization called BC Housing. They provided them additional overflow capacity and hotels, so they had the ability to still provide the same amount of support and to the same amount of people. But it was just in a different, oftentimes in a different site, which was a challenge because part of the transition house sector and the women's shelter sectors, it's a communal congregate setting. And a lot of the healing goes on in that house setting. Victims support each other and that kind of thing?  So it's very much a community. So that got fractured and also everyone had to wear masks and sanitize. Some houses in fact for preventative measures opted to wear gowns, hospital gowns, the staff, because they would come on site, change into that and sort of in concert with the women living at the house, so everybody knew and to be honest, initially it was a hard transition, but then the women realized that they were doing it to keep themselves safe and to keep everyone safe. So, and so yeah, so it definitely impacted the practice and we've had lots of webinars about sort of looking at other jurisdictions in terms of how they address some of these issues, lots to learn and we're still in a situation where all these mandates are still in place and Canada is actually behind the United States in terms of the vaccination rollout, so we will be in this situation for a longer period of time, probably then hopefully. Well, I just, I've always thought how difficult it is for the children in these situations. Yeah, it's very typical. Yeah, and also we had to sort of come up with what happens when children go to school and then they come back from school and then they've got all these sort of restrictions on their bubble and who they're interacting with and so many elaborate systems were put in place that were sort of on top of the elaborate systems that were already in place to keep women children safe. So yeah, this portfolio on average serves about 12,000 women and children a year. So lots of folks coming in and out of the doors. So these 12,000 cases. Yeah. And do some of these services involve people going to court with the victim? Yeah, so they do provide court support work and workers. You know, it's just a transition out to worker or support worker, but it also is now a court worker. They do many things at the transition houses. They provide, you know, they look for housing with them. They provide employer assistance and help, but yes, they do provide court support and they would go to court with them to assist them with applying for protection order or to be a witness, sort of a friendly witness or friendly helper at a court proceeding in our family court matter. All of our family court proceedings right now are virtual. So it's been unusual, right? A little bit unusual, a certain sense, if you find ourselves there, yeah. I'm just, I just feel sorry about that. I think it's so important to you. There's so much more communication than just a spoken word, you know, the way the nonverbal communication is often very important and you judge an credibility of a witness. Yeah, absolutely. And it's really, to be honest, it's an access to justice issue here because of the fact that women don't have the technology oftentimes to even engage with the courts. They're using Microsoft Teams to do it. So, you know, that requires you to have a Microsoft Teams account. So that's where the transition houses come in because they're able to at least provide that technical support. A woman can go to the transition house if she has to to use. Yeah, to interact with the courts. Yeah. Yeah. Wow. So, yeah. So it's, yeah. And there's also here in British Columbia as in the United States, there's a lack of lawyers in family court matters. So, in particular, and about 45% of women in family court matters are going self-representing. So, huge issues in terms of, you know, again. 45% of the women represent themselves? Correct. Do they, are they told what to produce or, I mean? Yeah, when they're working with the Rise Women's Legal Center, yes. But they don't have a huge budget, but no, there's very little, there's some guidance from the courts, but not, there's no, they don't have court navigators. They have court clerks that they rely on. And those, you know, those, they're busy people. And, but yeah. So, there's a significant, I would say access to justice issue. And they also had cuts to legal services recently. So that has created even more strain on women. Legal services is a government funded operation? It's a province, provincially funded corporation, yes. And they had cuts to their legal services supports. Was that because of a lack of revenue to pay for it was? Lack of revenue. And then, and then interestingly, that legal services shifted to a lot of online resources, which is good, but in some circumstances, we argued that for domestic violence or family violence, it's much, it's great to know that information, but you really need a lawyer or a legal advocate walking alongside you to have a PMU process. Sure. Wow. Well, let's see. Do you have mental illness problems with the people who come in? Are they depressed or they're, do you provide services to people like that? Yeah, many of the women who come in, they bring very complex needs with them that includes mental health and substance use issues. And so we have a training program that we run. It's called reducing barriers and it's to train transition houses to basically meet women where they're at in terms of their mental health and substance use needs. Some of our houses practice significant harm reduction and a low barrier and have a variety of practices where they're supporting women in terms of even using onsite to be honest, all the way to other houses who don't practice that but are still trying to meet women where they're at, still trying to provide services to them and to get complimentary support services for them in the community. So it's a huge issue. And it's actually one of the biggest issues right now that we're seeing is the complex needs of the women and also the children and youth that are coming in. Yeah. A lot of trauma in their background and a lot of violence. And as a result, many of them have history associated with substance use for mental illness. And some of it is coping, right? That's how they've been coping through years. Yeah, well, in my 15 years in a bench, I read a lot of pre-sentence reports and often you could just see this stem from a very violent childhood. Where the victim became a perpetrator. Exactly. And you see that the same pattern here for certain. And the children and youth in particular, that's that you have sort of a moment in time, right? That you try, that you just wanna have some immediate services to meet their needs for that reason too, so that they don't have that trajectory going forward. But yeah, so it's definitely a huge issue. And also the other thing in British Columbia is that we have a second public health emergency, which is an opioid crisis here to the point where last year we had, in British Columbia, we had 1800 folks die of opioid overdoses. And so to put that in context, we've had 1000 people die from the pandemic, from COVID-19. So we have more people dying of opioid overdoses than we do from the pandemic. So we have sort of parallel public health emergency joining at the same time. And the opioid addictions impact our portfolio. Well, what's the population of British Columbia? There's 5.1 million folks living in British Columbia. And then we're located in Vancouver, that the lower mainland metropolitan area. And that's about 675,000 folks right here. So that's sort of like Vermont. There it is. It's funny. It's close. Close. Yeah, that's it. And how many people died of opioid overdoses in the last year? We had, it was approximately 1800. So it was it, and from the year? 1800. It was more than homicides, car crashes, combined. And it was an increase from 2019 of 80%. Or something like 79%. So it's huge issue here, huge issue. In fact, they're struggling with it and trying to, there's talk of trying to decriminalize small like, you know, doses of for use for personal use. And they're trying to get the province of British Columbia has approached the federal government to try and get an exemption to allow for that. Because it's under the, it's under the criminal code, which is federal. So, sort of, yeah. So we've got, and we do have sadly, overdoses that are in our shelters and in our houses. In your shelters? Yeah. So we've had a little over a hundred opioid deaths here. And we're very concerned about it in Vermont, of course. Yeah. No, it's terrible. Yeah, so we actually just came out with another, with a set of overdose guidelines for our, for the member programs. So we distributed those and then we're going to be doing the webinar with about the overdose guidelines that we put together. And we're going to bring in some frontline folks who are doing harm reduction in this portfolio. And you're doing that for all the membership organizations and their employees? Yeah. So we'll be doing that in March. Yeah. So, and a lot of the training that we used to do was in-person training. We used to go out into community and train, which was really fun, lots of fun. Road trips to rural and remote communities, lots of fun. You learn more than you probably give to them. Those trainings I found at least, right? Learn about the communities, but now it's all shifted to remote and virtual, which is actually, to be quite honest, the silver lining is it's very accessible for folks and everything can be reported. So there's some positives to this strange world that we're finding ourselves in. I've always known you to be honest. I understand. Thank you. Do victims have the option of getting a protection order? And can they go to court and get an order that they can't be abused by this person? Yeah. They have, it's under the Family Law Act here. And it's a civil order, but if it's violated, then it becomes a criminal sanction. Similar to the Vermont order, and they also have things called peace bonds here, which are sort of old fashioned common law remedies to keep the peace that you can get by just going to law enforcement. And law enforcement puts together the application and then brings it to the court and advocates on your behalf. And some communities find peace bonds just as effective as the protection orders and easier to get. Is there an attorney who does this? Is a police through this? Well, the peace bond, it's a police officer. You can apply directly to the court on your own as a pro-sale litigant, or you can go to the local law enforcement and they put it together. And it can apply to all, it can apply to family members, but it can also apply to non-taming members. So it's an interesting practice to be quite honest. Do you think it's a good idea? Well, it's interesting. When I first started doing the legal training here, I was focused on the protection order because that's what I knew from Vermont, right? And all the ways that once you get the protection order, you have to ensure that people know about it and it's served and that it's enforced by law enforcement. And then other front-line folks came to me and said, no, we use peace bonds. We find them more accessible, easier to get. There's more familiarity with them by the courts. So basically when we train, we train both. We say some circumstances, maybe that's the route to go and other circumstances is the route to go. But with all orders, as you well know, Ben, it's all about the enforcement, right? And it's all about the response if there is a violation of the order in terms of if there's an immediate response for it to really mean something. Well, I think that's one of the things that's lost when this is all done virtually. I think if there's a perpetrator stands up in court and you look them in the eye and say, you don't wanna see me again, I think they understand that. And I don't have to go into great detail when I warn them, so. Yeah, yeah. So, yeah, and I would, yeah. So that they're very similar protections as in Vermont, but they're only as good as folks follow them or enforce them, right? Yeah, yeah. Well, I'm running up to the end of only 30 minutes. This has been great. I wanna thank you again. If you get the yen to do this again, let me know. And I'll try to set it up. I would love to do this again. And I'd be happy to also bring in some of my other colleagues doing really interesting work to talk about stuff too, so. No, I hadn't thought of that. That's a great idea. We've got, I've got a tech safety coordinator. It's technology safety. It's about how women can use technology in a safe way and also how a technology has been used to perpetrate violence against women. So, so she's so happy to, happy to introduce you. We might be able to do 30 minutes on that. Easily. Oh, it's great. Amy, regards. It's so good to see you again. Yeah, lovely to see you. I hope that you'll come back to Vermont when the plague is finished. Yeah, I'm looking forward to traveling to Vermont when this is all over. Yeah, it's lovely to see you, Bennett. Thank you so much. Look forward to seeing you in the islands. Yeah, best regards. Thanks. Bye-bye.


end to we are by and large speak with one voice in that regard. I would finally say and since Adam did raise this subject the name of Presby Airport and I welcome your decision to retain it as Glasgow Presby Airport I would however suggest perhaps as a way of I think you described it as a sentimentality of it but in terms of marketing I'd suggest that perhaps a strat line might be gateway to Robert Burns country included in it as it were but it would be known as Glasgow Presby Airport for aviation reasons which I believe are the most important reasons of all that it continues with that name so thank you. On that point firstly I just for my own as an Ayrshire girl I want to stress this I wasn't using sentimentalities any kind of pejorative term I I don't I don't just understand that I can assure a lot of sentiment around this but I think it's right to put that to one side for commercial reasons but you know as I said we are going to be commissioning some work about how we we might theme the airport with a burns theme and I think the potential for ideas like that can have come into play there. Mr Kelly. Thank you convener I've got two points. I think when this was first this issue first arose it was clearly cross-party supporting Parliament for the government moving forward attempting to save the jobs and support the economy I think given the magnitude of the investment that's been outlined here it's perhaps surprising that this isn't taking the form of a statement to Parliament as opposed to an update to the committee. Leaving that aside can I just try and understand where we are in terms of the numbers in terms of the 12 13 financial year is I understand that losses were running at 800 000 pounds a month and liabilities at the end of the year were 16 million pounds can I ask the cabinet secretary if that is still the case? I think can I say first of all I'm perfectly happy to make a statement to Parliament I'm here today because I offered to come back to the committee the committee accepted that you know I'm fully cognisanced of the importance of making statements to Parliament I actually suspect we've probably had a longer and more detailed discussion around this table today than we would have had in a statement to Parliament so you know I don't think it would be fair to say that doing it this way has actually reduced the amount of scrutiny that I've been subjected to on the contrary but I'm more than happy to make a statement to Parliament. In terms of the cross-party support there was cross-party support I hope we can continue that. I've never made any bones at all about how challenging this would be nor have I made any pretence that we can guarantee anything on any particular aspect of the the airport's sort of array of different business activities but I've been very clear that when we were faced with a stark choice of acquiring the airport or watching it close we took the decision that acquiring was the right thing to do and you know I hope we can continue with that support through undoubtedly what will be the ups and downs of this I'm sitting here in good faith I want us to be able to return presswick to profitability so that it can stand in its own two feet without government support and the taxpayer gets a return on the support it has to make in the interim will have ups and downs will have setbacks along the way and I hope will have some progress along the way but I hope we can all you know perhaps just put aside our party political differences and recognise we're trying to do this for what is an objective that I think we all agree with that we want to see presswick survive. In terms of your specific question about the losses I mean we I think Mark actually asked a question along these lines the last time I was at the airport and Sharon was able to give some information which I'll hand over to her in a second about some of the figures you use being associated in part with right off of assets and such like so I think the best way to look at this in terms of the government investment is through the figures I've given today in terms of what the investment will be in this financial year because that is what the taxpayer contribution is in terms of the ongoing operation of the airport but in terms of the the loss these figures and how that's made up can you amplify that Sharon? I think the one point that I would make is that when we took over the airport we didn't inherit the debt so Infratil cleared their intercompany debt when we acquired the airport so we started from a clean slate if you like so so the debt that's building up is basically the loan funding that we are putting into the airport which you've been made aware of the accounts for the financial year 1314 are currently being prepared at the moment so we will be in a better position in a few months time to to make people aware of the the figures coming out in the 1314 accounts and we will need to split that between up to the point of acquisition versus beyond the point of acquisition in November so once they've been audited KPMG auditors we'll we'll be able to issue information and they'll be there for the committee to you know scrutinise and ask questions on as as you see fit. Sorry sorry so are you able to see whether the loss figure is still running at 800,000 a month and are you saying that those liabilities of 16 million pounds have all been completely written off? I would want to see the breakdown of the numbers that you're quoting for the write-off to be able to confirm that but but as I say our position was that all the infaturned intercompany debt was written off on acquisition and I will come back to you on the running figure for the losses since we acquired the airport the losses up to the point of acquisition are from a perspective less relevant because we weren't funding those but the operating support in this financial year is as you know in terms of our projections at this stage for this financial year is as I have set out the you know one million for the money we had previously given and I've updated today that wasn't spent in the last financial year with a further three million pounds for the remains of this financial year that we project is required for the operating support of the airport. I appreciate what you've outlined in terms of monies going forward I'm just trying to understand what the starting position is. Well the starting as Sharon says we didn't inherit any of infertiles debt I mean I think obviously you'll appreciate I'm not trying to kind of be vague around any of this but you'll appreciate that you know asking questions about you know the the losses and I give that will be influenced by you know passenger numbers by you know the amount of bottles of perfume that passengers are buying in the duty free on a monthly you know ongoing basis when we publish the accounts for 2013-14 you will be able to see from the point of acquisition what that financial position has been and that will be the case for this year when those accounts are published but in terms of the position from the taxpayers perspective you know what is important is the information I'm giving today in terms of what the operational support from the taxpayer albeit in the form of loan funding is going to be to keep the airport operational. I understand that but it's still important if the business is going to become an ongoing concern it's important to understand what the level of losses are just now so we know what works have got to be done to recover that position and also what the liabilities are because they have obviously been involved in anything that the public corporations take on. Just to repeat and I agree with all of you I think this is about how we best report and are subject to scrutiny by parliament and you know I think you know as I said this before you know I think it would be good to have a kind of regular cycle with this committee that allows that information to be shared as fully as as possible but in terms of the you know the liability in terms of the debt of the airport all of the government investment at the moment is in the form of loan funding that is you know is debt of the airport we didn't inherit the debt previous to that when we acquired the airport so the debt position is the funding that I have outlined today. Okay just in terms of the funding obviously I've outlined £15 million of funding and an additional £5 million required for the railway though I understand what you're saying in terms of how that is funded and you said that in order to return the enterprise to a cash positive position I was going to take several years so clearly there's going to be further investment required and you spoke about producing a vision in terms of you know given the committee an update when will that be produced and I think it needs to be more specific than just a vision they need to be the main components of the business plan so that we can understand not just this initial investment but what further investment is required and when the plans are in place to ensure that the airport will return to profitability. I've already said that the vision document and I'm describing it as a vision document not to suggest that it won't have you know detailed information in it but you know that will be as fulsome as possible in terms of and I can have answered this to some extent in relation to I think John Scott's one of John Scott's questions you know I've been very full today in terms of the investment that will be required in this financial year there will come a point where you know we need to project and share with the committee future estimates of investment but you have I'm sure you do understand there are a number of variables associated with that with capital investment and you know that is easier to predict because we have a detailed sense of what the backlog maintenance position is that's why I've said that we anticipate this year and next year being the peak years in terms of capital but in terms of the requirement for operating support you know that will depend on the success and the speed of success in implementing the business plan you know I'm making an obvious point here but the more successful the management team are in growing the different strands of the airport's business the less operational support the Scottish government is going to require to put in and you know I can look ahead in this financial year as I've just done and make the projection I'm making you know obviously if anything happens to substantially change that I would expect to come back to the committee but in terms of future financial years that depends to some extent on our assessment at a later stage of the success of the early implementation of the business plan but you know I'm making very clear today I want to be in a position of sharing information with the committee as fully and as timely as I possibly can all I'm asking in return from the committee is to understand the variables that are at play in terms of making some of these projections when will your publication be made available we will aim to publish that as I say there's further work that I've asked to be done around the stage two business plan I've gone into some detail of that when I have that work completed I would hope to be in a position to publish that document within the next couple of months final point mr scott thank you convener i'm just a very small point for clarification he spoke about the 4.75 million pounds required for the for the skywalk and the station itself and he said that that was going to be funded through regulated access charges from the rail company now by that do you mean through network rail or do you mean through first scott rail or will it affect a new franchise holder can you give a little bit more information around that if you're able to what I said is that that is how it would be funded just to be absolutely clear I didn't say there was an agreement to fund it on that basis we need to have discussions I mean you appreciate we're in the midst of a re-franchising of the scott rail franchise so clearly this will have implications that the scott rail pays access charges to access the airports so it's scott rail not network rail and you know there would have to be discussions about an agreement to use those access charges and in case those access charges in order to pay overtime for the capital refurbishment of the station in addition to that as you'll be aware there is a commercial arrangement between scott rail and the airport about discounted fares in relation to flights depending on the stage of development of of different routes that would be a matter for discussion on commercial grounds between whoever is the new franchise holder and Glasgow Presswick in the fullness of time. Can I just finally ask cabinet secretary you know to put all this in context in terms of the investment has a figure being put on the cost to the economy and to the area of not investing not taking over the airport I don't I'm sure I could dig them up I can't remember I gave the sort of economic benefit figures for the airport both in the local economy and in the wider Scottish economy when I made the initial statement to Parliament but there is you know I don't misunderstand me here we're making significant investment in the airport but not just are we making that to deliver a return for the tax payer we're making that investment to avoid the situation where an airport that has lots of jobs dependent on it directly and indirectly that for Gil Paterson is no longer here but some of the reasons he was saying has a significant impact on the local economy and there's no doubt that the impact on the local economy had the airport closed that would have been significant and I think it does merit the action that the government is taking. Thank you very much cabinet secretary and your officials for that evidence and we move into private session as agreed earlier in the meeting.