Resources

Cynthia Huang - Quarto for Knowledge Management

Have you ever considered using the power and flexibility of Quarto for note-taking and knowledge management? I did, and now I use Quarto websites to track my PhD progress, document insights from conferences, manage collaborative research projects, and more. Let me show you how easy it is to implement standard knowledge management system features, such as cross-referencing, search indexing, and custom navigation. But what if you want more advanced features like glossaries, document listings and summaries of datasets? Well, with some creative use of Quarto's many features and extensions, almost anything is possible. Whether you're new to Quarto or a seasoned expert, consider adding Quarto to your note-taking toolkit. Talk by Cynthia Huang Slides: https://github.com/cynthiahqy/positconf2024/blob/main/slides.pdf GitHub Repo: https://github.com/cynthiahqy/positconf2024

Oct 31, 2024
20 min

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

Hi everyone. I'm Cynthia, a PhD candidate from Monash University all the way in Australia, a data scientist, podcast host, and Quarto enthusiast. So very clearly I am a serial hat collector and plate juggler.

Unsurprisingly, things can get kind of chaotic. Too many ideas up here, too little time. So naturally, I need strategies and tools to wrangle the chaos. Before Quarto, this mostly looked like every knowledge management solution under the sun. This includes sticky notes, notebooks that I did not finish, and a lot, though not all, of the productivity apps out there on offer.

Now I do most of my note-taking in Quarto, maybe 80, 90%. I still use sticky notes. And this talk is going to be how I use Quarto to kind of get started with simple, powerful, and fun note-taking or knowledge management.

So even though this talk is Quarto for Knowledge Management, it's really Quarto for Managing My Brain. So I'm going to take you on a bit of a tour on some of the websites, computations, some of the websites, computations, and extensions of Quarto that I've used to organize my research work and research collaborations.

Quarto websites for structure and variety

So first up, Quarto websites provide structure and variety for very minimal effort. What you see on screen here is actually an example website that I used to apply for this talk because I didn't want to share my private secrets.

So really, all you need to get started is a Quarto website. It's an incredibly stable format, very easy to debug. I don't know much HTML or CSS, but Quarto websites allow me to get started with a couple of Quarto documents, a bit of YAML, and there I have on screen a collection of notes on PositConf 2023 talks that I used to inspire me for this talk.

With a little bit more YAML, you can set up listings, table of contents, all of these cool things that help you navigate your notes. And so on screen here, you can see that I think I watched like four or five talks in order to prepare my application, and I wrote some notes on each of these, and then I put them all together in a listing.

The other really cool thing about Quarto is that it offers visual variety pretty much out of the box with just one line of code or one change to your code, which is this theme option. A lot of other knowledge management tools like Notion or Obsidian are actually visually very similar, so every single note you ever make will look the same. That's nice, but I like a little bit of variety, and my brain really craves it, so being able to just change up the look of my different notes really helps me switch contexts.

PhD log and managing definitions

And so switching contexts a little bit, this is probably the application of Quarto websites that I'm most excited about. It is a Quarto website that contains pretty much everything I've done over the last three years in my PhD. I can kind of search it for almost everything, I can kind of search it for almost everything, so meetings that I've taken with my supervisors, publication drafts or submissions that I've made.

On screen right here is my final progress review report, and so everything that I've ever made is here, and hopefully, if everything goes smoothly, when I submit early next year, this will be kind of the artifact that I get from going through this entire PhD process.

The other kind of really cool thing that I've played around with in Quarto, and you'll see that especially in here, I have used a number of different formats to keep track of definitions. So I'm an interdisciplinary researcher, and what this basically means is that I have my fingers in a lot of different disciplines, and one kind of interesting and cool thing about humans, you know, researching a particular area is you come up with words to describe things, but different people in different areas use the same words for different ideas, or they use different words for the same idea.

So one thing that I've done when I'm kind of researching or reading into a new field, I try to keep track of the definitions that I come across, and this is really helpful when I then go to write up a paper to be able to reference these different definitions.

I actually found out earlier in this conference another really cool way of doing definitions that uses some Lua filter magic, which I'm going to try out, but you can actually see here that I've got listings as well as just like definitions dumped in the table and other things. So this is very much my internal inbox of things that are helpful for me, and the great thing about Quarto is that it's okay that it's a bit messy. It's okay that I don't know exactly how I want all my notes structured, because having everything in plain text means reorganizing is super simple.

the great thing about Quarto is that it's okay that it's a bit messy. It's okay that I don't know exactly how I want all my notes structured, because having everything in plain text means reorganizing is super simple.

