A tour of how the httr2 package streamlines API processing in R, five must-have ggplot2 extension packages for your next visualization, and the Appsilon Shiny Conf 2024 is shaping up to be the biggest yet for all things Shiny.
Episode Links
- This week's curator: Colin Fay - [@_ColinFay]](https://twitter.com/_ColinFay) (Twitter)
- How to work with APIs using the httr2 package
- Five Powerful
ggplot
Extensions - Call for Speakers: ShinyConf 2024 by Appsilon
- Entire issue available at rweekly.org/2024-W03
Supplement Resources
- Eric's podindexr package (accessing the Podcast Index API from R) https://github.com/rpodcast/podindexr
- Melissa's web site https://www.melissavanbussel.com/
- ggnot2 YouTube channel https://www.youtube.com/c/ggnot2
- Jon Harman's web APIs with R book https://wapir.io/
- beekeeper (rapidly scaffold API client packages) https://github.com/jonthegeek/beekeeper
- ggtext - Claus Wilke https://wilkelab.org/ggtext/
- patchwork - Thomas Pedersen https://patchwork.data-imaginist.com/
- ggpattern - Mike FC (coolbutuseless) https://coolbutuseless.github.io/package/ggpattern/
- ggforce - Thomas Pedersen https://ggforce.data-imaginist.com/
- ggbump - David Sjoberg https://github.com/davidsjoberg/ggbump
- ShinyConf 2024 https://www.shinyconf.com/
- Yihui Xie: RAP god (Matt Dray) https://www.rostrum.blog/posts/2024-01-12-yihui-rap/
Supporting the show
- Use the contact page at https://rweekly.fireside.fm/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: @theRcast (Twitter) and @[email protected] (Mastodon)
- Mike Thomas: @mike_ketchbrook (Twitter) and @[email protected] (Mastodon)
[00:00:03]
Eric Nantz:
Hello, friends. We are back at episode a 148 of the R Weekly highlights podcast. And coming to you from our respective, frigid areas here in the US, where we hope we can heat you up a little bit with some fun, our content, as always, coming straight from the latest issue on ourweekly.org. My name is Eric Nantz, and I'm delighted that you join us wherever you are around the world. And keeping warm in his abode there is my awesome cohost, Mike Thomas. Mike, how are you doing this morning?
[00:00:29] Mike Thomas:
Doing great, Eric. Go Lions. How about that? Go
[00:00:33] Eric Nantz:
Lions. For those that aren't aware, the the Detroit Lions have had a, bit of a struggle in really doing anything successful for many, many, and I do mean many years in the football landscape, but they won their 1st playoff game in 31 years, folks. That's a long time. I was, I'm not gonna date myself too much. Well, let's just say I was quite younger back then. And it was, yeah. Who knew that it would take that long to get back there? But the the Ford field was rocking. And as a Michigander all my life, it was, I could see why fans are crying in the sands. That was a moment, folks, and they're not stopping. They got another game this weekend, so we'll see what happens.
[00:01:13] Mike Thomas:
Keep it rolling.
[00:01:15] Eric Nantz:
Keep it rolling, baby. And we're gonna keep this podcast rolling as well because we got another awesome issue to talk about that's curated by the esteemed Colin Fay. By this point, you know who he is if you listen to the show just a little bit. For those who aren't aware, he is at ThinkR, and he does awesome art packages in the shiny space such as golem, which we use quite a bit in our day to day. But as always, he had tremendous help from our fellow our weekly team members and contributors like all of you around the world with your awesome poll requests and suggestions. And first, on our highlights today, as we told you many times before, it is a new age, so to speak, in computing, and gone are the days where you have to rely on just getting your data from CSVs in a random place all the time or having to deal with other proprietary platforms or services. Now there is the wonder of APIs for you to access these services programmatically.
And our first highlight is a great tutorial on a recent refresh, if you will, of a very important package in this space of using R to call these APIs very quickly and efficiently. And in particular, Melissa Van Basso, who is an associate statistician at Statistics Canada, and she makes a lot of our videos about our programming and statistics. And that's literally one of her taglines in her channel called g g not. And if you haven't bookmarked it, you should because she pumps out a lot of terrific content on a very regular basis.
Very inspiring. Her latest video is an aforementioned tutorial, quick but straight to the point, practical tutorial on working with APIs using h t t r 2. And she sets the stage by putting on some nice analogies about how APIs with respect to security works because most of the time, these APIs, yeah, they may technically be free to use and some are not, but one way or another, you need to authenticate to them in some way, shape, or form. This can be very confusing to people, but she walks through 2 examples. 1, using OpenAI's API for, you guessed it, an image generation, request, but also something that I hope gets more spotlight in, in the our ecosystem these days is the API for GitLab.
For those that aren't aware, GitLab is somewhat analogous to GitHub, only it is free and open source, at least open core. And a lot of people are turning to that to self host their version control repositories. And in fact, many organizations use that as well within their firewalls that give them that robust Git, like, hosting platform but under their control. But they have an API as well. So she walks through 2 examples, again, using those respective APIs and how to authenticate to them with h t t r 2. And this is where you will have to inject some authorization magic, but there is a function in h t t r 2 to do just that.
But it is interesting that she selected 2 examples because not every company behind these APIs is gonna have the exact same syntax for authentication. And, in fact, these two services do require slightly different request language or request structure in that authorization header, if you will. And the good news is this video does have an associated GitHub repo where she walks through the, example very clearly, and you can quickly get a get a glance at it. It's only about 50 lines or so, but you can see the different headers that she has to inject in these various APIs.
Now the best situation, of course, is if there is an r package that actually wraps this API that you're interested in. She's very upfront with the fact that in real world usage, you might wanna leverage that particular package instead of building something up yourself. But, again, this is a tutorial for how h t t r two works. So it's really great to see these, this example here. And, honestly, once you get the authentication down, that's kinda like more than half the battle, so to speak. And trust me, I've been there. I've had some wicked wars of authentication in the past. But at that point, the other interesting nuance between these examples is the type of request that you're about to send.
With respect to the GitLab API, she's interested in grabbing issue summaries, and that is facilitated by what we call a Git request. You're not really putting anything else in your request kind of transmit to the API service other than a various parameter or set of parameters in the URL of that actual request. Whereas, for the OpenAI example, she actually has to do what's called a post request, which is saying that you, as a submitter of that request, have to tell the API something about what you want or supply some important information. And in this case, it's the prompt of what kind of image she wants to generate.
And, of course, we love animals here on this podcast. So she has a prompt of acute baby sea otter, insert penguins or whatever your favorite animal is. You can probably do that too. But that has to be a post request. That's not through the URL itself. So, again, most of these APIs will have documentation, some may be better than others, on how to handle these requests and whether it's a get request or a post request. But oftentimes, when you're kinda like doing a query of what's out there, most of the time, that's gonna be a post request of some sort. But in the end, once you get the results back, you're gonna get some nice, maybe not so nice, list of the results.
Often, it's being compiled from JSON from the API itself. An h t r two will have a friendly wrapper to say, okay. This is a re a request coming back in JSON format, but I'm gonna translate that back to a list. And then it's up to you to wrangle that list afterwards. So that's more of an exercise for you to play with at the end here, but she does show a couple of examples of how you can subset this nested list for the various parameters like the title of that issue or milestone or other information such as the URL of that image that's being generated from OpenAI.
That's where there are other packages in the our ecosystem that can definitely help with wrangling lists. Mike and I love the per package for a lot of these situations. There are other interesting ones where it turns a nested list into a nested data frame. I've seen that mentioned in the past. There's lots of ways to post process this. But, again, half the battle is just getting authenticated to this and then leveraging h t t r two's new pipeable syntax to kind of build this step by step, the request process as a whole. So if you're new to it, definitely start with this package. HTTR itself came before it, and I used it extensively back in the day. But if you're comfortable with the tidyverse, you're comfortable with pipeline processing, this is gonna be a very nice fit for you as you get involved in this landscape.
And I can speak as a package author, albeit a very, low key package, that h t t r 2 was very easy to work with. My package called pod index r, which is interfacing the podcast 2.0 API from r, leverages h t t r 2 under the hood. So I did authentication via the mechanisms that she talks about here. I do want to mention one thing, though. Never ever put your authentication keys in your script itself. And this is obviously a very brief example, but in real practice, environment variables are your friends here. So definitely take a look at that. That's also documented in the h t t r two's package Vignettes if you're curious about how that lingo works. But one thing that trips a lot of people up at the day job, if you're updating your environment variables, maybe you generated a fresh token for that service or whatnot.
You've gotta restart that hour session first because it will not take effect until you do, and I've had more than a few calls, a few messages on our teams at work of, I changed my GitHub API, PA 2, and it's not working. Help. And I'm like, did you restart your session? Oh, so don't just just it it happens, folks. It happens to the best of us. And, yes, it's happened to me even at this, experience level of APIs that just trips you up, especially the AWS ones. I'm gonna be starting on that. But, nonetheless, this was an awesome straight to the point tutorial. It's an easy watch, maybe 15 minutes at the most. And Melissa has a bunch of other terrific tutorials on his on her channel, so definitely have a look at that.
[00:10:16] Mike Thomas:
Yeah. This was probably my first, that I can remember introduction to Melissa, and she does a phenomenal job, like you said, Eric, in this quick nice 15 minute YouTube post about how to work with the new h t t r two package and and I do really like the the beauty of the pipeable syntax as you sort of build up either this get or post request and then finally execute that. And, yeah, I just can't speak highly enough about how well, Melissa really articulates every step of the process. You know, why she's writing the code that she is, particular syntax, things that you can get hung up on such as having to to quote, her back tick essentially different pieces of the, the the request that you are sending to make sure that, you know, our isn't, unable to to find certain objects because you're not quoting those and things like that. She she does a really nice job better than I could ever, explaining exactly how to build up these get and post requests using h t t r 2. I'm really thrilled that we have the h t two h t t r 2 package, now out and available and battle tested.
So I I would highly recommend folks who have been using h t t r, to to take a look and see if it makes sense to switch over to h t t r 2. I think you'll find some gains in efficiencies, some gains in, just sort of the the syntax style and things like that that might make your life a little bit easier and I think you know a big key to these packages is they help developers as well create our packages that serve as wrappers to API's right that make everybody's life easier so if you're somebody that, you know, has an API out there that you really wanna create an R package around to make other people's life easier interacting with that that data source or whatever that API serves, maybe the h t t r two package will help you do that more easily.
I believe in the past with h t t r, there have been vignettes and articles and things like that on how to develop in our package that wraps an API. So I'd be curious to see. I haven't haven't checked, but maybe we can put it in the show notes to see if there's sort of an updated version of that documentation using the h t t r two package, for wrapping your favorite API. But, again, a great walk through. Really nice examples here. 1 with a get request and one with a post request that sort of run the gamut of all the different types of of APIs that you may be working with. So can't speak highly enough about Melissa. If you're interested in taking a look at some of her other content, she has her own website atmelissavambusil.com.
So check it out.
[00:13:09] Eric Nantz:
Yeah. And, yeah. Follow-up to your quick question there. Yes. H t t r two does have a vignette exactly tailored to wrapping API. So definitely wonderful reading. I've read it literally 4 or 5 times as I was writing my little pod index r package, to to handle this. So it's very thorough, very, straightforward. And again, touches on those those nitty gritties like authentication and managing managing those effectively. But it's got two examples using the New York Times API for books as well as GitHub just API. So again, it's great to have 2 different examples because it's almost like no way no 2 APIs do things similarly. There's always some little minor differences here and there. And we're definitely seeing that now with HTTR 2 recently, celebrating its 1 dot o release, another, I think, reason why Melissa made this video. This is kind of the unofficial or somewhat official signal that this, like you said, is is tested by many people. It's ready to go and to augment your API workflows.
We're seeing some other packages in this kinda ecosystem area of API, you know, linking, wrangling, and now testing that are basing their work on HTTR 2 as well. So it's definitely becoming your go to, I think, for a lot of the API, operations in r itself. And I'd imagine we're gonna see more packages in the ecosystem start to wrap this, more fully as they, you know, find more APIs that just haven't been helped by the community just yet. So, yeah, wonderful tutorial, and it was a thrill to meet Melissa in person at deposit conf, back in in the fall last year. Yeah. She very personable and very humble and, yeah, really great to to see her turn through this terrific content. And there we say, we we hope you keep it up. And, there was even I remember looking at her LinkedIn post announcing this video.
Someone had the request. Hey. Have you ever thought about doing a live stream of your live coding? She sounds like she's not saying no to it. But, Melissa, if you're listening, if you want a buddy to help you along that, wink wink, I'll just say that.
[00:15:20] Mike Thomas:
Who knows? Who knows? And to double down on your best practices, Eric, put your API keys as environment variables in a dotrenvironment file and git ignore that thing immediately.
[00:15:32] Eric Nantz:
Immediately, folks. Yep. Because, you heard my rant maybe a year and a half ago. Somebody did not do that, and we were, dinged pretty badly at the the tape shop security group when they discovered that. So, yeah, you gotta be careful there, folks. Gotta be careful. Well, Mike, we were just saying how things are becoming more normal for us as we're getting, you know, the the 2024 season of our weekly highlights up and running. Well, one thing we didn't really have as much last time around was a great post around visualizations, and sure enough, that that's been normalized to this week, if you will, because friend of the show, Albert Rapp, is back to the highlights and for his first contribution to 2024 where he has both a blog post and an accompanying video talking about 5 of his favorite ggplot 2 extensions.
As we mentioned many times in highlights before, ggplot 2 is not just about gg ggplot 2, the package itself. Because of the extension system that it introduced a few years ago, now the community can take ggplot 2's functionality and supercharge it in many, and I do mean many different ways. And this roundup of extensions is a great tour de force to just see what it exactly is capable of. And the blog post is quite visual as you would expect, so we'll do our best to summarize it here. But right off the bat, one easy win for you as you think about annotations in your plots, as you think about formatting maybe your subtitles or your titles or access labels or whatnot, have a look at the g g text package.
This is one that has been mentioned in previous highlights before. This is authored by Klaus Wilk. We'll have a link to all these packages in the in the show notes as well. But this is a very quick way for you to augment that existing text that you want to put on your plot with HTML syntax or markdown syntax. So you're living the quartile lifestyle, the Rmarkdown lifestyle, or maybe your Shiny app styling. You can do that same kind of thing in ggplot2 as well. Ggtext just does this very well, very elegantly. And if you're if you're comfortable with markdown, which many people are these days, it is a terrific fit for you on on your ggplot2 builds as well. And with a low HTML knowledge, the sky's the limit for what you can do in these annotations, in these textual representations.
So must have, I would say, as you think about getting those plots in a more publication ready state. Speaking of multiple plots, one thorn in my side many, many years early in my g g file 2 exploits was the fact that, you know, I had these two plots. Maybe they were they were talking about the same domain, the same type of data, but they were completely different. But yet I wanted to compose them in such a way to arrange them so they fit on a single page or whatnot. I've had a lot of battles with grid dot draw and other situations like this, but Patchwork, the r package by Thomas Lynn Peterson, software engineer at posit, is a terrific way to take almost any type of ggplot and compose multiple ones together using a very intuitive, you know, syntax that's native to ggplot2 itself with the plus operator. Just kind of combining the 2, you can stack them up with the the the slice or the fraction operator if you want, but there's a lot more customizations to say take one facet and make it big wide, maybe 2 plots below that that are sharing the space equally between each other.
This has been asked for me at the day job to help bring recommendations to this because oftentimes we'll have, like I said, these plots that are doing kind of different things, but yet using the same data, and they tell kind of different stories. So having in patchwork is so helpful to just customize a layout without a lot of fuss around it. So very, very helpful if you're in that situation like I've been many years ago. I'm having a lot of flashbacks to parmfrow,
[00:19:54] Mike Thomas:
which I Dude.
[00:19:55] Eric Nantz:
Oh, dude. Yes. Many, many. My dissertation was full of that. Yes. It was a nightmare to debug. Lot of college flashbacks for me. Yep. Yep. We didn't we didn't expect that. But every time we do this show, we always have flashbacks of some sort. Just didn't expect that one. But, moving on to more pleasant memories or things I wish I had known about before, Sometimes you wanna really get, you know, customizable with the types of patterns that you wanna put in the geomes that you surface in these plots. Maybe a gradient or maybe a little fun like symbol or or an image that you wanna fasten into a bar chart like setup.
The next package that Albert highlights is gg pattern. Gg pattern is authored by Mike FC. You probably know him as cool but useless on the various social spheres. And this is a very excellent package that lets you simply figure, specify either geometric or image type patterns to fill in your various geomes such as bar charts, such as, you know, line charts or things like that. And then Albert, in his example here on The Post, has a fun little representation of coffee bean, quantities, for for different countries in South America by using a little coffee icon in this waffle chart type setup.
That was really interesting, the things you can do with ggpatterns. So, again, this might be great for those of you who are trying to build infographic type setups or ggplot. This might be a great fit for you. And, again, combine that with things like ggtext, the sky's the limit once again. And then the next one we have here is kind of a potpourri or a collection of kind of utility type extensions, and this is off this is called ggforce, offered by the aforementioned Thomas Lynn Peterson. He has been in the ggplot2 game for many years.
And this package, I believe, came out not too long after the extension kind of paradigm or system was introduced in ggplot2. So ggforce lets you do a whole bunch of random type geomes that maybe are not quite the same kind of design choices as someone like Hadley has thought about for ggplot2. But if you wanna create bars like a bar chart with an arc or a circle geom, which is great for obviously things like pie charts or donut charts and the like, there's lots of interesting, geoms you can augment in your existing visualizations.
And ggforce has a whole bunch more. But again, to Albert's credit, he's got a fun little tutorial linked in the same blog post. And, he created donut charts and pie charts with gg4s. Again, lots of opportunities to combine this and really tailored, again, maybe for that infographic type setup with the alternative geoms that it offers. And last but certainly not least, we've got bump charts, which are becoming a lot more common these days as I look at visualizations, and that is offered by the gg bump package that is authored by David Sjoberg, and we'll have a link again to all these packages in the show notes. This is another great utility type ggplot2 extension.
Does one thing, does it well. And his example that Albert puts in here is looking at flight tracking for European flights across various countries and the trends that you see over time. And it's very easy to see kind of the performance or you might say the launch demo profile of these. And, again, I don't do a lot of these in my day to day job, but I think this is still something that you might be able to augment pretty nicely with another package like gghighlight to really fasten in on one particular country's, trend in flight patterns or flight rankings as well.
That again, that's just 5 extensions in this massive ecosystem of ggplot2. There's there's just so much to choose from. Albert does a great job of giving you 5 quick hits that I think can augment your visualizations very well in your day to day work. And he's got links to other areas where he's put these in practice. So he's he's been doing a lot in this space. We we met Albert, at at PasaConf, and he has turned around the visualization content quite a bit. He's very excited about it, and I believe he even has a short course that he's authored as well. So definitely be on the lookout for that as well.
[00:24:47] Mike Thomas:
Yeah. I really enjoy these, you know, sort of digestible visualization posts from Albert. And I guess 2 things that really stood out to me, you know, as as someone who has to provide clients with a lot of deliverables, you know, especially non technical folks at the end of the day, is the text customization in in gg text, you know, allowing you to write HTML essentially inside your string and to be able to to bold text, to to change the color of text, things like that on your your charts, I think, goes a long way towards communicating really the central idea around your data and the visualization you've created and what you are trying to, convey to the end audience. And then the other the other one that really stands out to me for very similar reasons is gonna be the g g highlight package as well, which, admittedly, I haven't used enough, but it it's incredibly simple in terms of the syntax that you can use to highlight a particular element of your chart. On this bump chart that Albert has created, you know, the the first argument in that is a dplyr filter kind of like syntax, where he's he's saying state, double equal sign, United Kingdom, because the line for the United Kingdom's flights is the one that he wants to highlight in green, and all of the other ones are going to be sort of in this in this soft gray in the background.
And it's really 1 or 2 lines of code to be able to do that and highlight this particular line and set all the others to this background gray color. And it stands out so beautifully on the chart, and it it really demonstrates, you know, the the key concept that Albert's trying to display, which is is show the end user, the UK's trend from 2016 to 22 of incoming and outgoing flights. And if the end audience wants to also look at the data for the other 5 countries in this chart, they can because it's there. It's just sort of abstracted a little bit into the background, to make the point and make the readers focus, on the United Kingdom.
So really cool, blog post by Albert. He always does a great job including not only the the charts and his rationale behind them, but also the code behind everything. I recently had a use case where I wanted to essentially take the I had a, flipped axis chart, and I wanted to take the values on the x axis and put them within the bars. And the first place that I looked was a on Albert's website. And, of course, I came across a blog post where he was doing exactly that. And it made my plot a little bit bigger because I was able to sort of exclude the x axis itself and put those values right on the bars, so they really stand out to the end user, and they don't have to sort of line up, the bar width to the corresponding x axis value. They can just see it right at the end of the bar.
And, it it was all thanks to Albert who made my life really easy in order to be able to accomplish that. So thanks to him again for continuing to churn out this great visualization content and expecting more of the same in in 2024.
[00:28:01] Eric Nantz:
Yeah. I think the a lot of these visuals you see here would fit really nicely if you're making any kind of business intelligence dashboard setup or other content where you gotta push the envelope a little bit, after that standard type of visualization. I can see this, this set being quite valuable in in this space. And, yeah, the syntax to to wrangle these packages are all doing a terrific job of if you're familiar with jgplot2, you're gonna feel right at home in putting these geoms in practice. So that user experience from a, you know, a content, you know, creator standpoint of graphs, you wanna make sure you're not, like, content shifting so much as you use these alternative geoms. So I think this is this is a great showcase of if you're comfortable with this language, you're gonna you're gonna feel right at home with the various extensions that you can push here. And, man, that g g text package, though, that is such an underrated gem in this space. I can't believe I didn't use this sooner, but better late than never.
[00:29:01] Mike Thomas:
Same here.
[00:29:04] Eric Nantz:
Yep. And one thing we don't want you to be weighed about, our last highlight is is more of a friendly call to action here because you all know Mike and I are fans of the shiny ecosystem. We talk about quite a bit on this very show and our other endeavors. And, yes, the shiny conference for 2024 is coming up this April, April 17th through 19th. And like years before, it is all virtual, but it is definitely expanding the footprint, so to speak, with not 1, not 2, not 3, but 4 exciting tracks of talk. And, of course, first off is that the early bird registration is open, so we'll have links to the registration page in the show notes to get you get your early bird tickets available there.
But in the aforementioned tracks, we have 4 tracks that you're gonna be learning about. One of them is the shiny innovation hub, and this is really looking at what are the latest developments, best practices, and creative uses of Shiny within the ecosystem itself using very novel approaches for problem solving. And that is being, chaired by Jacob Nowinski, who is the lead lab lead at Epsilon. He is chairing that track. The next track we have is Shiny and enterprise. I dare say, Mike, you might know a little bit about that as do I a little bit. That is how Shiny is being used to transform and shape outcomes in the business sector.
So going beyond analytics, looking at enhancing efficiency, helping decision making, and elevating these data analytic processes. Lots of great material there, I'm sure. And that is being chaired by Maria Gruschick who is senior delivery manager at Absalon. And this one hits a little close to home. This is the Shiny Life Sciences track because Shiny has been big in pharma and and health in general for quite a few years now. This track is being chaired by yours truly here, and we're looking for application or talks that highlight ways that Shiny has been driving insights, enhancing drug development, enhancing collaboration within life sciences. And I dare say there's been a lot discussed in this field for quite a few years, but there's no shortage of new innovations happening here.
And then lastly, we got the shiny for good track looking at ways as shiny as being used to help make positive impacts to the communities around the world for society, really looking at how they are helping these initiatives out there. And this is being chaired by good friend, John Harmon. This is really important to see where Shiny can be used to help social impact, driving positive change, really helping the diverse communities all around the world supercharge their efforts. And I'm being more detailed about these tracks because we have calls for talks ongoing. We have until February 4th to send your submission for our talk, and the submission form will be linked in the show notes as well. So I know I speak probably on behalf of the other leaders of these tracks. We're looking for really exciting talks in this space, and don't ever feel like you have to be this huge pro at shiny to give an awesome talk. Really, I've seen some amazing talks from people just getting new to Shiny, but using it in an innovative way that is totally unexpected, but yet it's really helping their efforts. So really encourage you. If you've been using Shiny to help innovate your workflows.
Definitely send a proposal. We'd love to see it. And definitely get registered for early bird registration because this conference has been quite popular over the years, and I don't see that changing anytime soon.
[00:32:55] Mike Thomas:
Well, I'm super excited for this conference again this year, Eric. I think I've been attending it ever since they hosted the first one, maybe 3 years ago now at this point, something like that. And it's it's one of my favorites, obviously. We don't hide it very well in this podcast that we love Shiny, and I am thrilled to see what's put together thus far across the different tracks. Thrilled to see you up there, Eric. I think the Shiny in life sciences will get a ton of buzz. We're seeing that space grow and grow and grow across our own client base, and I don't think, across the rest of the world is any exception as well. So I've purchased early bird tickets for our team, and I finally just began the submission process for a shiny for good app showcase so I'm going to finish that up today see if I can push that through see if see if maybe it makes the cut But mostly, I'm excited to see what everybody else has to offer for this conference. So no reason not to tune in. Check it out. It's free for students. It's it's only a few dollars, for everybody else, and it's absolutely worthwhile if you are somebody interested in Shiny, doing Shiny, beginner, intermediate, advanced. Doesn't make a difference. You will get something out of this conference.
[00:34:14] Eric Nantz:
You sure will. And that's a really exciting point, Mike, because, now on top of talks themselves, we love these app showcases. You've done that before. We have a great app before, and it's it's really great ways to demonstrate where Shiny is being used in practice. So, yeah, we highly encourage you to sign up for it. And, also, like I said, if you wanna share your knowledge, share ways that Shiny has been brought innovation in your work. Yeah. We love to hear about it. And with these four tracks, we think we have something for everybody here. So there no matter which industry you're representing, no matter which part of academia you're a part of or any other research or community effort, we'd love to hear about it. And I'm really looking forward to reviewing these talk proposals in a in a few weeks. And judging by what happened last year, both John and I had a very hard time narrowing down, you know, which ones made the cut because there was a lot of great submissions last year. And I expect this to be exactly the same and really looking forward to working with the Appsilon team on helping organize this as we get closer to the conference days. And, yeah, should be a lot of fun.
Speaking of a lot of fun, folks, the rest of the issue does have a lot of fun for you to to look at with leveling up your our knowledge and innovations, what's happening in the world of data science and respect the package development, you know, tutorials and whatnot. And we'll take a couple minutes to talk about our additional finds here. I'm going pretty niche on this, but it's a very important niche, especially for someone I work with quite closely. You've heard me, speak the praises of what Will Landau has been doing with the targets ecosystem and more lately, the crew package for batch processing, asynchronous processing in your ecosystem.
And that is standing on the shoulders of 2 very important packages in your ecosystem, MirrorEye and NanoNext, which have just been updated on CRAN with some very important updates in this space with respect to where Will wants to take the crew package down the road. And in particular, the latest update for Mirai is now handling much more gracefully situations when someone needs to terminate a running job for whatever reason. There are some enhancements to the daemon behind the scenes to help make that a lot more elegant, a lot more graceful than in times past.
And this is very helpful as you think about the ways that batch processing can be launched on other back ends. I'm looking at you, AWS. That's one of them. We got our eyes on quite a bit. And the associated package, nano next, is also kind of the system library that Mirai is based on. That also has some important updates as well. But, again, these were very important updates for what Will is trying to do with the crew package down the road. So he was he was telling me in my ear last week that, yeah, he's really looking forward to these updates, and he's got some big plans now that now these have hit. So really, big thanks to Charlie Gao, who's the maintainer of these packages.
Really, really excited to see these updates here. Micah, what did you find?
[00:37:27] Mike Thomas:
I found a pretty cool, also niche blog post on something that I hadn't really seen discussed very much before, and it's called Security Headers for Shiny Applications. It's a jumping rivers post, I think, specifically authored by Colin Gillespie. And it's all about essentially profiling the security on the server or or your posit setup, wherever your Shiny apps are deployed. There are some functions from a package called server headers that allow you to sort of check the security around that server, such as SSL status, redirects, referrer policies, all sorts of things like that. So if you are someone interested in, information security around your Shiny apps, and may perhaps you're working with your IT team to host Shiny apps or deploy those Shiny apps on some, local or cloud based server, I think it might be of interest for you to to take a look at this blog post, because there's probably not a lot of other content out there that might be beneficial, you know, for your IT team to sort of understand, how Shiny apps are are hosted and deployed on a server and maybe the different security things that go along with securing that server in particular. So really cool one from Jumping Rivers, nice and short and sweet, and check it out.
[00:38:48] Eric Nantz:
Yeah. Excellent find. And, you know, as Shiny, it obviously takes more, you know, to has some more uptake in the industry as a whole, a lot of times, IT groups are are getting more familiar, especially on the the teams of security, on making sure that authors of Shiny apps are following best practices and whatnot. This might very well help those that are deploying Shiny space server products in their organizations to have a little have a little preview of what's being exposed under the hood. So, yeah, certainly great great to see that space. It's great to see developments from jumping rivers in that space as well. And certainly speaking of, really loving to hear back, we'd love to hear back from all of you and your feedback. And we got a couple somewhat indirect feedback pieces to share. One direct that literally just came as they were recording this.
But, you if you listened to last week's episode, Mike and I had some, I would say quite candid thoughts on the situation that Posit's found itself in and particularly Eway Cia's recent situation. We're gonna put a quick plug to and a shout out to Matt Dre in his recent blog post. He has basically a huge appreciation for what he was done for the work he does in in his day job at the UK government and public sector. But he gave a little shout out to to me and Mike here about where we about our discussion about heat waves, for it. So thanks, Matt, for for, putting that in your blog post. We'll link to that in the show notes as well. And literally, Mike, late breaking feedback. It's almost as if he's psychic. But, John Harmon, we just mentioned, just shot me a note that with respect to APIs, which you touched on the first highlight here, he is writing a book about using APIs from r.
And we'll have a link to that in the show notes. It's, wapit. Io. We will link to that in the show notes. So thank you, John, for reminding me. I knew you're you're hard at work at that. I didn't realize how far along it was. So if you're leveling up your API now, it's, there's your chance.
[00:40:53] Mike Thomas:
That's awesome. I totally forgot. I think John had been working on some sort of like one size fits all package or project for, you know, one particular r package that could wrap any API essentially and and do it in a fairly agnostic way. I I don't know where that stands or or if I'm remembering that incorrectly and it's it's more about the book, but I am very excited to read that.
[00:41:20] Eric Nantz:
Yeah. You're exactly right. He is definitely working in that space. That package you're referring to is called beekeeper. Really fun package in this space because, hey, if anything can give you that, you know, what we like to call the use this or dev tools like setup to wrap these API APIs in the packages, I think beekeeper is gonna be a great, great way to do that. So I'm I'll double check how far along it is. We'll link to it in the show notes regardless. But he's been hard at work on that, I believe, ever since he received a grant from the r consortium on this API development work recently. So, yeah, John, thanks for that, real time feedback. You're you're lucky I had that that page open as we were recording. I didn't realize that was coming through. So, yep, APIs. It's a great time being APIs with our, I'll just say that, with what John's doing and and great tutorials from Alyssa and whatnot.
So, of course, we love hearing from you as well. Wherever you are in the world, we have various ways of doing that. You can get in touch with us on our contact page, which is linked directly in the show notes for each and every episode. Also, we love to get your contributions to the rweekly project via a poll request of, say, a new blog post, new package, a new tutorial, and whatnot. All the details are at rweekly.org. We we love to hear that. We love to see that. All the curators really appreciate it when the community helps step up as well. And so we're looking for curators to join our team. Again, information on that is at rweekly.org and our GitHub repository.
We're trying to make things easier for us, but the best thing we could have is more people to help us with it. So if you're interested at all and you're passionate about this space, it would be a great time to reach out to us. And, also, if you wanna reach out to us on one of those fancy new podcast apps that you've downloaded, like Podverse, Fountain, CurioCast, or whatnot, they're all supporting the boost technology, and that's an easy way for you to send us a message directly in the show and have a little fun along the way. You can find complete details on that in the show notes, and we are proudly linked on the podcast index page where you can boost directly from there as well. Again, I wrote a little package around its API, and I got more stuff in store for that stuff coming up soon. So stay tuned. Maybe some more our content for this very show.
Talk about meta. Right? Our content about a podcast to talk about on a podcast. That doesn't make a head spin. I don't know what those.
[00:43:49] Mike Thomas:
Inception.
[00:43:50] Eric Nantz:
Inception overload. Yep. And, but, yeah, we'd love to hear from you. And, definitely, you can get in touch with us on social medias as well. You'll find me mostly on Mastodon these days where I'm at our podcast, at podcast NSF social. Very sporadically on the x thingy, but also on LinkedIn from time to time. And, Mike, where can the listeners find you?
[00:44:12] Mike Thomas:
Yeah. Probably on LinkedIn primarily. I think my handle there is Michael j Thomas 2, or you can search Catch Brook Analytics, k e t c h b r o o k, to find me there. Or if you wanna find me on Mastodon, I am at [email protected].
[00:44:32] Eric Nantz:
Very nice, Mike. Well, anyway, we will close-up shop here for episode 148, and we will be back with another new episode next week.
Hello, friends. We are back at episode a 148 of the R Weekly highlights podcast. And coming to you from our respective, frigid areas here in the US, where we hope we can heat you up a little bit with some fun, our content, as always, coming straight from the latest issue on ourweekly.org. My name is Eric Nantz, and I'm delighted that you join us wherever you are around the world. And keeping warm in his abode there is my awesome cohost, Mike Thomas. Mike, how are you doing this morning?
[00:00:29] Mike Thomas:
Doing great, Eric. Go Lions. How about that? Go
[00:00:33] Eric Nantz:
Lions. For those that aren't aware, the the Detroit Lions have had a, bit of a struggle in really doing anything successful for many, many, and I do mean many years in the football landscape, but they won their 1st playoff game in 31 years, folks. That's a long time. I was, I'm not gonna date myself too much. Well, let's just say I was quite younger back then. And it was, yeah. Who knew that it would take that long to get back there? But the the Ford field was rocking. And as a Michigander all my life, it was, I could see why fans are crying in the sands. That was a moment, folks, and they're not stopping. They got another game this weekend, so we'll see what happens.
[00:01:13] Mike Thomas:
Keep it rolling.
[00:01:15] Eric Nantz:
Keep it rolling, baby. And we're gonna keep this podcast rolling as well because we got another awesome issue to talk about that's curated by the esteemed Colin Fay. By this point, you know who he is if you listen to the show just a little bit. For those who aren't aware, he is at ThinkR, and he does awesome art packages in the shiny space such as golem, which we use quite a bit in our day to day. But as always, he had tremendous help from our fellow our weekly team members and contributors like all of you around the world with your awesome poll requests and suggestions. And first, on our highlights today, as we told you many times before, it is a new age, so to speak, in computing, and gone are the days where you have to rely on just getting your data from CSVs in a random place all the time or having to deal with other proprietary platforms or services. Now there is the wonder of APIs for you to access these services programmatically.
And our first highlight is a great tutorial on a recent refresh, if you will, of a very important package in this space of using R to call these APIs very quickly and efficiently. And in particular, Melissa Van Basso, who is an associate statistician at Statistics Canada, and she makes a lot of our videos about our programming and statistics. And that's literally one of her taglines in her channel called g g not. And if you haven't bookmarked it, you should because she pumps out a lot of terrific content on a very regular basis.
Very inspiring. Her latest video is an aforementioned tutorial, quick but straight to the point, practical tutorial on working with APIs using h t t r 2. And she sets the stage by putting on some nice analogies about how APIs with respect to security works because most of the time, these APIs, yeah, they may technically be free to use and some are not, but one way or another, you need to authenticate to them in some way, shape, or form. This can be very confusing to people, but she walks through 2 examples. 1, using OpenAI's API for, you guessed it, an image generation, request, but also something that I hope gets more spotlight in, in the our ecosystem these days is the API for GitLab.
For those that aren't aware, GitLab is somewhat analogous to GitHub, only it is free and open source, at least open core. And a lot of people are turning to that to self host their version control repositories. And in fact, many organizations use that as well within their firewalls that give them that robust Git, like, hosting platform but under their control. But they have an API as well. So she walks through 2 examples, again, using those respective APIs and how to authenticate to them with h t t r 2. And this is where you will have to inject some authorization magic, but there is a function in h t t r 2 to do just that.
But it is interesting that she selected 2 examples because not every company behind these APIs is gonna have the exact same syntax for authentication. And, in fact, these two services do require slightly different request language or request structure in that authorization header, if you will. And the good news is this video does have an associated GitHub repo where she walks through the, example very clearly, and you can quickly get a get a glance at it. It's only about 50 lines or so, but you can see the different headers that she has to inject in these various APIs.
Now the best situation, of course, is if there is an r package that actually wraps this API that you're interested in. She's very upfront with the fact that in real world usage, you might wanna leverage that particular package instead of building something up yourself. But, again, this is a tutorial for how h t t r two works. So it's really great to see these, this example here. And, honestly, once you get the authentication down, that's kinda like more than half the battle, so to speak. And trust me, I've been there. I've had some wicked wars of authentication in the past. But at that point, the other interesting nuance between these examples is the type of request that you're about to send.
With respect to the GitLab API, she's interested in grabbing issue summaries, and that is facilitated by what we call a Git request. You're not really putting anything else in your request kind of transmit to the API service other than a various parameter or set of parameters in the URL of that actual request. Whereas, for the OpenAI example, she actually has to do what's called a post request, which is saying that you, as a submitter of that request, have to tell the API something about what you want or supply some important information. And in this case, it's the prompt of what kind of image she wants to generate.
And, of course, we love animals here on this podcast. So she has a prompt of acute baby sea otter, insert penguins or whatever your favorite animal is. You can probably do that too. But that has to be a post request. That's not through the URL itself. So, again, most of these APIs will have documentation, some may be better than others, on how to handle these requests and whether it's a get request or a post request. But oftentimes, when you're kinda like doing a query of what's out there, most of the time, that's gonna be a post request of some sort. But in the end, once you get the results back, you're gonna get some nice, maybe not so nice, list of the results.
Often, it's being compiled from JSON from the API itself. An h t r two will have a friendly wrapper to say, okay. This is a re a request coming back in JSON format, but I'm gonna translate that back to a list. And then it's up to you to wrangle that list afterwards. So that's more of an exercise for you to play with at the end here, but she does show a couple of examples of how you can subset this nested list for the various parameters like the title of that issue or milestone or other information such as the URL of that image that's being generated from OpenAI.
That's where there are other packages in the our ecosystem that can definitely help with wrangling lists. Mike and I love the per package for a lot of these situations. There are other interesting ones where it turns a nested list into a nested data frame. I've seen that mentioned in the past. There's lots of ways to post process this. But, again, half the battle is just getting authenticated to this and then leveraging h t t r two's new pipeable syntax to kind of build this step by step, the request process as a whole. So if you're new to it, definitely start with this package. HTTR itself came before it, and I used it extensively back in the day. But if you're comfortable with the tidyverse, you're comfortable with pipeline processing, this is gonna be a very nice fit for you as you get involved in this landscape.
And I can speak as a package author, albeit a very, low key package, that h t t r 2 was very easy to work with. My package called pod index r, which is interfacing the podcast 2.0 API from r, leverages h t t r 2 under the hood. So I did authentication via the mechanisms that she talks about here. I do want to mention one thing, though. Never ever put your authentication keys in your script itself. And this is obviously a very brief example, but in real practice, environment variables are your friends here. So definitely take a look at that. That's also documented in the h t t r two's package Vignettes if you're curious about how that lingo works. But one thing that trips a lot of people up at the day job, if you're updating your environment variables, maybe you generated a fresh token for that service or whatnot.
You've gotta restart that hour session first because it will not take effect until you do, and I've had more than a few calls, a few messages on our teams at work of, I changed my GitHub API, PA 2, and it's not working. Help. And I'm like, did you restart your session? Oh, so don't just just it it happens, folks. It happens to the best of us. And, yes, it's happened to me even at this, experience level of APIs that just trips you up, especially the AWS ones. I'm gonna be starting on that. But, nonetheless, this was an awesome straight to the point tutorial. It's an easy watch, maybe 15 minutes at the most. And Melissa has a bunch of other terrific tutorials on his on her channel, so definitely have a look at that.
[00:10:16] Mike Thomas:
Yeah. This was probably my first, that I can remember introduction to Melissa, and she does a phenomenal job, like you said, Eric, in this quick nice 15 minute YouTube post about how to work with the new h t t r two package and and I do really like the the beauty of the pipeable syntax as you sort of build up either this get or post request and then finally execute that. And, yeah, I just can't speak highly enough about how well, Melissa really articulates every step of the process. You know, why she's writing the code that she is, particular syntax, things that you can get hung up on such as having to to quote, her back tick essentially different pieces of the, the the request that you are sending to make sure that, you know, our isn't, unable to to find certain objects because you're not quoting those and things like that. She she does a really nice job better than I could ever, explaining exactly how to build up these get and post requests using h t t r 2. I'm really thrilled that we have the h t two h t t r 2 package, now out and available and battle tested.
So I I would highly recommend folks who have been using h t t r, to to take a look and see if it makes sense to switch over to h t t r 2. I think you'll find some gains in efficiencies, some gains in, just sort of the the syntax style and things like that that might make your life a little bit easier and I think you know a big key to these packages is they help developers as well create our packages that serve as wrappers to API's right that make everybody's life easier so if you're somebody that, you know, has an API out there that you really wanna create an R package around to make other people's life easier interacting with that that data source or whatever that API serves, maybe the h t t r two package will help you do that more easily.
I believe in the past with h t t r, there have been vignettes and articles and things like that on how to develop in our package that wraps an API. So I'd be curious to see. I haven't haven't checked, but maybe we can put it in the show notes to see if there's sort of an updated version of that documentation using the h t t r two package, for wrapping your favorite API. But, again, a great walk through. Really nice examples here. 1 with a get request and one with a post request that sort of run the gamut of all the different types of of APIs that you may be working with. So can't speak highly enough about Melissa. If you're interested in taking a look at some of her other content, she has her own website atmelissavambusil.com.
So check it out.
[00:13:09] Eric Nantz:
Yeah. And, yeah. Follow-up to your quick question there. Yes. H t t r two does have a vignette exactly tailored to wrapping API. So definitely wonderful reading. I've read it literally 4 or 5 times as I was writing my little pod index r package, to to handle this. So it's very thorough, very, straightforward. And again, touches on those those nitty gritties like authentication and managing managing those effectively. But it's got two examples using the New York Times API for books as well as GitHub just API. So again, it's great to have 2 different examples because it's almost like no way no 2 APIs do things similarly. There's always some little minor differences here and there. And we're definitely seeing that now with HTTR 2 recently, celebrating its 1 dot o release, another, I think, reason why Melissa made this video. This is kind of the unofficial or somewhat official signal that this, like you said, is is tested by many people. It's ready to go and to augment your API workflows.
We're seeing some other packages in this kinda ecosystem area of API, you know, linking, wrangling, and now testing that are basing their work on HTTR 2 as well. So it's definitely becoming your go to, I think, for a lot of the API, operations in r itself. And I'd imagine we're gonna see more packages in the ecosystem start to wrap this, more fully as they, you know, find more APIs that just haven't been helped by the community just yet. So, yeah, wonderful tutorial, and it was a thrill to meet Melissa in person at deposit conf, back in in the fall last year. Yeah. She very personable and very humble and, yeah, really great to to see her turn through this terrific content. And there we say, we we hope you keep it up. And, there was even I remember looking at her LinkedIn post announcing this video.
Someone had the request. Hey. Have you ever thought about doing a live stream of your live coding? She sounds like she's not saying no to it. But, Melissa, if you're listening, if you want a buddy to help you along that, wink wink, I'll just say that.
[00:15:20] Mike Thomas:
Who knows? Who knows? And to double down on your best practices, Eric, put your API keys as environment variables in a dotrenvironment file and git ignore that thing immediately.
[00:15:32] Eric Nantz:
Immediately, folks. Yep. Because, you heard my rant maybe a year and a half ago. Somebody did not do that, and we were, dinged pretty badly at the the tape shop security group when they discovered that. So, yeah, you gotta be careful there, folks. Gotta be careful. Well, Mike, we were just saying how things are becoming more normal for us as we're getting, you know, the the 2024 season of our weekly highlights up and running. Well, one thing we didn't really have as much last time around was a great post around visualizations, and sure enough, that that's been normalized to this week, if you will, because friend of the show, Albert Rapp, is back to the highlights and for his first contribution to 2024 where he has both a blog post and an accompanying video talking about 5 of his favorite ggplot 2 extensions.
As we mentioned many times in highlights before, ggplot 2 is not just about gg ggplot 2, the package itself. Because of the extension system that it introduced a few years ago, now the community can take ggplot 2's functionality and supercharge it in many, and I do mean many different ways. And this roundup of extensions is a great tour de force to just see what it exactly is capable of. And the blog post is quite visual as you would expect, so we'll do our best to summarize it here. But right off the bat, one easy win for you as you think about annotations in your plots, as you think about formatting maybe your subtitles or your titles or access labels or whatnot, have a look at the g g text package.
This is one that has been mentioned in previous highlights before. This is authored by Klaus Wilk. We'll have a link to all these packages in the in the show notes as well. But this is a very quick way for you to augment that existing text that you want to put on your plot with HTML syntax or markdown syntax. So you're living the quartile lifestyle, the Rmarkdown lifestyle, or maybe your Shiny app styling. You can do that same kind of thing in ggplot2 as well. Ggtext just does this very well, very elegantly. And if you're if you're comfortable with markdown, which many people are these days, it is a terrific fit for you on on your ggplot2 builds as well. And with a low HTML knowledge, the sky's the limit for what you can do in these annotations, in these textual representations.
So must have, I would say, as you think about getting those plots in a more publication ready state. Speaking of multiple plots, one thorn in my side many, many years early in my g g file 2 exploits was the fact that, you know, I had these two plots. Maybe they were they were talking about the same domain, the same type of data, but they were completely different. But yet I wanted to compose them in such a way to arrange them so they fit on a single page or whatnot. I've had a lot of battles with grid dot draw and other situations like this, but Patchwork, the r package by Thomas Lynn Peterson, software engineer at posit, is a terrific way to take almost any type of ggplot and compose multiple ones together using a very intuitive, you know, syntax that's native to ggplot2 itself with the plus operator. Just kind of combining the 2, you can stack them up with the the the slice or the fraction operator if you want, but there's a lot more customizations to say take one facet and make it big wide, maybe 2 plots below that that are sharing the space equally between each other.
This has been asked for me at the day job to help bring recommendations to this because oftentimes we'll have, like I said, these plots that are doing kind of different things, but yet using the same data, and they tell kind of different stories. So having in patchwork is so helpful to just customize a layout without a lot of fuss around it. So very, very helpful if you're in that situation like I've been many years ago. I'm having a lot of flashbacks to parmfrow,
[00:19:54] Mike Thomas:
which I Dude.
[00:19:55] Eric Nantz:
Oh, dude. Yes. Many, many. My dissertation was full of that. Yes. It was a nightmare to debug. Lot of college flashbacks for me. Yep. Yep. We didn't we didn't expect that. But every time we do this show, we always have flashbacks of some sort. Just didn't expect that one. But, moving on to more pleasant memories or things I wish I had known about before, Sometimes you wanna really get, you know, customizable with the types of patterns that you wanna put in the geomes that you surface in these plots. Maybe a gradient or maybe a little fun like symbol or or an image that you wanna fasten into a bar chart like setup.
The next package that Albert highlights is gg pattern. Gg pattern is authored by Mike FC. You probably know him as cool but useless on the various social spheres. And this is a very excellent package that lets you simply figure, specify either geometric or image type patterns to fill in your various geomes such as bar charts, such as, you know, line charts or things like that. And then Albert, in his example here on The Post, has a fun little representation of coffee bean, quantities, for for different countries in South America by using a little coffee icon in this waffle chart type setup.
That was really interesting, the things you can do with ggpatterns. So, again, this might be great for those of you who are trying to build infographic type setups or ggplot. This might be a great fit for you. And, again, combine that with things like ggtext, the sky's the limit once again. And then the next one we have here is kind of a potpourri or a collection of kind of utility type extensions, and this is off this is called ggforce, offered by the aforementioned Thomas Lynn Peterson. He has been in the ggplot2 game for many years.
And this package, I believe, came out not too long after the extension kind of paradigm or system was introduced in ggplot2. So ggforce lets you do a whole bunch of random type geomes that maybe are not quite the same kind of design choices as someone like Hadley has thought about for ggplot2. But if you wanna create bars like a bar chart with an arc or a circle geom, which is great for obviously things like pie charts or donut charts and the like, there's lots of interesting, geoms you can augment in your existing visualizations.
And ggforce has a whole bunch more. But again, to Albert's credit, he's got a fun little tutorial linked in the same blog post. And, he created donut charts and pie charts with gg4s. Again, lots of opportunities to combine this and really tailored, again, maybe for that infographic type setup with the alternative geoms that it offers. And last but certainly not least, we've got bump charts, which are becoming a lot more common these days as I look at visualizations, and that is offered by the gg bump package that is authored by David Sjoberg, and we'll have a link again to all these packages in the show notes. This is another great utility type ggplot2 extension.
Does one thing, does it well. And his example that Albert puts in here is looking at flight tracking for European flights across various countries and the trends that you see over time. And it's very easy to see kind of the performance or you might say the launch demo profile of these. And, again, I don't do a lot of these in my day to day job, but I think this is still something that you might be able to augment pretty nicely with another package like gghighlight to really fasten in on one particular country's, trend in flight patterns or flight rankings as well.
That again, that's just 5 extensions in this massive ecosystem of ggplot2. There's there's just so much to choose from. Albert does a great job of giving you 5 quick hits that I think can augment your visualizations very well in your day to day work. And he's got links to other areas where he's put these in practice. So he's he's been doing a lot in this space. We we met Albert, at at PasaConf, and he has turned around the visualization content quite a bit. He's very excited about it, and I believe he even has a short course that he's authored as well. So definitely be on the lookout for that as well.
[00:24:47] Mike Thomas:
Yeah. I really enjoy these, you know, sort of digestible visualization posts from Albert. And I guess 2 things that really stood out to me, you know, as as someone who has to provide clients with a lot of deliverables, you know, especially non technical folks at the end of the day, is the text customization in in gg text, you know, allowing you to write HTML essentially inside your string and to be able to to bold text, to to change the color of text, things like that on your your charts, I think, goes a long way towards communicating really the central idea around your data and the visualization you've created and what you are trying to, convey to the end audience. And then the other the other one that really stands out to me for very similar reasons is gonna be the g g highlight package as well, which, admittedly, I haven't used enough, but it it's incredibly simple in terms of the syntax that you can use to highlight a particular element of your chart. On this bump chart that Albert has created, you know, the the first argument in that is a dplyr filter kind of like syntax, where he's he's saying state, double equal sign, United Kingdom, because the line for the United Kingdom's flights is the one that he wants to highlight in green, and all of the other ones are going to be sort of in this in this soft gray in the background.
And it's really 1 or 2 lines of code to be able to do that and highlight this particular line and set all the others to this background gray color. And it stands out so beautifully on the chart, and it it really demonstrates, you know, the the key concept that Albert's trying to display, which is is show the end user, the UK's trend from 2016 to 22 of incoming and outgoing flights. And if the end audience wants to also look at the data for the other 5 countries in this chart, they can because it's there. It's just sort of abstracted a little bit into the background, to make the point and make the readers focus, on the United Kingdom.
So really cool, blog post by Albert. He always does a great job including not only the the charts and his rationale behind them, but also the code behind everything. I recently had a use case where I wanted to essentially take the I had a, flipped axis chart, and I wanted to take the values on the x axis and put them within the bars. And the first place that I looked was a on Albert's website. And, of course, I came across a blog post where he was doing exactly that. And it made my plot a little bit bigger because I was able to sort of exclude the x axis itself and put those values right on the bars, so they really stand out to the end user, and they don't have to sort of line up, the bar width to the corresponding x axis value. They can just see it right at the end of the bar.
And, it it was all thanks to Albert who made my life really easy in order to be able to accomplish that. So thanks to him again for continuing to churn out this great visualization content and expecting more of the same in in 2024.
[00:28:01] Eric Nantz:
Yeah. I think the a lot of these visuals you see here would fit really nicely if you're making any kind of business intelligence dashboard setup or other content where you gotta push the envelope a little bit, after that standard type of visualization. I can see this, this set being quite valuable in in this space. And, yeah, the syntax to to wrangle these packages are all doing a terrific job of if you're familiar with jgplot2, you're gonna feel right at home in putting these geoms in practice. So that user experience from a, you know, a content, you know, creator standpoint of graphs, you wanna make sure you're not, like, content shifting so much as you use these alternative geoms. So I think this is this is a great showcase of if you're comfortable with this language, you're gonna you're gonna feel right at home with the various extensions that you can push here. And, man, that g g text package, though, that is such an underrated gem in this space. I can't believe I didn't use this sooner, but better late than never.
[00:29:01] Mike Thomas:
Same here.
[00:29:04] Eric Nantz:
Yep. And one thing we don't want you to be weighed about, our last highlight is is more of a friendly call to action here because you all know Mike and I are fans of the shiny ecosystem. We talk about quite a bit on this very show and our other endeavors. And, yes, the shiny conference for 2024 is coming up this April, April 17th through 19th. And like years before, it is all virtual, but it is definitely expanding the footprint, so to speak, with not 1, not 2, not 3, but 4 exciting tracks of talk. And, of course, first off is that the early bird registration is open, so we'll have links to the registration page in the show notes to get you get your early bird tickets available there.
But in the aforementioned tracks, we have 4 tracks that you're gonna be learning about. One of them is the shiny innovation hub, and this is really looking at what are the latest developments, best practices, and creative uses of Shiny within the ecosystem itself using very novel approaches for problem solving. And that is being, chaired by Jacob Nowinski, who is the lead lab lead at Epsilon. He is chairing that track. The next track we have is Shiny and enterprise. I dare say, Mike, you might know a little bit about that as do I a little bit. That is how Shiny is being used to transform and shape outcomes in the business sector.
So going beyond analytics, looking at enhancing efficiency, helping decision making, and elevating these data analytic processes. Lots of great material there, I'm sure. And that is being chaired by Maria Gruschick who is senior delivery manager at Absalon. And this one hits a little close to home. This is the Shiny Life Sciences track because Shiny has been big in pharma and and health in general for quite a few years now. This track is being chaired by yours truly here, and we're looking for application or talks that highlight ways that Shiny has been driving insights, enhancing drug development, enhancing collaboration within life sciences. And I dare say there's been a lot discussed in this field for quite a few years, but there's no shortage of new innovations happening here.
And then lastly, we got the shiny for good track looking at ways as shiny as being used to help make positive impacts to the communities around the world for society, really looking at how they are helping these initiatives out there. And this is being chaired by good friend, John Harmon. This is really important to see where Shiny can be used to help social impact, driving positive change, really helping the diverse communities all around the world supercharge their efforts. And I'm being more detailed about these tracks because we have calls for talks ongoing. We have until February 4th to send your submission for our talk, and the submission form will be linked in the show notes as well. So I know I speak probably on behalf of the other leaders of these tracks. We're looking for really exciting talks in this space, and don't ever feel like you have to be this huge pro at shiny to give an awesome talk. Really, I've seen some amazing talks from people just getting new to Shiny, but using it in an innovative way that is totally unexpected, but yet it's really helping their efforts. So really encourage you. If you've been using Shiny to help innovate your workflows.
Definitely send a proposal. We'd love to see it. And definitely get registered for early bird registration because this conference has been quite popular over the years, and I don't see that changing anytime soon.
[00:32:55] Mike Thomas:
Well, I'm super excited for this conference again this year, Eric. I think I've been attending it ever since they hosted the first one, maybe 3 years ago now at this point, something like that. And it's it's one of my favorites, obviously. We don't hide it very well in this podcast that we love Shiny, and I am thrilled to see what's put together thus far across the different tracks. Thrilled to see you up there, Eric. I think the Shiny in life sciences will get a ton of buzz. We're seeing that space grow and grow and grow across our own client base, and I don't think, across the rest of the world is any exception as well. So I've purchased early bird tickets for our team, and I finally just began the submission process for a shiny for good app showcase so I'm going to finish that up today see if I can push that through see if see if maybe it makes the cut But mostly, I'm excited to see what everybody else has to offer for this conference. So no reason not to tune in. Check it out. It's free for students. It's it's only a few dollars, for everybody else, and it's absolutely worthwhile if you are somebody interested in Shiny, doing Shiny, beginner, intermediate, advanced. Doesn't make a difference. You will get something out of this conference.
[00:34:14] Eric Nantz:
You sure will. And that's a really exciting point, Mike, because, now on top of talks themselves, we love these app showcases. You've done that before. We have a great app before, and it's it's really great ways to demonstrate where Shiny is being used in practice. So, yeah, we highly encourage you to sign up for it. And, also, like I said, if you wanna share your knowledge, share ways that Shiny has been brought innovation in your work. Yeah. We love to hear about it. And with these four tracks, we think we have something for everybody here. So there no matter which industry you're representing, no matter which part of academia you're a part of or any other research or community effort, we'd love to hear about it. And I'm really looking forward to reviewing these talk proposals in a in a few weeks. And judging by what happened last year, both John and I had a very hard time narrowing down, you know, which ones made the cut because there was a lot of great submissions last year. And I expect this to be exactly the same and really looking forward to working with the Appsilon team on helping organize this as we get closer to the conference days. And, yeah, should be a lot of fun.
Speaking of a lot of fun, folks, the rest of the issue does have a lot of fun for you to to look at with leveling up your our knowledge and innovations, what's happening in the world of data science and respect the package development, you know, tutorials and whatnot. And we'll take a couple minutes to talk about our additional finds here. I'm going pretty niche on this, but it's a very important niche, especially for someone I work with quite closely. You've heard me, speak the praises of what Will Landau has been doing with the targets ecosystem and more lately, the crew package for batch processing, asynchronous processing in your ecosystem.
And that is standing on the shoulders of 2 very important packages in your ecosystem, MirrorEye and NanoNext, which have just been updated on CRAN with some very important updates in this space with respect to where Will wants to take the crew package down the road. And in particular, the latest update for Mirai is now handling much more gracefully situations when someone needs to terminate a running job for whatever reason. There are some enhancements to the daemon behind the scenes to help make that a lot more elegant, a lot more graceful than in times past.
And this is very helpful as you think about the ways that batch processing can be launched on other back ends. I'm looking at you, AWS. That's one of them. We got our eyes on quite a bit. And the associated package, nano next, is also kind of the system library that Mirai is based on. That also has some important updates as well. But, again, these were very important updates for what Will is trying to do with the crew package down the road. So he was he was telling me in my ear last week that, yeah, he's really looking forward to these updates, and he's got some big plans now that now these have hit. So really, big thanks to Charlie Gao, who's the maintainer of these packages.
Really, really excited to see these updates here. Micah, what did you find?
[00:37:27] Mike Thomas:
I found a pretty cool, also niche blog post on something that I hadn't really seen discussed very much before, and it's called Security Headers for Shiny Applications. It's a jumping rivers post, I think, specifically authored by Colin Gillespie. And it's all about essentially profiling the security on the server or or your posit setup, wherever your Shiny apps are deployed. There are some functions from a package called server headers that allow you to sort of check the security around that server, such as SSL status, redirects, referrer policies, all sorts of things like that. So if you are someone interested in, information security around your Shiny apps, and may perhaps you're working with your IT team to host Shiny apps or deploy those Shiny apps on some, local or cloud based server, I think it might be of interest for you to to take a look at this blog post, because there's probably not a lot of other content out there that might be beneficial, you know, for your IT team to sort of understand, how Shiny apps are are hosted and deployed on a server and maybe the different security things that go along with securing that server in particular. So really cool one from Jumping Rivers, nice and short and sweet, and check it out.
[00:38:48] Eric Nantz:
Yeah. Excellent find. And, you know, as Shiny, it obviously takes more, you know, to has some more uptake in the industry as a whole, a lot of times, IT groups are are getting more familiar, especially on the the teams of security, on making sure that authors of Shiny apps are following best practices and whatnot. This might very well help those that are deploying Shiny space server products in their organizations to have a little have a little preview of what's being exposed under the hood. So, yeah, certainly great great to see that space. It's great to see developments from jumping rivers in that space as well. And certainly speaking of, really loving to hear back, we'd love to hear back from all of you and your feedback. And we got a couple somewhat indirect feedback pieces to share. One direct that literally just came as they were recording this.
But, you if you listened to last week's episode, Mike and I had some, I would say quite candid thoughts on the situation that Posit's found itself in and particularly Eway Cia's recent situation. We're gonna put a quick plug to and a shout out to Matt Dre in his recent blog post. He has basically a huge appreciation for what he was done for the work he does in in his day job at the UK government and public sector. But he gave a little shout out to to me and Mike here about where we about our discussion about heat waves, for it. So thanks, Matt, for for, putting that in your blog post. We'll link to that in the show notes as well. And literally, Mike, late breaking feedback. It's almost as if he's psychic. But, John Harmon, we just mentioned, just shot me a note that with respect to APIs, which you touched on the first highlight here, he is writing a book about using APIs from r.
And we'll have a link to that in the show notes. It's, wapit. Io. We will link to that in the show notes. So thank you, John, for reminding me. I knew you're you're hard at work at that. I didn't realize how far along it was. So if you're leveling up your API now, it's, there's your chance.
[00:40:53] Mike Thomas:
That's awesome. I totally forgot. I think John had been working on some sort of like one size fits all package or project for, you know, one particular r package that could wrap any API essentially and and do it in a fairly agnostic way. I I don't know where that stands or or if I'm remembering that incorrectly and it's it's more about the book, but I am very excited to read that.
[00:41:20] Eric Nantz:
Yeah. You're exactly right. He is definitely working in that space. That package you're referring to is called beekeeper. Really fun package in this space because, hey, if anything can give you that, you know, what we like to call the use this or dev tools like setup to wrap these API APIs in the packages, I think beekeeper is gonna be a great, great way to do that. So I'm I'll double check how far along it is. We'll link to it in the show notes regardless. But he's been hard at work on that, I believe, ever since he received a grant from the r consortium on this API development work recently. So, yeah, John, thanks for that, real time feedback. You're you're lucky I had that that page open as we were recording. I didn't realize that was coming through. So, yep, APIs. It's a great time being APIs with our, I'll just say that, with what John's doing and and great tutorials from Alyssa and whatnot.
So, of course, we love hearing from you as well. Wherever you are in the world, we have various ways of doing that. You can get in touch with us on our contact page, which is linked directly in the show notes for each and every episode. Also, we love to get your contributions to the rweekly project via a poll request of, say, a new blog post, new package, a new tutorial, and whatnot. All the details are at rweekly.org. We we love to hear that. We love to see that. All the curators really appreciate it when the community helps step up as well. And so we're looking for curators to join our team. Again, information on that is at rweekly.org and our GitHub repository.
We're trying to make things easier for us, but the best thing we could have is more people to help us with it. So if you're interested at all and you're passionate about this space, it would be a great time to reach out to us. And, also, if you wanna reach out to us on one of those fancy new podcast apps that you've downloaded, like Podverse, Fountain, CurioCast, or whatnot, they're all supporting the boost technology, and that's an easy way for you to send us a message directly in the show and have a little fun along the way. You can find complete details on that in the show notes, and we are proudly linked on the podcast index page where you can boost directly from there as well. Again, I wrote a little package around its API, and I got more stuff in store for that stuff coming up soon. So stay tuned. Maybe some more our content for this very show.
Talk about meta. Right? Our content about a podcast to talk about on a podcast. That doesn't make a head spin. I don't know what those.
[00:43:49] Mike Thomas:
Inception.
[00:43:50] Eric Nantz:
Inception overload. Yep. And, but, yeah, we'd love to hear from you. And, definitely, you can get in touch with us on social medias as well. You'll find me mostly on Mastodon these days where I'm at our podcast, at podcast NSF social. Very sporadically on the x thingy, but also on LinkedIn from time to time. And, Mike, where can the listeners find you?
[00:44:12] Mike Thomas:
Yeah. Probably on LinkedIn primarily. I think my handle there is Michael j Thomas 2, or you can search Catch Brook Analytics, k e t c h b r o o k, to find me there. Or if you wanna find me on Mastodon, I am at [email protected].
[00:44:32] Eric Nantz:
Very nice, Mike. Well, anyway, we will close-up shop here for episode 148, and we will be back with another new episode next week.