What a way to close out the month of November with this batch of highlights! The ultimate teaser for the first-ever native mobile Shiny application (and yes, it is real), how you can expand your network on Bluesky from the friendly confines of R, and the potential of the S7 object-oriented paradigm to streamline and validate function parameters. Plus late-breaking news on the integrations of Bluesky and Quarto!
Episode Links
Episode Links
- This week's curator: Tony Elhabr - @[email protected] (Mastodon) & @TonyElHabr (X/Twitter)
- You’ve Been Waiting for Native Mobile Apps with R? The Wait Is Over.
- Expand your Bluesky network with R and the atrrr package
- S7 & Options objects - reimagining readr::read_csv()
- Entire issue available at rweekly.org/2024-W48
- Obtainium: Get Android apps straight from the source https://github.com/ImranR98/Obtainium
- F-Droid: Free and open-source Android app repository https://f-droid.org/en/
- {atttr} Wrapper for the AT protocol behind Bluesky https://jbgruber.github.io/atrrr/
- Bluesky network analyzer https://bsky-follow-finder.theo.io
- Bluesky comments extension (James Blastula) https://quarto.thecoatlessprofessor.com/bluesky-comments/
- Bluesky comments for Quarto (Garrick Aiden-Buie) https://pkg.garrickadenbuie.com/quarto-bluesky-comments/
- Classes and objects (S7 documentation) https://rconsortium.github.io/S7/articles/classes-objects.html
- {roxy.shinylive} A roxygen2 extension for Shinylive https://insightsengineering.github.io/roxy.shinylive/main/
- Introducing WebR to TLG Catalog (Pawel's talk from R/Pharma 2024) https://www.youtube.com/watch?v=vaoDUrUscZA
- Spotify Wrapped: R and ggplot2 Edition https://rpubs.com/colebaril/spotify-wrapped
- Navidrome: Your personal music streaming service https://www.navidrome.org/
- Tailscale https://tailscale.com/
- Use the contact page at https://serve.podhome.fm/custompage/r-weekly-highlights/contact to send us your feedback
- R-Weekly Highlights on the Podcastindex.org - You can send a boost into the show directly in the Podcast Index. First, top-up with Alby, and then head over to the R-Weekly Highlights podcast entry on the index.
- A new way to think about value: https://value4value.info
- Get in touch with us on social media
- Eric Nantz: @[email protected] (Mastodon), @rpodcast.bsky.social (BlueSky) and @theRcast (X/Twitter)
- Mike Thomas: @[email protected] (Mastodon), @mike-thomas.bsky.social (BlueSky), and @mike_ketchbrook (X/Twitter)
- Cammy's London Drizzle - Super Street Fighter II - MkVaff - https://sf2.ocremix.org/
- Voodoo, Roots 'n Grog - Secret of Monkey Island - Diggi Dis feat. Alex Jones - https://ocremix.org/remix/OCR02180
[00:00:03]
Eric Nantz:
Hello, friends. We're back with episode a 187 of the R Weekly Highlights podcast. And this is the weekly podcast where we talk about the latest highlights that have been shared every single week at ourweekly.org. My name is Eric Nantz. And, yes, November is well, it's our last episode for November. I can't believe the time is flying by quick. For those of you who may be celebrating a an holiday coming up soon, certainly happy safe travels wherever you end up going for that. But, nonetheless, we're gonna celebrate some awesome highlights to talk about today, and I never do this alone because I'm my trusted co host at the hip here, Mike Thomas. Mike, how are you doing this morning?
[00:00:45] Mike Thomas:
Doing well. Eric started out with some technical issues. If, I sound a little bit different this week, I apologize. But, hopefully, the audio isn't too noticeable in terms of differences, between previous weeks, for the listeners out there.
[00:00:57] Eric Nantz:
We we make it work. But, yeah. We both had our frantic either rebooting or jiggling of settings, but it it happens, folks. It happens. But, nonetheless, Mike is here, and that means we can get this show on the road here. And this week, our issue is curated by Tony Elharbar. And, well, it's a bit of a sad news. This will be Tony's last curation for our weekly. He is moving on to other endeavors after this. And, certainly, as I've told you, every time we close the show, this is a community driven effort, and we certainly greatly appreciate Tony's time. He's been a valued member of our curator team. We're gonna miss him, but, certainly, he'll be, I'm sure, keeping an eye on our weekly from time to time. But, Tony, best wishes to you in your, future efforts in open source and elsewhere. Nonetheless, he's gone if you're gonna go out, you're gonna go out with a bang. Right? And this issue has a lot that we can discuss. So let's not belate the point any longer. Let's get right to it. If you haven't heard by now, both myself and Mike are really excited about the concepts of web assembly with Shiny, and it's opening doors for immense possibilities.
Some of which I have touched on in my positconf talk this year in the realm of life sciences. But there are many other ways that WebAssembly can supercharge the experience of distributing R itself in a self contained way powered, again, by WebAssembly. I admit this one came somewhat out of left field, although I should have seen the hints coming a little bit because what we're talking about now is Colin Faye, who, again, is a fellow curator of our weekend and also the architect of the golem package. And as we covered in the summer of our weekly highlights, has been taking a little bit of an adventure with bringing web assembly into shiny, and even building some custom tools himself called Spider and whatnot to really start pushing the envelope a little bit.
Well, this latest blog post from the ThinkR blog is talking about a native mobile application running R and powered by WebAssembly. Yes, folks. The future is here. So in the in the post Colin introduces us by saying that this has been an effort that he has been looking at for a bit of time now, and he is, like me, convinced that WebR, this is a game changer that's gonna make the ability to leverage R even more accessible in modern web platforms and whatnot. Now notice I said web platforms. Right? Well, here's the kicker, is that with the self contained aspect of web assembly, yes, you can fold this into a native mobile application.
Now we don't have it revealed what this application is actually called, but he talks about a little bit of what's under the hood here, is that this is bundling a set of packages, but it is installed in the native mobile app fashion. This is not what we call a progressive web app, which you might be thinking we talked about packages like Shiny mobile before, which David Grange has been leading for at least a couple years now, and that is a really solid platform to build, again, what's called a progressive web app, an app that looks like a native app, but it's actually more of a web app just, you know, in the UI it looks like it fits right into the rest of your mobile applications, that's still reliant on some kind of web connection to make sure things are working.
And, also, it doesn't it isn't able to tap into some of the native mobile platform APIs such as for your phone. Maybe you need wanna trigger a vibration for a notification. Maybe you wanna tap into some other, you know, hardware related things. A progressive web apps not gonna be able to do that. And, again, no no shame to that. It's just the way the technology works. What Colin is showing here is that with this being installed in a native fashion, this opens the doors to tap into some of those native APIs. So let's get into what this app actually is or it's a in essence, a game of sorts where, say, from the UX perspective, you're gonna be presented a name of a function and you have to guess which package it comes from. So it's kinda like a quiz app, you might say.
How does this actually work? Well, apparently, under the hood, this application is looking at the packages that are currently installed in this installation. It's gonna sample 3 of them at random and then from each of them pick a random function from them. And then you as the end user are prompted to choose in a multiple choice fashion which package that function comes from. You can, you know, submit your answer, and then it's gonna use the praise package under the hood to send you a message if you get it right. And then even if you get it wrong, it'll let you kind of have a, you know, not so negative message and then try again. Where are the responses being stored? Well, again, because this is a native application, in this case, he is leveraging SQLite, a local database, which I've used for years years in some of my applications where that's being stored. Your responses are being stored in real time from this app. But, again, locally, not going to some server. It's all locally done. And you can imagine that this, you know, this might get a little boring after all. Though, I will admit I did get early access to this, and it is fun. And the one thing I will mention too is that if Colin had not told me that this was a web assembly powered application that had r under the hood, I would never have guessed that this was using r inside. It felt that responsive, folks. That is what I am cannot imagine my excitement when I've got this email. And, first, again, I didn't see this coming out of the at all.
I install it, and I'm literally looking at it right in front of me right now. I wish I could show it, but I've been until this is released, I've been sworn to secrecy. But I'm I'm playing with it literally right now responding to the app, and it there's no lag. It is native. It is truly native. Imagine what this can bring to us in the community. So if you want to have access to this or stay updated when this is released. He does have a contact page at the bottom of the post, so I would suggest if you're listening to this and you're interested, definitely sign up for it. I would be hammering this as soon as I could if I was in the audience listening to this because this is this is revolutionary folks. This is absolutely revolutionary.
I have so many ideas where this could go. And as you can imagine, I mean, it's something you're hearing right now. I have, gently asked Colin for an open invitation to join me on a future shiny developer series episode because I have so many questions for him, and there's no way that I could get it done in just an email. I want him to speak from the source. So look out for that in the near future once this is out there. But, Yeah. Mike, mobile apps on your phone powered by WebAssembly.
[00:08:38] Mike Thomas:
What timeline are we living in here? I don't know, Eric. And, you know, some of us aren't as as privileged to get the, early access. So I'm dealing with pixelated screenshots in this blog, folks, the edge of my seat trying to figure out when this is actually going to come out. I don't think there's a specific timeline here that, Colin mentions, which is which is smart on his end, as to when we will actually be able to get our hands on this, like the general public. This is this is crazy and probably a bad thing for me for all of those times that a client has asked, when we've developed a Shiny app for them. Like, hey. Could this be a mobile app too? And I'm like, nope. You know, this is these are just, you know, desktop web based applications. You know, you could go to your your Internet browser on your phone if you wanted to and use them, and and we can leverage Shiny mobile on that, for you. But it it can't be a true app. Well, now my answer has to be, well, technically, yes.
And that's just gonna open up just gigantic can of worms. Once we sort of figure out what's possible here, what the limitations are, but this is a serious, serious boundary that has been broken through. And to me, yeah, it it it's gonna going to open this world of possibilities for us. And I imagine that, you know, similar to the the WebR project that powers this, it just continues to, you know, branch out in terms of what is now capable that wasn't previously possible, for, you know, R and Shiny development. It's it's pretty incredible. I'm excited to see where this leads. What a tease. I mean, I don't think I've ever seen an rweekly highlights blog post that teases this hard.
So I guess hats off to Colin for for that. He has me on the edge of my seat waiting to hear
[00:10:42] Eric Nantz:
what's next and when I can finally get my hands on this. I I am eagerly awaiting the the mass release of it too. I will speak somewhat unofficially. It sounds like the release is imminent. So my hope is, as an early holiday present, that this will be out there. Let's put it that way. It's sounding all indications of that. You did mention WebR earlier. And one of the things that was very fascinating to me about when WebR was first released, with George Stagg's, you know, immense efforts at posit is that he was able to give us a web page that literally had, like, an r REPL inside. Right? I mean, you can just type in our code, install packages from the WebR repository, and then play with it at your leisure.
You have seen these questions earlier, Mike, throughout the community many years about, hey. I really like the experience of our studio. Isn't there any way to run it on mobile? Just imagine a little r REPL from WebR as a mobile type app in a tablet UI. I don't know. And that's maybe completely out left field, but it's based on the same technology. Right? I mean, that WebR repl, I believe, is literally just a self contained app, if you will, waiting to happen. I don't know. That's not what Colin's trying to tackle here. I'm just saying that it's there are a lot of other possibilities at play here and then getting back to the architecture of this, for example.
He's using SQLite for this, but my goodness, you could swap in DuckDV with this. You could swap in all these different parts that we've been so excited about that are now at your fingertips here. It's been one of my stretch goals to really push my dev skills to the max, so to speak, and create somehow powered by R, a R weekly podcast app where you would just simply listen to episodes of R weekly taking advantage of some of the stuff I've been learning about in the podcasting 2.0 development space with a DuckDb database on the back end? Maybe. Maybe. So as you can tell, I have a lot of questions, a lot of ideas, and I am just as excited as everyone else, I think, when this finally gets released and, you know, the other possibility here, and I'll speak specifically on the Android side of things, is that you're not just confined to installing apps from the Play Store. Of course, that's what Google is always gonna push as, like, the secure, quote unquote, repository. But there is a multitude of open source applications that are distributed on services like F droid and others where imagine and even other services where it's like an app store, but it's based on the GitHub releases of a project. So that, say, I have an app or or whatever you wanna call it, and I push a tag like version 1.2 or whatever, this other app store that I've learned about recently, I'll have to put a link to it in the show notes, will simply query for that GitHub repo directly and then install it directly on your phone. So imagine that as a distribution method. Right?
There are many many possibilities on to get these into the hands of your users. Obviously, iOS is a much different story, and I've heard a lot of candid, candid opinions about Apple's policies on this. But, nonetheless, my point being is that this isn't even just about the architecture now. You can get this into the hands of users really quickly depending on the OS they're they're running. So I don't know where to even go from here other than I'll keep playing with the app and test my art skill knowledge on this, but nonetheless,
[00:14:18] Mike Thomas:
I think I think we're gonna be watching this space, quite closely here. I couldn't agree more, Eric. Yeah. The the possibilities are endless. You have me feeling now, like, I should be on Android instead of iOS to take advantage of, you know, the app store possibilities there. It just sounds more open source friendly. So we'll see. Maybe at my next update, I might have to make a jump.
[00:14:53] Eric Nantz:
Well, there is a lot of excitement in the air in terms of the data science communities and other, scientific communities jumping onto the blue sky platform, which as you heard in recent episodes, both Mike and myself, we now have accounts on that very platform, and I've been eager to connect with the rest of the community, old friends, new friends alike. And you may be wondering as you're getting started with this as I was, you sometimes as you join these new platforms, you're trying to think, okay. Well, what's next after I sign up? Now credit to a capability that I've seen, you know, pushed heavily in the community is that Blue Sky offers or at least community members in Blue Sky can create what are called these starter packs, which are kind of a neat way for a, say, given topic like data science or, you know, other types of science or technology or whatnot, you can access this pack when you join and then by, you know, somewhat automatically get a list of the people included in that pack, and then you can choose to follow them or not. And that's great for an onboarding, but you may be wondering just how deep is the network out there for those people that you see immediately and maybe who are they following and and so on and so on. You know, typical social network type branches here.
Well, imagine a way that you can expand or at least potentially expand your network directly of our itself. Well, that's where our next post comes in from, Stephen Turner who's been featured on the highlights recently as well. He is very excited about the blue sky initiative, and he has another post where he talks about, you know, for those in the science fields that this is a a terrific option for them. And, yes, he has, you know, in his previous post looked at starter packs, but like I said, he was wondering about, you know, other ways to fill his network, you know, and really start to to grow that a bit. And he discovered this new, web based app out there called Blue Sky Network Analyzer, which is a, again, very simple web form where you can kind of enter the handles of of your account, and then you can kinda see this kind of relationship of the people you are following and then the people they are following and etcetera.
Well, he was wondering if he could do that from r itself, and it turns out you can because there is an r package called atrrattrradder. I don't know how to say it. I'm gonna give it a shot. This has been authored by Johannes Gruber, and this is wrapping what's called the AT or authentication transfer protocol that is the meat of Blue Sky. And that's kind of analogous to on the Mastodon side of things. It's wrapping a protocol called activity pub, but they're different, but yet I think they're functioning in a bit similar way. But this protocol is open source, so you can build capabilities or applications on top of it and sure enough you can, of course, build an r package in front of it too.
So Steven's post talks about how he uses this package to first authenticate to the service. And one bit of warning is that this is gonna leverage a Blue Sky API, and like any API, there could be rate limiting depending on how extensive you you, you leverage this. But getting into the example here, he authenticates to the Blue Sky service and there is a helper function called auth in the package that will guide you for creating what's called an application password for the first time, or if you have an existing one you can just use that as well. There's a simple function called get underscore follows that will simply grab the immediate of your immediate follows, you know, their handles and whatnot, And then you can kind of take that that list that you get initially and then through a looping function like lapply or whatnot, you can now get their follows. So as you can see, you could go many levels of this and that's where, like I said, you got to watch yourself with the rate limiting factor at play there, but then he shows first in a simple terminal based output after a little bit of filtering all the handles, their actual names, and the URLs to their profiles.
And, yes, you could also make that really fancy by feeding that into GT as well, one of my favorite packages for creating tables in R where you get this nice, he wasn't able to put it verbatim in the post, but you get a nice hyperlink with their handle and their name in that table and how many followers they have, and then you can simply choose at that point as you expand that network in a data driven approach. So, again, you could run this in many different levels, but, again, he cautions that, there could be some rate limiting depending on how often you use this, and he did try this when he kinda got when he tried to run over 5,000 accounts based on kind of this, you know, this triage or this depth of network.
This is where if if I was gonna build something like this, I might tap into the polite package, which we talked about many episodes ago, which would kind of handle that in essence sleeping between requests or pausing between requests in a somewhat randomized fashion, which might help with a service like this. So, again, that's like little, exercise for the audience if you want to try that yourself with with Steven's code here. But, nonetheless, I am excited to see the tooling around Blue Sky start to really take shape, such as what what Stevens, is exercised here in this post and that that aforementioned AT RRR package.
I've also seen Bob Rudis start to look at some of the tooling base and go or whatnot around Blue Sky as well. So there seems to be a lot of excitement around this, and I am all for making any tool like this to make the onboarding to new social platforms like this easier for those in a community no matter what your previous experience is in in these platforms as well. So really innovative approach and it just goes to show you ARC can do just about anything. Right, Mike?
[00:21:20] Mike Thomas:
Yeah. It is pretty incredible. It's a nice little, tool in terms of the script that we have that Steven's put together for us. And and as you said, if you have, you know, just maybe a 100 or a couple 100 followers, you shouldn't have any issues with the API. There is also in in the footnote of this blog post, or at the bottom of this blog post, there is a link to a web application called the Blue Sky Network Analyzer, which I played around with a little bit, which is pretty cool. I don't think it's it's using r, but, it seems like you're not going to get rate limited or throttled as much if you try to use that, web application instead. But a great, you know, blog post here in terms of the code that anybody could run. Just replace your username and your password, or use the auth function from the ATRRR package to be able to interactively, authenticate to your Blue Sky account, which is pretty cool that we have both options there. And a nice little GT table here, showing all of the, I guess, the top 20 accounts, that Steven's followers follow, if I got that correct, which, he does not also follow.
Really, you know, neat blog post here. Really nicely done. I am all in on Blue Sky. Excited about it. A lot of it does feel like old school data science Twitter community. So, yeah, excellent work.
[00:22:52] Eric Nantz:
And, late breaking here as I was prepping the recording here, I saw got wind of, you know, another possible feature that Blue Sky could have, which I've seen also push for mastodon type situations as well, is, let's say, you have a blog post somewhere and instead of relying on proprietary service for your comment system, imagine you, like, have a post on Blue Sky with, say, a link to your blog, but then your blog post is able to embed replies to that post as if they were comments on your on your blog directly. Late breaking here, but there is not one but 2 extensions in quartile now. One by James Blasto and one by Garrigay and Buoy at the time of this recording that are gonna give you short codes in quartile to embed this into your quartile webpage. So and it works. I tried James, widget or his post where it said, hey. Reply directly on Blue Sky.
Refresh the page, and your comment will appear on the page itself. And, yes, it works as advertised. I was comment number 1, so I got that I got that flag standing on that one. But that that my point is is that, like I said, the tooling around this seems to be expanding by the minute here, and I admit I am late to the Blue Sky party. I know there a few others that have been on this train for a bit already. So I've got some catching up to do, Mike, but I'm excited to see where this takes us.
[00:24:26] Mike Thomas:
Lots of exciting things coming out of quarto this week. I am literally looking at my Blue Sky timeline, and you're exactly right. The top, one of the top posts that I'm seeing is from Garrick explaining, this quarto extension. Looks like it's really easy to just, add this this little one liner. This includes sort of chunk in your quarto blog. It's blueskydashcomments with the post link, and then replies to your post become comments. That's pretty incredible. For those of us doing more antiquated things, there is also in the quarto 1.6, a nice new landscape tag that allows you, for your PDFs to, have a particular page that is in landscape, which I had to do some pretty crazy knitter things, previously to get working. So I'm very thankful to all of the work in the quarto community lately.
[00:25:21] Eric Nantz:
Yes. And, boy, that extension system just does wonders, doesn't it? It is exciting to be able to tap into this, as you need. That that's really exciting times. And last but certainly not least in our episode today, we're gonna revisit, the object oriented framework that we mentioned in a couple episodes ago just had some really nice quality of life updates, and that is the s seven package, which for if you didn't listen to that episode, this is the new, object oriented paradigm that has ambitions to be pushed as a new, you know, might say reimagination of the concepts of s3 and s4 class systems to be eventually, included into base r itself.
And I men remember mentioning at the end of our explanation on that, it will be interesting to see just where s 7 starts to take shape and some of the best use cases for that. Well, we got a pretty fascinating look on how it might help the user experience of even existing functions if they are reimagined with the s seven approach. And this post comes us from Josiah Perry, who's also been featured on the highlights numerous times. He has had a lot of interesting adventures recently with the Rust programming language and that's integration with R, but he takes a little diversion on that and talks about, you know, where s 7 might help in certain situations and to set the stage here in his post, he talks about some of the excellent, functions from the read r package, which is part of the tidyverse that lets you import data files in text format no matter if there's CSV, delimited, or even other types of syntax.
And it has a lot of arguments because it is doing a lot under the hood and has to account for a lot of different issues with these files. And in particular, Josiah starts by talking about the cow_names argument. And as you read that, as a user and may not be familiar with that argument, you may think logically, well, cownames, maybe that's a switch. Maybe that's an indicator of if the file already has a present or not. And, yes, you can set that to true, meaning that the first row indeed has a column names. Or you could set it to false, meaning that there is potentially no header there, and you're going to have to do that yourself.
Well, speaking of doing that yourself, column names not just takes a true or false, it can take a vector of character strings to use as the names of the of the columns that you're importing from that file. Let that sink in a little bit, an argument and take either a logical or a character string. Now that can be elegant in many situations or it can be a little confusing on how to wrap your head around that which I've been on both sides of that fence especially when I was new to like the base r read dot CSV and and, and the read r package years afterwards. So he talks about a couple different scenarios where he might use each version of this one of which is you it has headers, but you want to give it different headers, So you could do that. He uses, like, an exported version of the iris set just for illustration.
You could easily do that. You could also say, well, as if it didn't have the names already, but I want to add the names myself in the function call. But I don't want it to be the names of the file already there, so I want to skip the import by, by one line. So then you're kind of putting that in yourself. And, again, there could be a situation where there's no headers at all. You just either say you don't want the headers and you want to put them in after the fact or you, supply the column names yourself. The if you get the hang of it, yeah, maybe you can, you know, use that, you know, at the paradigm in the future.
But he wonders if there may be a way to make that a little bit less complicated because under the hood, in his opinion, call names kind of has 2 things going at the same time. 1, is a header present or not? 2, do you want to add your own or not? And so that leads us to one of the interesting aspects of s 7 that you could potentially play with here with this reimagination of a radar importing function is that this radar function, these set of functions have over 20 arguments that you can specify. Some of these are common. Some of these are very niche because they're really dependent on your use case.
What if there was a way instead of having the you to have these 1 by 1, you know, specified in the in the function arguments that you have, like, an options type argument with more detailed settings. Again, maybe more for the niche ones that have same defaults from the start just like the function does currently, but a little more streamlined way to feed those in. So he looks at, say, read underscore CSV, and there are quite a few, like 14 to be exact, of these arguments that he thinks should be belonging in this options paradigm instead of in the function call itself.
And so, finally, we get to in the post how you can use s 7 to do in essence argument validation, not too dissimilar to what I've done with packages like assert that or checkmate in my functions to determine if a parameter is indeed a string or a logical or, a value that fits, like, the boundaries I'm expecting it to have. You can do the same thing of s 7 and have these properties, you know, listed where you start a new class, but then you put in kind of the default value for it or a default function call in some cases, and then what you're gonna do to validate that input. So one example is the locale argument, which can have from read r directly the default locale of the system itself, or you can have a validator to look at is this coming in as a proper string and, in particular, sometimes the time involved with that, and you can, you know, validate that with something like our lang checks, like is character or is scaler and whatnot.
And then if it's invalid, you can show a friendly error message afterwards. You can go down the the rabbit hole of this for all the rest of the arguments as well, such as repairing names, missing values, quotes, comments, and you can see many of them will follow a similar format. And then towards the end, you can now have this new class. He's calling it radar ops, and then the properties are each of these kind of property functions that he defined earlier in the post. And then lo and behold, he's now got an example at the end where it's got the 4 or 5 arguments that are most common for read CSV, such as the file name, the column names, the column types, which ones you want to select, and then there's an options argument where then you just feed in this initialization of that class.
But you could put inside that initialization of that class the other options that in there that you want to customize yourself. You don't have to, but you can. So in his opinion, this can help, you know, minimize that cognitive load, so to speak, as well as consolidating those options that are less frequently used in an approach that he says he's gleaned from his experiences with Rust, similar paradigms in the language and how that handles function arguments from both kind of a frequently used standpoint and those that maybe not so frequently used. So fascinating thoughts here, and I like I said, I've been wondering where the best position s 7. So this gave me quite a bit to think about in in my next generation of packages and combining the object oriented approach with these assertions at the same time and try to make the user experience
[00:34:02] Mike Thomas:
a bit more streamlined to boot. Yeah. Eric, this is a really nice applied approach to demonstrating what s 7 can do for us. I I know Josiah has a lot of strong opinions. And this one, I am going to agree with him on because when he talks about how it just feels a little weird that a particular argument could take a Boolean or a character string, it does. You know, I've been there before. It's it's very convenient, I think, to the folks who maybe are earlier on in there. There are journey that that might not necessarily notice. But I think in terms of, you know, thinking about package developers and making sure that what you are developing for others is is really strong and stable. I think that can lead to a lot of, I don't know, potential things, being a little less stable, a little less robust if you have arguments that are taking, you know, different types of of class objects, if you will. But, anyways, so I thought that this was a great use case for demonstrating s 7 and and taking sort of an opinionated approach to how we could potentially alter the the reader package, in this way. It seems like, you know, the the workhorse functions from s 7, seem to be new property, which is to create validators, if I have that correct.
Exactly. Yep. I'm up to date in my object oriented programming and then a new class here at the end where it seems like we call all of these validators for the different properties that we're going to list in this new class. And, obviously, that new class function from s 7 is going to create a class object, a really nice walk through about how you can, you know, take a look at that class object just by sort of printing it. And then you can also use the at accessor, the the at symbol, to be able to pull out and view a particular property in that class object, which is really neat. I mean, it feels kinda like working with lists. It shouldn't be super scary. Right? The syntax is gonna be a little bit different with, you know, a lot of objects that you're creating via the the new property function for these validators tend to start with a a period, you know, so that might be a little bit new for folks. But it's nice that you can sort of define these these validator tests, if you will, in the in the same place that you're writing a lot of these these logic. So, I'm definitely a fan. I really appreciate this applied walk through. It it helped me wrap my hands around, the benefits of s 7 and and what the syntax looks like and how to use it, compared to, you know, what I've seen in some of the other object oriented programming packages and and, base packages out there as well.
[00:36:57] Eric Nantz:
Yeah. And I'll put a link in in the show notes to from the s seven packages site. 1 of the vignettes is talking about the classes and object structure, and it does have some, you know, very much utilitarian type examples here, but they do talk about validation as well. But I think that's a great thing to put side by side as you read Josiah's post, you know, after this as you wanna think about actually implementing this into, say, a function you're creating in a custom way. And, yes, they also have articles about putting this into a package itself, which I'm sure is going to be the next stage of this, especially when we get to that. Hopefully, not too distant future where s 7 literally becomes part of the base language itself. We're not there yet, but that's our goal and I think they are well on their way to achieving that.
[00:37:44] Mike Thomas:
Yes. Yes. We'll see.
[00:37:46] Eric Nantz:
We shall see. And there is speaking of seem oh, there's a lot more to see in this issue as I said. Tony went out of a bang here. There's a lot of additional great content here. We'll take a minute or 2 for our additional finds here and, hey, I I can't stop being on the web assembly side of train with this one folks, because there is a new package that has just hit CRAN called roxy.shinylive. You can probably tell by the name this has got a couple key concepts here that we want to talk about here. This is authored by Pawel Ruchi who is, for those in the life sciences space, he is one of the chief developers of the teal framework for Shiny applications in a modular fashion that is is very very promising in the realm of using, Shiny with life sciences. But nonetheless, he has been one of the early adopters of WebAssembly like myself. And one thing that he was really hoping to have ever since, you know, all this came about last year. A vision that, Micah, you shared with me on this is that imagine you have documentation for either a shiny app or a function that maybe is part of a shiny app. And if you go to that help page for that package, say on a package down site, you can run an example of that right on the spot.
Roxy Shiny live is making that happen. How does this actually work? I don't have enough to do with justice here, but at a high level you can put in, once you install this package, a way to create a URL for a self contained version of this example that you put in your r oxygen block hosted on shinylive. Io, the free service that posit offers for hosting Shiny applications built with Shiny Live for both the Python side and the R side. Remember when this all first came out, it was just on the Python side for quite a bit. Now the r side gets, cake and eat it too, so to speak. So I'll have a link to the package downside for the package itself in the notes, but you can see a little simple example where he writes it for a hello world string an embeddable URL that you can use in the package documentation that will embed almost like an iframe that shiny live app on the same package help page on the web version of it in both like the manual page you can also do this for vignettes as well you just have to make sure your description has in suggest roxy.shinylive.
There is a specific, r oxygen declarative you have to put in your description file to make sure it's using roxyshinylive when it's compiling the help pages, but he shows an example in the package down site where he's embedded basically one of the functions called cross table, which I believe comes from the TOEcosystem or whatnot, where it's got the embedded a shiny app literally right in the page saying tried and shiny live. Oh my goodness. This is this is game changing in and of itself with documentation. So this is this is pretty new. He's only been working on this, I think, for maybe part of the year. It's been on GitHub for a little bit, but as of now, it is now on CRAN. So, I definitely encourage all of you to try that out if you're interested in in leveraging or supercharging your documentation with Shiny Live involved.
And congratulations, Apollo, on this one dot o release. This is this is awesome.
[00:41:31] Mike Thomas:
This is oh my goodness. We're being blown away this week, Eric. This is absolutely incredible. I'm super excited to check this project out. I think that would be game changing to be able to run examples, literally, you know, in some sort of a, you know, interactive session from your package down site, I think that would be incredible in terms of reproducibility and and ensuring that other folks understand exactly what's going on with your package. You get to play around with it before they install it themselves. Right? Wow. I'm very excited to check that project out. Another one that I I thought was pretty cool as we get towards the end of the year here, hard to believe, but Cole Barrell did a fantastic blog post visualizing his Spotify Wrapped.
So all of the music that he listened to, with some fantastic visuals. And I I really love the theme, that Cole used throughout this blog post. Imagine that we have ggplot under the hood here, and it's it's just a really fun little blog post to take a look at, the his listening history for what looks like, I think, the last 10 years of his listening habits. He was able to get data from 2014 to 2024. So very, very cool, nice little ggplot visual blog post, if you're interested in that type of thing.
[00:42:56] Eric Nantz:
Oh, this is this is slick. I I really like to see this thing. And I've also been on a you know, throughout the year, Mike's heard about this in our pre shows. I've been really spinning up some what I call self hosting services on my beefy news server that I have in the basement a few feet behind me here. And one of them is like a music streaming service with music I've already downloaded for for creative commons or whatnot. This oc remix, the service that I use for those little bumper musics you hear in this episode. I have almost all of their tracks on myself host a server here, and there's a service called Navidrome I'm using that gives me that Spotify like experience internally and wrap up a tail scale. I can listen to that anywhere I am on my secure devices, but they have an API too. So I might have to do some listening habits on my own on which games just happen to be most frequently used in the music that I'm listening to if I need a little, pick me up, so to speak. So this gives me inspiration based on, what Cole's doing with Spotify. So yeah.
I always have the tunes going when I do my hardcore shiny dev work and package dev work, and boy did I need it with a gnarly issue earlier last week. I somehow got through it, but it also it was a journey, Mike, as you know, that the bugging never stops sometimes.
[00:44:14] Mike Thomas:
Oh, I know.
[00:44:16] Eric Nantz:
We knew that pick me up sometimes. And, sorry, I hope that our weekly itself is your pick me up for the awesome content. Like I said, we, we are blown away by what we see, and this week is definitely an illustration of that. So congrats to everybody in the community, our our curator as well or Tony for curating all this, but also, yeah, Colin, Steven, and Josiah. Excellent posts. We are really excited to see where the future is for these efforts. And the future keeps going with our weekly, but it is a community project. And as we said, we rely on your support. Obviously, I would hope that over the news I shared earlier that, we are looking for curators to join the team, so we'd love for you to get involved. All the details are on our GitHub repository, but you can find all this at rweekly.org.
You can also send us what story we should that should be featured in next week's issue. We're just a pull request away, all marked down all the time. We love hearing from you, and those pull requests are an immense help to our curators for each week. And we love hearing from you in the audience as well. We got a little contact page embedded in the podcast episode show notes here on your podcast player. We also have that fun little boost functionality, another great way to get in touch with us directly. You have a modern podcast app. I personally like fountain and Podverse and cast o matic. There are many others as well at new podcastapps.com if you're interested in that ecosystem.
And, also, we are on the social medias. Yes. I am on blue sky now with at our podcast at bsky.social. Also, I'm Mastodon. I'm so keeping that on. I'm very passionate about that with that our podcast at podcast index dot social, and I'm on LinkedIn. Search my name, and you'll find me there. Mike, where can they find you? Yep. You can find me on blue sky at [email protected]
[00:46:16] Mike Thomas:
[email protected], as well as LinkedIn. If you search Ketchbrooke Analytics, ketchbrooke,
[00:46:25] Eric Nantz:
you can see what I'm up to. Yep. And I do want a quick little, plug here before I head out here. I was one of the organizers and, backstage y people for the our pharma conference. We just released our recordings for the conference event, and there is a lot of awesome content. No matter if you're in life sciences or not, There's a bit of some for everybody, including a talk from Pablo who we just talked about with that, Roxy Shiny Live package. He gave her great talk about how you how he levers WebAssembly for what's called a TLG catalog. I'll have that linked in the show notes too, but it shows the the thoughts that he's had and, and the amazing techniques he's been using throughout the year on that. So if you like your web assembly, there's there's a lot going on in this space.
But we're gonna close-up shop here. Like I said, for those of you out there that may be celebrating a big holiday this week, we hope you have safe travels and and, good times to be had. I'll be hitting the road tomorrow, hopefully, for a successful road trip back to my stomping grounds in Michigan. But wherever your, travels take you, hope you have a great time. And we should be back for another episode of our weekly highlights next week.
Hello, friends. We're back with episode a 187 of the R Weekly Highlights podcast. And this is the weekly podcast where we talk about the latest highlights that have been shared every single week at ourweekly.org. My name is Eric Nantz. And, yes, November is well, it's our last episode for November. I can't believe the time is flying by quick. For those of you who may be celebrating a an holiday coming up soon, certainly happy safe travels wherever you end up going for that. But, nonetheless, we're gonna celebrate some awesome highlights to talk about today, and I never do this alone because I'm my trusted co host at the hip here, Mike Thomas. Mike, how are you doing this morning?
[00:00:45] Mike Thomas:
Doing well. Eric started out with some technical issues. If, I sound a little bit different this week, I apologize. But, hopefully, the audio isn't too noticeable in terms of differences, between previous weeks, for the listeners out there.
[00:00:57] Eric Nantz:
We we make it work. But, yeah. We both had our frantic either rebooting or jiggling of settings, but it it happens, folks. It happens. But, nonetheless, Mike is here, and that means we can get this show on the road here. And this week, our issue is curated by Tony Elharbar. And, well, it's a bit of a sad news. This will be Tony's last curation for our weekly. He is moving on to other endeavors after this. And, certainly, as I've told you, every time we close the show, this is a community driven effort, and we certainly greatly appreciate Tony's time. He's been a valued member of our curator team. We're gonna miss him, but, certainly, he'll be, I'm sure, keeping an eye on our weekly from time to time. But, Tony, best wishes to you in your, future efforts in open source and elsewhere. Nonetheless, he's gone if you're gonna go out, you're gonna go out with a bang. Right? And this issue has a lot that we can discuss. So let's not belate the point any longer. Let's get right to it. If you haven't heard by now, both myself and Mike are really excited about the concepts of web assembly with Shiny, and it's opening doors for immense possibilities.
Some of which I have touched on in my positconf talk this year in the realm of life sciences. But there are many other ways that WebAssembly can supercharge the experience of distributing R itself in a self contained way powered, again, by WebAssembly. I admit this one came somewhat out of left field, although I should have seen the hints coming a little bit because what we're talking about now is Colin Faye, who, again, is a fellow curator of our weekend and also the architect of the golem package. And as we covered in the summer of our weekly highlights, has been taking a little bit of an adventure with bringing web assembly into shiny, and even building some custom tools himself called Spider and whatnot to really start pushing the envelope a little bit.
Well, this latest blog post from the ThinkR blog is talking about a native mobile application running R and powered by WebAssembly. Yes, folks. The future is here. So in the in the post Colin introduces us by saying that this has been an effort that he has been looking at for a bit of time now, and he is, like me, convinced that WebR, this is a game changer that's gonna make the ability to leverage R even more accessible in modern web platforms and whatnot. Now notice I said web platforms. Right? Well, here's the kicker, is that with the self contained aspect of web assembly, yes, you can fold this into a native mobile application.
Now we don't have it revealed what this application is actually called, but he talks about a little bit of what's under the hood here, is that this is bundling a set of packages, but it is installed in the native mobile app fashion. This is not what we call a progressive web app, which you might be thinking we talked about packages like Shiny mobile before, which David Grange has been leading for at least a couple years now, and that is a really solid platform to build, again, what's called a progressive web app, an app that looks like a native app, but it's actually more of a web app just, you know, in the UI it looks like it fits right into the rest of your mobile applications, that's still reliant on some kind of web connection to make sure things are working.
And, also, it doesn't it isn't able to tap into some of the native mobile platform APIs such as for your phone. Maybe you need wanna trigger a vibration for a notification. Maybe you wanna tap into some other, you know, hardware related things. A progressive web apps not gonna be able to do that. And, again, no no shame to that. It's just the way the technology works. What Colin is showing here is that with this being installed in a native fashion, this opens the doors to tap into some of those native APIs. So let's get into what this app actually is or it's a in essence, a game of sorts where, say, from the UX perspective, you're gonna be presented a name of a function and you have to guess which package it comes from. So it's kinda like a quiz app, you might say.
How does this actually work? Well, apparently, under the hood, this application is looking at the packages that are currently installed in this installation. It's gonna sample 3 of them at random and then from each of them pick a random function from them. And then you as the end user are prompted to choose in a multiple choice fashion which package that function comes from. You can, you know, submit your answer, and then it's gonna use the praise package under the hood to send you a message if you get it right. And then even if you get it wrong, it'll let you kind of have a, you know, not so negative message and then try again. Where are the responses being stored? Well, again, because this is a native application, in this case, he is leveraging SQLite, a local database, which I've used for years years in some of my applications where that's being stored. Your responses are being stored in real time from this app. But, again, locally, not going to some server. It's all locally done. And you can imagine that this, you know, this might get a little boring after all. Though, I will admit I did get early access to this, and it is fun. And the one thing I will mention too is that if Colin had not told me that this was a web assembly powered application that had r under the hood, I would never have guessed that this was using r inside. It felt that responsive, folks. That is what I am cannot imagine my excitement when I've got this email. And, first, again, I didn't see this coming out of the at all.
I install it, and I'm literally looking at it right in front of me right now. I wish I could show it, but I've been until this is released, I've been sworn to secrecy. But I'm I'm playing with it literally right now responding to the app, and it there's no lag. It is native. It is truly native. Imagine what this can bring to us in the community. So if you want to have access to this or stay updated when this is released. He does have a contact page at the bottom of the post, so I would suggest if you're listening to this and you're interested, definitely sign up for it. I would be hammering this as soon as I could if I was in the audience listening to this because this is this is revolutionary folks. This is absolutely revolutionary.
I have so many ideas where this could go. And as you can imagine, I mean, it's something you're hearing right now. I have, gently asked Colin for an open invitation to join me on a future shiny developer series episode because I have so many questions for him, and there's no way that I could get it done in just an email. I want him to speak from the source. So look out for that in the near future once this is out there. But, Yeah. Mike, mobile apps on your phone powered by WebAssembly.
[00:08:38] Mike Thomas:
What timeline are we living in here? I don't know, Eric. And, you know, some of us aren't as as privileged to get the, early access. So I'm dealing with pixelated screenshots in this blog, folks, the edge of my seat trying to figure out when this is actually going to come out. I don't think there's a specific timeline here that, Colin mentions, which is which is smart on his end, as to when we will actually be able to get our hands on this, like the general public. This is this is crazy and probably a bad thing for me for all of those times that a client has asked, when we've developed a Shiny app for them. Like, hey. Could this be a mobile app too? And I'm like, nope. You know, this is these are just, you know, desktop web based applications. You know, you could go to your your Internet browser on your phone if you wanted to and use them, and and we can leverage Shiny mobile on that, for you. But it it can't be a true app. Well, now my answer has to be, well, technically, yes.
And that's just gonna open up just gigantic can of worms. Once we sort of figure out what's possible here, what the limitations are, but this is a serious, serious boundary that has been broken through. And to me, yeah, it it it's gonna going to open this world of possibilities for us. And I imagine that, you know, similar to the the WebR project that powers this, it just continues to, you know, branch out in terms of what is now capable that wasn't previously possible, for, you know, R and Shiny development. It's it's pretty incredible. I'm excited to see where this leads. What a tease. I mean, I don't think I've ever seen an rweekly highlights blog post that teases this hard.
So I guess hats off to Colin for for that. He has me on the edge of my seat waiting to hear
[00:10:42] Eric Nantz:
what's next and when I can finally get my hands on this. I I am eagerly awaiting the the mass release of it too. I will speak somewhat unofficially. It sounds like the release is imminent. So my hope is, as an early holiday present, that this will be out there. Let's put it that way. It's sounding all indications of that. You did mention WebR earlier. And one of the things that was very fascinating to me about when WebR was first released, with George Stagg's, you know, immense efforts at posit is that he was able to give us a web page that literally had, like, an r REPL inside. Right? I mean, you can just type in our code, install packages from the WebR repository, and then play with it at your leisure.
You have seen these questions earlier, Mike, throughout the community many years about, hey. I really like the experience of our studio. Isn't there any way to run it on mobile? Just imagine a little r REPL from WebR as a mobile type app in a tablet UI. I don't know. And that's maybe completely out left field, but it's based on the same technology. Right? I mean, that WebR repl, I believe, is literally just a self contained app, if you will, waiting to happen. I don't know. That's not what Colin's trying to tackle here. I'm just saying that it's there are a lot of other possibilities at play here and then getting back to the architecture of this, for example.
He's using SQLite for this, but my goodness, you could swap in DuckDV with this. You could swap in all these different parts that we've been so excited about that are now at your fingertips here. It's been one of my stretch goals to really push my dev skills to the max, so to speak, and create somehow powered by R, a R weekly podcast app where you would just simply listen to episodes of R weekly taking advantage of some of the stuff I've been learning about in the podcasting 2.0 development space with a DuckDb database on the back end? Maybe. Maybe. So as you can tell, I have a lot of questions, a lot of ideas, and I am just as excited as everyone else, I think, when this finally gets released and, you know, the other possibility here, and I'll speak specifically on the Android side of things, is that you're not just confined to installing apps from the Play Store. Of course, that's what Google is always gonna push as, like, the secure, quote unquote, repository. But there is a multitude of open source applications that are distributed on services like F droid and others where imagine and even other services where it's like an app store, but it's based on the GitHub releases of a project. So that, say, I have an app or or whatever you wanna call it, and I push a tag like version 1.2 or whatever, this other app store that I've learned about recently, I'll have to put a link to it in the show notes, will simply query for that GitHub repo directly and then install it directly on your phone. So imagine that as a distribution method. Right?
There are many many possibilities on to get these into the hands of your users. Obviously, iOS is a much different story, and I've heard a lot of candid, candid opinions about Apple's policies on this. But, nonetheless, my point being is that this isn't even just about the architecture now. You can get this into the hands of users really quickly depending on the OS they're they're running. So I don't know where to even go from here other than I'll keep playing with the app and test my art skill knowledge on this, but nonetheless,
[00:14:18] Mike Thomas:
I think I think we're gonna be watching this space, quite closely here. I couldn't agree more, Eric. Yeah. The the possibilities are endless. You have me feeling now, like, I should be on Android instead of iOS to take advantage of, you know, the app store possibilities there. It just sounds more open source friendly. So we'll see. Maybe at my next update, I might have to make a jump.
[00:14:53] Eric Nantz:
Well, there is a lot of excitement in the air in terms of the data science communities and other, scientific communities jumping onto the blue sky platform, which as you heard in recent episodes, both Mike and myself, we now have accounts on that very platform, and I've been eager to connect with the rest of the community, old friends, new friends alike. And you may be wondering as you're getting started with this as I was, you sometimes as you join these new platforms, you're trying to think, okay. Well, what's next after I sign up? Now credit to a capability that I've seen, you know, pushed heavily in the community is that Blue Sky offers or at least community members in Blue Sky can create what are called these starter packs, which are kind of a neat way for a, say, given topic like data science or, you know, other types of science or technology or whatnot, you can access this pack when you join and then by, you know, somewhat automatically get a list of the people included in that pack, and then you can choose to follow them or not. And that's great for an onboarding, but you may be wondering just how deep is the network out there for those people that you see immediately and maybe who are they following and and so on and so on. You know, typical social network type branches here.
Well, imagine a way that you can expand or at least potentially expand your network directly of our itself. Well, that's where our next post comes in from, Stephen Turner who's been featured on the highlights recently as well. He is very excited about the blue sky initiative, and he has another post where he talks about, you know, for those in the science fields that this is a a terrific option for them. And, yes, he has, you know, in his previous post looked at starter packs, but like I said, he was wondering about, you know, other ways to fill his network, you know, and really start to to grow that a bit. And he discovered this new, web based app out there called Blue Sky Network Analyzer, which is a, again, very simple web form where you can kind of enter the handles of of your account, and then you can kinda see this kind of relationship of the people you are following and then the people they are following and etcetera.
Well, he was wondering if he could do that from r itself, and it turns out you can because there is an r package called atrrattrradder. I don't know how to say it. I'm gonna give it a shot. This has been authored by Johannes Gruber, and this is wrapping what's called the AT or authentication transfer protocol that is the meat of Blue Sky. And that's kind of analogous to on the Mastodon side of things. It's wrapping a protocol called activity pub, but they're different, but yet I think they're functioning in a bit similar way. But this protocol is open source, so you can build capabilities or applications on top of it and sure enough you can, of course, build an r package in front of it too.
So Steven's post talks about how he uses this package to first authenticate to the service. And one bit of warning is that this is gonna leverage a Blue Sky API, and like any API, there could be rate limiting depending on how extensive you you, you leverage this. But getting into the example here, he authenticates to the Blue Sky service and there is a helper function called auth in the package that will guide you for creating what's called an application password for the first time, or if you have an existing one you can just use that as well. There's a simple function called get underscore follows that will simply grab the immediate of your immediate follows, you know, their handles and whatnot, And then you can kind of take that that list that you get initially and then through a looping function like lapply or whatnot, you can now get their follows. So as you can see, you could go many levels of this and that's where, like I said, you got to watch yourself with the rate limiting factor at play there, but then he shows first in a simple terminal based output after a little bit of filtering all the handles, their actual names, and the URLs to their profiles.
And, yes, you could also make that really fancy by feeding that into GT as well, one of my favorite packages for creating tables in R where you get this nice, he wasn't able to put it verbatim in the post, but you get a nice hyperlink with their handle and their name in that table and how many followers they have, and then you can simply choose at that point as you expand that network in a data driven approach. So, again, you could run this in many different levels, but, again, he cautions that, there could be some rate limiting depending on how often you use this, and he did try this when he kinda got when he tried to run over 5,000 accounts based on kind of this, you know, this triage or this depth of network.
This is where if if I was gonna build something like this, I might tap into the polite package, which we talked about many episodes ago, which would kind of handle that in essence sleeping between requests or pausing between requests in a somewhat randomized fashion, which might help with a service like this. So, again, that's like little, exercise for the audience if you want to try that yourself with with Steven's code here. But, nonetheless, I am excited to see the tooling around Blue Sky start to really take shape, such as what what Stevens, is exercised here in this post and that that aforementioned AT RRR package.
I've also seen Bob Rudis start to look at some of the tooling base and go or whatnot around Blue Sky as well. So there seems to be a lot of excitement around this, and I am all for making any tool like this to make the onboarding to new social platforms like this easier for those in a community no matter what your previous experience is in in these platforms as well. So really innovative approach and it just goes to show you ARC can do just about anything. Right, Mike?
[00:21:20] Mike Thomas:
Yeah. It is pretty incredible. It's a nice little, tool in terms of the script that we have that Steven's put together for us. And and as you said, if you have, you know, just maybe a 100 or a couple 100 followers, you shouldn't have any issues with the API. There is also in in the footnote of this blog post, or at the bottom of this blog post, there is a link to a web application called the Blue Sky Network Analyzer, which I played around with a little bit, which is pretty cool. I don't think it's it's using r, but, it seems like you're not going to get rate limited or throttled as much if you try to use that, web application instead. But a great, you know, blog post here in terms of the code that anybody could run. Just replace your username and your password, or use the auth function from the ATRRR package to be able to interactively, authenticate to your Blue Sky account, which is pretty cool that we have both options there. And a nice little GT table here, showing all of the, I guess, the top 20 accounts, that Steven's followers follow, if I got that correct, which, he does not also follow.
Really, you know, neat blog post here. Really nicely done. I am all in on Blue Sky. Excited about it. A lot of it does feel like old school data science Twitter community. So, yeah, excellent work.
[00:22:52] Eric Nantz:
And, late breaking here as I was prepping the recording here, I saw got wind of, you know, another possible feature that Blue Sky could have, which I've seen also push for mastodon type situations as well, is, let's say, you have a blog post somewhere and instead of relying on proprietary service for your comment system, imagine you, like, have a post on Blue Sky with, say, a link to your blog, but then your blog post is able to embed replies to that post as if they were comments on your on your blog directly. Late breaking here, but there is not one but 2 extensions in quartile now. One by James Blasto and one by Garrigay and Buoy at the time of this recording that are gonna give you short codes in quartile to embed this into your quartile webpage. So and it works. I tried James, widget or his post where it said, hey. Reply directly on Blue Sky.
Refresh the page, and your comment will appear on the page itself. And, yes, it works as advertised. I was comment number 1, so I got that I got that flag standing on that one. But that that my point is is that, like I said, the tooling around this seems to be expanding by the minute here, and I admit I am late to the Blue Sky party. I know there a few others that have been on this train for a bit already. So I've got some catching up to do, Mike, but I'm excited to see where this takes us.
[00:24:26] Mike Thomas:
Lots of exciting things coming out of quarto this week. I am literally looking at my Blue Sky timeline, and you're exactly right. The top, one of the top posts that I'm seeing is from Garrick explaining, this quarto extension. Looks like it's really easy to just, add this this little one liner. This includes sort of chunk in your quarto blog. It's blueskydashcomments with the post link, and then replies to your post become comments. That's pretty incredible. For those of us doing more antiquated things, there is also in the quarto 1.6, a nice new landscape tag that allows you, for your PDFs to, have a particular page that is in landscape, which I had to do some pretty crazy knitter things, previously to get working. So I'm very thankful to all of the work in the quarto community lately.
[00:25:21] Eric Nantz:
Yes. And, boy, that extension system just does wonders, doesn't it? It is exciting to be able to tap into this, as you need. That that's really exciting times. And last but certainly not least in our episode today, we're gonna revisit, the object oriented framework that we mentioned in a couple episodes ago just had some really nice quality of life updates, and that is the s seven package, which for if you didn't listen to that episode, this is the new, object oriented paradigm that has ambitions to be pushed as a new, you know, might say reimagination of the concepts of s3 and s4 class systems to be eventually, included into base r itself.
And I men remember mentioning at the end of our explanation on that, it will be interesting to see just where s 7 starts to take shape and some of the best use cases for that. Well, we got a pretty fascinating look on how it might help the user experience of even existing functions if they are reimagined with the s seven approach. And this post comes us from Josiah Perry, who's also been featured on the highlights numerous times. He has had a lot of interesting adventures recently with the Rust programming language and that's integration with R, but he takes a little diversion on that and talks about, you know, where s 7 might help in certain situations and to set the stage here in his post, he talks about some of the excellent, functions from the read r package, which is part of the tidyverse that lets you import data files in text format no matter if there's CSV, delimited, or even other types of syntax.
And it has a lot of arguments because it is doing a lot under the hood and has to account for a lot of different issues with these files. And in particular, Josiah starts by talking about the cow_names argument. And as you read that, as a user and may not be familiar with that argument, you may think logically, well, cownames, maybe that's a switch. Maybe that's an indicator of if the file already has a present or not. And, yes, you can set that to true, meaning that the first row indeed has a column names. Or you could set it to false, meaning that there is potentially no header there, and you're going to have to do that yourself.
Well, speaking of doing that yourself, column names not just takes a true or false, it can take a vector of character strings to use as the names of the of the columns that you're importing from that file. Let that sink in a little bit, an argument and take either a logical or a character string. Now that can be elegant in many situations or it can be a little confusing on how to wrap your head around that which I've been on both sides of that fence especially when I was new to like the base r read dot CSV and and, and the read r package years afterwards. So he talks about a couple different scenarios where he might use each version of this one of which is you it has headers, but you want to give it different headers, So you could do that. He uses, like, an exported version of the iris set just for illustration.
You could easily do that. You could also say, well, as if it didn't have the names already, but I want to add the names myself in the function call. But I don't want it to be the names of the file already there, so I want to skip the import by, by one line. So then you're kind of putting that in yourself. And, again, there could be a situation where there's no headers at all. You just either say you don't want the headers and you want to put them in after the fact or you, supply the column names yourself. The if you get the hang of it, yeah, maybe you can, you know, use that, you know, at the paradigm in the future.
But he wonders if there may be a way to make that a little bit less complicated because under the hood, in his opinion, call names kind of has 2 things going at the same time. 1, is a header present or not? 2, do you want to add your own or not? And so that leads us to one of the interesting aspects of s 7 that you could potentially play with here with this reimagination of a radar importing function is that this radar function, these set of functions have over 20 arguments that you can specify. Some of these are common. Some of these are very niche because they're really dependent on your use case.
What if there was a way instead of having the you to have these 1 by 1, you know, specified in the in the function arguments that you have, like, an options type argument with more detailed settings. Again, maybe more for the niche ones that have same defaults from the start just like the function does currently, but a little more streamlined way to feed those in. So he looks at, say, read underscore CSV, and there are quite a few, like 14 to be exact, of these arguments that he thinks should be belonging in this options paradigm instead of in the function call itself.
And so, finally, we get to in the post how you can use s 7 to do in essence argument validation, not too dissimilar to what I've done with packages like assert that or checkmate in my functions to determine if a parameter is indeed a string or a logical or, a value that fits, like, the boundaries I'm expecting it to have. You can do the same thing of s 7 and have these properties, you know, listed where you start a new class, but then you put in kind of the default value for it or a default function call in some cases, and then what you're gonna do to validate that input. So one example is the locale argument, which can have from read r directly the default locale of the system itself, or you can have a validator to look at is this coming in as a proper string and, in particular, sometimes the time involved with that, and you can, you know, validate that with something like our lang checks, like is character or is scaler and whatnot.
And then if it's invalid, you can show a friendly error message afterwards. You can go down the the rabbit hole of this for all the rest of the arguments as well, such as repairing names, missing values, quotes, comments, and you can see many of them will follow a similar format. And then towards the end, you can now have this new class. He's calling it radar ops, and then the properties are each of these kind of property functions that he defined earlier in the post. And then lo and behold, he's now got an example at the end where it's got the 4 or 5 arguments that are most common for read CSV, such as the file name, the column names, the column types, which ones you want to select, and then there's an options argument where then you just feed in this initialization of that class.
But you could put inside that initialization of that class the other options that in there that you want to customize yourself. You don't have to, but you can. So in his opinion, this can help, you know, minimize that cognitive load, so to speak, as well as consolidating those options that are less frequently used in an approach that he says he's gleaned from his experiences with Rust, similar paradigms in the language and how that handles function arguments from both kind of a frequently used standpoint and those that maybe not so frequently used. So fascinating thoughts here, and I like I said, I've been wondering where the best position s 7. So this gave me quite a bit to think about in in my next generation of packages and combining the object oriented approach with these assertions at the same time and try to make the user experience
[00:34:02] Mike Thomas:
a bit more streamlined to boot. Yeah. Eric, this is a really nice applied approach to demonstrating what s 7 can do for us. I I know Josiah has a lot of strong opinions. And this one, I am going to agree with him on because when he talks about how it just feels a little weird that a particular argument could take a Boolean or a character string, it does. You know, I've been there before. It's it's very convenient, I think, to the folks who maybe are earlier on in there. There are journey that that might not necessarily notice. But I think in terms of, you know, thinking about package developers and making sure that what you are developing for others is is really strong and stable. I think that can lead to a lot of, I don't know, potential things, being a little less stable, a little less robust if you have arguments that are taking, you know, different types of of class objects, if you will. But, anyways, so I thought that this was a great use case for demonstrating s 7 and and taking sort of an opinionated approach to how we could potentially alter the the reader package, in this way. It seems like, you know, the the workhorse functions from s 7, seem to be new property, which is to create validators, if I have that correct.
Exactly. Yep. I'm up to date in my object oriented programming and then a new class here at the end where it seems like we call all of these validators for the different properties that we're going to list in this new class. And, obviously, that new class function from s 7 is going to create a class object, a really nice walk through about how you can, you know, take a look at that class object just by sort of printing it. And then you can also use the at accessor, the the at symbol, to be able to pull out and view a particular property in that class object, which is really neat. I mean, it feels kinda like working with lists. It shouldn't be super scary. Right? The syntax is gonna be a little bit different with, you know, a lot of objects that you're creating via the the new property function for these validators tend to start with a a period, you know, so that might be a little bit new for folks. But it's nice that you can sort of define these these validator tests, if you will, in the in the same place that you're writing a lot of these these logic. So, I'm definitely a fan. I really appreciate this applied walk through. It it helped me wrap my hands around, the benefits of s 7 and and what the syntax looks like and how to use it, compared to, you know, what I've seen in some of the other object oriented programming packages and and, base packages out there as well.
[00:36:57] Eric Nantz:
Yeah. And I'll put a link in in the show notes to from the s seven packages site. 1 of the vignettes is talking about the classes and object structure, and it does have some, you know, very much utilitarian type examples here, but they do talk about validation as well. But I think that's a great thing to put side by side as you read Josiah's post, you know, after this as you wanna think about actually implementing this into, say, a function you're creating in a custom way. And, yes, they also have articles about putting this into a package itself, which I'm sure is going to be the next stage of this, especially when we get to that. Hopefully, not too distant future where s 7 literally becomes part of the base language itself. We're not there yet, but that's our goal and I think they are well on their way to achieving that.
[00:37:44] Mike Thomas:
Yes. Yes. We'll see.
[00:37:46] Eric Nantz:
We shall see. And there is speaking of seem oh, there's a lot more to see in this issue as I said. Tony went out of a bang here. There's a lot of additional great content here. We'll take a minute or 2 for our additional finds here and, hey, I I can't stop being on the web assembly side of train with this one folks, because there is a new package that has just hit CRAN called roxy.shinylive. You can probably tell by the name this has got a couple key concepts here that we want to talk about here. This is authored by Pawel Ruchi who is, for those in the life sciences space, he is one of the chief developers of the teal framework for Shiny applications in a modular fashion that is is very very promising in the realm of using, Shiny with life sciences. But nonetheless, he has been one of the early adopters of WebAssembly like myself. And one thing that he was really hoping to have ever since, you know, all this came about last year. A vision that, Micah, you shared with me on this is that imagine you have documentation for either a shiny app or a function that maybe is part of a shiny app. And if you go to that help page for that package, say on a package down site, you can run an example of that right on the spot.
Roxy Shiny live is making that happen. How does this actually work? I don't have enough to do with justice here, but at a high level you can put in, once you install this package, a way to create a URL for a self contained version of this example that you put in your r oxygen block hosted on shinylive. Io, the free service that posit offers for hosting Shiny applications built with Shiny Live for both the Python side and the R side. Remember when this all first came out, it was just on the Python side for quite a bit. Now the r side gets, cake and eat it too, so to speak. So I'll have a link to the package downside for the package itself in the notes, but you can see a little simple example where he writes it for a hello world string an embeddable URL that you can use in the package documentation that will embed almost like an iframe that shiny live app on the same package help page on the web version of it in both like the manual page you can also do this for vignettes as well you just have to make sure your description has in suggest roxy.shinylive.
There is a specific, r oxygen declarative you have to put in your description file to make sure it's using roxyshinylive when it's compiling the help pages, but he shows an example in the package down site where he's embedded basically one of the functions called cross table, which I believe comes from the TOEcosystem or whatnot, where it's got the embedded a shiny app literally right in the page saying tried and shiny live. Oh my goodness. This is this is game changing in and of itself with documentation. So this is this is pretty new. He's only been working on this, I think, for maybe part of the year. It's been on GitHub for a little bit, but as of now, it is now on CRAN. So, I definitely encourage all of you to try that out if you're interested in in leveraging or supercharging your documentation with Shiny Live involved.
And congratulations, Apollo, on this one dot o release. This is this is awesome.
[00:41:31] Mike Thomas:
This is oh my goodness. We're being blown away this week, Eric. This is absolutely incredible. I'm super excited to check this project out. I think that would be game changing to be able to run examples, literally, you know, in some sort of a, you know, interactive session from your package down site, I think that would be incredible in terms of reproducibility and and ensuring that other folks understand exactly what's going on with your package. You get to play around with it before they install it themselves. Right? Wow. I'm very excited to check that project out. Another one that I I thought was pretty cool as we get towards the end of the year here, hard to believe, but Cole Barrell did a fantastic blog post visualizing his Spotify Wrapped.
So all of the music that he listened to, with some fantastic visuals. And I I really love the theme, that Cole used throughout this blog post. Imagine that we have ggplot under the hood here, and it's it's just a really fun little blog post to take a look at, the his listening history for what looks like, I think, the last 10 years of his listening habits. He was able to get data from 2014 to 2024. So very, very cool, nice little ggplot visual blog post, if you're interested in that type of thing.
[00:42:56] Eric Nantz:
Oh, this is this is slick. I I really like to see this thing. And I've also been on a you know, throughout the year, Mike's heard about this in our pre shows. I've been really spinning up some what I call self hosting services on my beefy news server that I have in the basement a few feet behind me here. And one of them is like a music streaming service with music I've already downloaded for for creative commons or whatnot. This oc remix, the service that I use for those little bumper musics you hear in this episode. I have almost all of their tracks on myself host a server here, and there's a service called Navidrome I'm using that gives me that Spotify like experience internally and wrap up a tail scale. I can listen to that anywhere I am on my secure devices, but they have an API too. So I might have to do some listening habits on my own on which games just happen to be most frequently used in the music that I'm listening to if I need a little, pick me up, so to speak. So this gives me inspiration based on, what Cole's doing with Spotify. So yeah.
I always have the tunes going when I do my hardcore shiny dev work and package dev work, and boy did I need it with a gnarly issue earlier last week. I somehow got through it, but it also it was a journey, Mike, as you know, that the bugging never stops sometimes.
[00:44:14] Mike Thomas:
Oh, I know.
[00:44:16] Eric Nantz:
We knew that pick me up sometimes. And, sorry, I hope that our weekly itself is your pick me up for the awesome content. Like I said, we, we are blown away by what we see, and this week is definitely an illustration of that. So congrats to everybody in the community, our our curator as well or Tony for curating all this, but also, yeah, Colin, Steven, and Josiah. Excellent posts. We are really excited to see where the future is for these efforts. And the future keeps going with our weekly, but it is a community project. And as we said, we rely on your support. Obviously, I would hope that over the news I shared earlier that, we are looking for curators to join the team, so we'd love for you to get involved. All the details are on our GitHub repository, but you can find all this at rweekly.org.
You can also send us what story we should that should be featured in next week's issue. We're just a pull request away, all marked down all the time. We love hearing from you, and those pull requests are an immense help to our curators for each week. And we love hearing from you in the audience as well. We got a little contact page embedded in the podcast episode show notes here on your podcast player. We also have that fun little boost functionality, another great way to get in touch with us directly. You have a modern podcast app. I personally like fountain and Podverse and cast o matic. There are many others as well at new podcastapps.com if you're interested in that ecosystem.
And, also, we are on the social medias. Yes. I am on blue sky now with at our podcast at bsky.social. Also, I'm Mastodon. I'm so keeping that on. I'm very passionate about that with that our podcast at podcast index dot social, and I'm on LinkedIn. Search my name, and you'll find me there. Mike, where can they find you? Yep. You can find me on blue sky at [email protected]
[00:46:16] Mike Thomas:
[email protected], as well as LinkedIn. If you search Ketchbrooke Analytics, ketchbrooke,
[00:46:25] Eric Nantz:
you can see what I'm up to. Yep. And I do want a quick little, plug here before I head out here. I was one of the organizers and, backstage y people for the our pharma conference. We just released our recordings for the conference event, and there is a lot of awesome content. No matter if you're in life sciences or not, There's a bit of some for everybody, including a talk from Pablo who we just talked about with that, Roxy Shiny Live package. He gave her great talk about how you how he levers WebAssembly for what's called a TLG catalog. I'll have that linked in the show notes too, but it shows the the thoughts that he's had and, and the amazing techniques he's been using throughout the year on that. So if you like your web assembly, there's there's a lot going on in this space.
But we're gonna close-up shop here. Like I said, for those of you out there that may be celebrating a big holiday this week, we hope you have safe travels and and, good times to be had. I'll be hitting the road tomorrow, hopefully, for a successful road trip back to my stomping grounds in Michigan. But wherever your, travels take you, hope you have a great time. And we should be back for another episode of our weekly highlights next week.
Episode Wrapup