If I have a particular set of notes that actually I want to put into, say, a presentation or I want to share with my supervisors, I can just take those documents out, set up a new YAML configuration, and then I've got a whole other Quarto project that I can share with other people. I can rearrange things into folders and use the kind of auto table of contents generation to populate the website. There's heaps of cool things that are all powered by the magic of Quarto and plain text. Oh, and version control, which is very, very important.

Computations and extensions for web design dreams

So next up, I want to talk a little bit about how Quarto computations and extensions supercharge my coding skills to turn my kind of web design dreams into reality. So you might remember I have many hats, but web developer is not one of them. Not for lack of interest, mostly out of responsibility for looking after my time.

But I have built, with the help of Quarto, these three interactive web page things that I'm going to talk to you a little bit about. So first up, in maybe March of this year, I was actually planning a rather long research trip. I'm very fortunate to have been able to attend USAR prior to this conference, and I'll be spending a couple of months here in North America. But the actual process of planning and booking this trip, because I am a lowly PhD student with no one else to book flights or hotels for me, meant that I had to do a lot of planning.

And so one way to kind of engage myself in this somewhat tedious task was, I thought to myself, well, why don't I make a calendar where I can put in all the dates where I have to be somewhere? So conferences or research visits. I want a calendar where I can see all of those dates and then figure out, you know, what are the dates I still have to fill? Where maybe could I fit in, you know, a little bit of leisure travel? And so this is my sketch of what I wanted this calendar to look like. Again, I don't have any web design or web development skills, but I do know how to code in R and use Quarto.

So here on screen is the code that I came up with using a little bit of dplyr magic, a list of the events that I had to go to, and some ggplot code, which is now wrapped up in a separate package called ggtilecal. And that couple of lines of code, I mean, it's a few more than a couple, took me a little while to build, but it was a really fun thing to do, helped me create this, which is just an interactive calendar powered pretty much exclusively with ggplot and dplyr with a couple of other extensions. And yes, it took a bit of time, but it also engaged me in the task of planning for this trip.

Next up, one thing I'm really passionate about is using graphics to communicate research. I think it's a really important and effective way to communicate complex ideas. And the annoying thing about that, though, is I often sketch these images and then I'm looking through past presentations or going through different folders to try and find the graphics that I've made maybe three or six months ago. And so I thought to myself, well, what if I just put all of these images into a single GitHub repository, and wouldn't it be cool if I could just have the README show me every image that I've ever made and maybe also print the file name so that when I'm including this image, say, in a set of Quarto slides or in my next paper, I know where to find that file and what it's called.

So how did I do that? Really handily with just a little bit of glue. So with glue, you can basically construct strings and using the output as is option in Quarto, you can basically write markdown using our code. And so right here, this piece of code looks into a file directory, looks for all of the images, and then basically constructs a markdown image link for each one of these images, and then also prints the name of those images for me.

Okay. So what does this look like? This is this GitHub repository, kind of collection of images that I've made throughout my PhD research process, a hex sticker for my package as well, some plots that I've made, a poster that I've made, everything that I've made to do with my first two research projects, all come down to a little line of code that I showed you on the previous page.

Okay. Last but not least, I really love a, like, tell by now to draw. Like, I love kind of visual, making visual things. And so one thing I've always wanted to do is have a kind of interactive image gallery tile type thing of some of the things that I've made and drawn. But I don't have any JavaScript skills. Like, we established that before. I'm not a web developer. However, someone has made a masonry extension and Lightbox, which both of these are JavaScript libraries, have been incorporated into Quarto. So as of Quarto 1.4, you can use Lightbox kind of out of the box with Quarto. And then someone's made an experimental but stable enough for me Quarto extension to use masonry. And so this is kind of the little bit of code that I had to write to generate this. And so these are sketches that I made in the last couple of months while I was traveling in Europe. And it looks exactly, well, not exactly, 90% to the way of how I imagined it in my head.

And this would have taken me, well, never. I would never have done it without Quarto because I was not going to learn JavaScript.

And this would have taken me, well, never. I would never have done it without Quarto because I was not going to learn JavaScript.

Private experiments and leveling up skills

So I cheated a little on that last one in that, you know, I was talking to you about internal note taking. That last one's actually on my blog. But leads me to my last point, which is that private experiments really have leveled up my Quarto skills and provided a very safe playground to kind of just learn new Quarto things that have then led me to produce things like this, which is a multi-format CV. I think this is maybe the most visited blog post on my website. So when this feature where you could do kind of multi-format publishing came out in Quarto, I played around with it internally in my PhD log and then created this multi-format CV where I have the same Quarto document rendering to both a webpage on my website as well as PDF output.

Some other things that I've made include these research notes, which I share with collaborators. And this is actually built upon the manuscripts Quarto project type, which is sort of like the website format, but like on steroids for scientific publishing. It's got a lot of really cool features and you can kind of connect it up to a journal template. But right here, I was working with some collaborators around building a kind of data tidying tool. And I just wanted to illustrate kind of which cells we were kind of interested in having the user interact with. And so I used the package emphatic here to kind of highlight a couple of lines of code. But the kind of really nice thing is this is all code that could then get reused to generate graphics for say the paper. And it's all version controlled and I didn't need to develop any new skills after I'd kind of played around with Quarto in my own private repository.

Okay. And then the last thing is that I've written a bunch of templates and blog posts, which really helped me get to my first Posit Conference. And so I've taken some of the things that I've kind of played around with and experimented with in my private kind of internal wiki and turned them into tutorials. And part of that is how I think I ended up here. Or at least this is, you know, I think part of the giving back to community as well.

So hopefully I've convinced you that Quarto for knowledge management can be simple, powerful, and fun. And if you're not yet convinced, I'm going to show you one last really cool trick that actually convinced me initially to swap over from Notion that I was using before and go kind of all in on using Quarto to take pretty much all of my notes. And that is visual mode. So you can tell now I really like pictures. And so yes, Quarto is amazing because of plain text, but I really like being able to drag and drop pictures or copy and paste pictures. And so one thing you can do in visual mode is that there is, I don't know how it works behind the scenes, but this is actually Positron. The same thing works in RStudio and in VS Code. But if you switch your document to visual mode, you can just copy and paste or drag in images. You can drag in attachments. Not everything works. Like I don't know if you can put a video in. But for my purposes, this was more than enough.

So hopefully I've given you a couple of ideas of how you might try Quarto in a low stakes environment for your own kind of note taking. Of course, you can start with building a really pretty website for everyone to see. I think that's a little high stakes. So you'll find templates and more at the GitHub link on screen. And you can kind of find me on most of the socials on that handle in the middle. So I hope you will consider Quarto for your knowledge management. Thank you.

Q&A

Thank you, Cynthia. That was an amazing talk. I really appreciate your use of TGI ref in the interactive one. I love that package. So the most upvoted, that's supposed to be a question, but it's not a question, says are you sure you are in web dev? Wow, this was fantastic. Really cool.

Oh, thank you. This is made in, so I have to admit these slides were made in Keynote. I do use Quarto slides for pretty much all my research talks. But like for this, Keynote helped bridge those like web dev gaps where I don't know how to customize reveal.js enough.

That was great. So this is a question. Where do you host your Quarto websites? Quarto pub, GitHub pages, other? Yeah. So this one's an interesting problem in that I mostly have this just locally. If you want to host it, you need some sort of authentication. And so this is why I think it's a good solution for like a one person thing. I think there's like a lot of solutions out there. I currently just use the static encryptor. So I have my PhD log like hosted on Netlify attached to my website on like a special subdomain. But I had to encrypt everything. Before that, I think you can implement some sort of like more complicated authentication process. But again, I don't know anything about that.

Okay. So this is a nice talk. What would you suggest to efficiently move notes from other apps to Quarto? Would you access the same Quarto notes across different devices like laptops and mobile phones? So I do most of my capture just like in Apple Notes, and then I like will copy them across when needed. I also have a Alfred shortcut that opens up these Quarto projects. So when I'm on my laptop, I can kind of quickly access these like my kind of repository of notes. And so I think this is kind of a personal question of like what works for you. I also just take photos of notes that I write on paper and chuck them in. So yeah, I think it's a kind of personal process.

I think we have time for one more question. What do you think is the most underrated Quarto feature? I have to say the extensibility and modularity of Quarto. Like it kind of underpins everything and you see the cool things that people make. But the more you learn about how Quarto works, the more you're like, everything you see, you're like, oh, you could do another thing that's kind of similar or like an extension. And the community around Quarto who are developing like JavaScript extensions and stuff that bring this functionality in, I think that's like underrecognized and maybe like underappreciated. So yeah, I have to kind of shout out to all the people who are making really awesome Quarto extensions. Thank you again, Cynthia. Appreciate it. Thanks again to all of our speakers today.