Workflow Demo Live Q&A - October 30th!
videoimage: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
Hi everybody, thanks so much for jumping over here to the Q&A room. Let's give everybody another minute or so to join us.
Everybody thanks so much for jumping over here, we're going to give everybody about 30 more seconds to join the Q&A room.
Let me bring on my Posit friends here, hey Carlos, hey Ryan, hey Gordon, all right, we have a good crew here for the Q&A, so I think we can get started, but I just want to say thank you so much to everybody for joining us today and thank you to Ryan for such a great session.
As a reminder to everybody, we host these Workflow Demos the last Wednesday of every month and they are all recorded, so if you do want to add them to your calendar for future months, I'm just going to share a little short link here in the chat with you, there we go, and I think now we've had 20 different workflows, so anything from building a model annotation tool to pins workflows to building beautiful business reports, and so I'll also just put that playlist of all the recordings there as well.
And while I know many people joining today may already be current customers, if you are curious and want to try out Posit Team or Posit Connect, which you saw today, if you want to try it for free or want to chat with our team, I've put a link where you can schedule more time to chat one-on-one as well.
I know sometimes it can be hard to answer questions in this format if we don't get full context from you as well, but it seems like there is a ton of interest in this PDF conversation, so really excited to get into some of the questions here.
To let you know how you can ask today, so you could use the YouTube live chat and that will just show up here and I can pull it on the screen. You can ask anonymous questions too, and you can use the Slido short link there, so pos.it slash demo dash questions.
And I also know some people asked some great questions when they originally registered for the event, so I'll be pulling in some of those as well, but let's just go around real quickly and do some brief introductions, so I'm Rachel Dempsey. I am a head of customer marketing here at Posit, and so always looking for ways to share different use cases and workflows and bring customers together to share stories.
Ryan, I know you introduced yourself already, but want to say hello again. Yeah, absolutely. So my name is Ryan. I'm a data science advisor here at Posit. I've hosted a few of these webinars in the past. This is actually the first one I gave in quite a few months, so it's good to be back, but yeah, I'm the one whose voice you just heard for the past 30 minutes, so hopefully some of my other colleagues will chime in so you don't have to keep hearing me.
Carlos, want to go next? Hi, I'm Carlos. I'm a software engineer in the Quarto project. I'm currently the lead developer of the Quarto project. I'm very excited to answer your questions and talk to you maybe about some upcoming stuff that we have going on.
And Gordon? Hi, I'm Gordon. I'm a software engineer on Quarto, and I'm currently working on the Types functionality.
Two-column PDF layout
Well, let's start diving into some of the questions. So I see one that just came into YouTube here from David, and it is... During the demo, the output PDF was formatted in two columns. Where did you define that? Yeah, that's a good question, and maybe Rachel, it would be a good time to maybe post the GitHub link.
So all the source code for all of these workshops, for this workshop, will be available on a... It is available on a public GitHub repository. So you can see that it's in the YAML, but if you want to actually see it, we'll post the link to the GitHub repository.
Data frames in Quarto documents
And so another question came in. Will data frames be available in Quarto documents like they are in R Markdown without having to transfer them on the command line? I'm not quite sure. So both Quarto and R Markdown use Knitr to run R code, and in R code, you can access the data frames just as if this was R code in general. So maybe I'm misunderstanding the question, and a follow-up will help actually sort it out. But in some sense, Quarto does nothing different from R Markdown as far as data frames go. They go through Knitr, and we can get them in the same way.
PDF accessibility with Typst
During the demo, I saw Kelly had asked, the accessibility of PDF documents created with Typst to those with disabilities is currently not functional. What is the timeline to develop this functionality?
So we depend on Typst to generate accessible PDFs, and the version of Typst that ships with the latest version of Quarto is the one that was available up until literally a week ago, which is 0.11. 0.12 has better support for accessibility, so there's a lot of options that should satisfy PDFA, which is the standard that most, say, like federal institutions require if you want to ship an accessible version of PDF. And so that will be on the next version of Quarto that we are starting to develop in mid to late November, and we should be shipping that early Q2 2025, so that's the timeline for that. We absolutely want to do it. We just depend on the downstream tool for it, and so now that they support it, we'll be able to support it as well.
Parameterized reports on Posit Connect
A question I see just came in on Slido. It was, is there a possibility to publish R Markdown or Quarto with parameters on Connect and allow a user to change the values of parameters from the Posit Connect side?
I can at least speak to the R Markdown component there, so we do have functionalities in Connect where you can interactively change the parameters. It actually shows up like a little sidebar that expands out and allows you to select different parameters and then re-knit the document with kind of a custom format, and I'm not sure if Carlos or Gordon will have insight into this, but I don't believe that functionality is available yet within Connect.
I don't want to say something about Connect that I am likely to be wrong on, to let Kelly and Aaron, but it should be easy to find us either online or email or like Rachel, contact her, and we'll be happy to follow up the question and answer offline and then post the answer to folks, but I just don't know, and I don't want to say something that would send everyone on a wild goose chase.
Yeah, no, that's totally fair, and I should note that the Shiny application I've created in my webinar, it's essentially what it does. It just gives users kind of an interactive way to change the parameters and re-create a customized document, but I understand that functionality, that one's built into Shiny. I don't believe we have something kind of native within Connect for Quarto just yet.
Generating reports for all countries at once
There was another question that just came in. So for your example, Ryan, was there a way to create the PDF reports for all countries at once? So in the one that I created, there wasn't, just because I wanted to create something to generate reports for individual countries, and I remember in the chat, they were looking for potentially something you could add to the YAML that would generate PDFs for every single country. I don't believe in Quarto, there's a way to do that, but you can certainly code it in R or Python to kind of do an iterative process to generate reports for every country.
Multi-format rendering
Another question was, does Quarto support multi-format document rendering, meaning rendering as PDF, Word, and HTML all at the same time? It does. All you have to do is on your YAML, on the sort of front matter, on the first YAML block, instead of saying format types or format HTML, you can say format colon, add a new line and sort of start writing new things, and then HTML colon default, types colon default, doc X colon default, and then when Quarto renders, it will render all of them. And as a side effect, if you do this on a website, you will get the HTML on the website and you get a sidebar on the column that gets you the links to the other formats to be sort of easily downloadable for people who need it.
LaTeX to Typst conversion
So a comment, I guess, can be a question as well. I would love to have a resource that easily translates LaTeX to Typst, and I'm glad that I am figuring out how to actually say LaTeX here.
So there are ways to get a conversion from LaTeX to Typst that you can use Pandoc. Pandoc is a tool that we use inside Quarto. You can access Pandoc from, if you have an installation of Quarto, you automatically have also an installation of Pandoc. And Pandoc allows you to do conversions from LaTeX into Typst, which Quarto doesn't do. Quarto focuses on starting with either Jupyter documents, Jupyter notebooks, and Markdown, and then producing a variety of different outputs. But Pandoc does something a little more generic with respect to documents. You can give it LaTeX as input, and it will try to convert to Typst. So you can do this. It requires a little bit of work on the command line to find where Pandoc is and give it the LaTeX document, and then get the Typst document out. But if you need a place to get started, that would be the way to do it.
Live data and static data
Nikki asked a question in YouTube chat. Great demo. Looking forward to trying it out. My question is, does the workflow work when linked to live data as well as a static data set? Yep. Absolutely. So there's no requirement that it's static or live. Just as long as you can make a connection to that data set, then you can certainly adopt this workflow to your data.
Typst vs. other PDF formatters
What are the disadvantages of Typst relative to other PDF formatters in Quarto? That's a great question. Typst is a very new typesetting system. So it has existed for about a year and a half now, I think, publicly. And what that means is that there's much less of a developed ecosystem around it. So if you want to use something like PDF LaTeX, there's literally 40 years of folks using LaTeX in one way or another that you get to benefit from. And in Typst, you don't get that. The community is very fast growing. I'm always surprised by the excitement that folks have around Typst.
I really enjoy using Typst, and I hope that eventually we can put LaTeX to rest. It is a fantastic system, but it shows its age. So I'd love to support Typst better, and getting community support and an ecosystem around it is a big part of it. But that's the main thing you're going to miss, is sort of the very long tail of strange packages that do absolutely everything you need. That does not exist in Typst so much. But it will. It's already a lot better than it was even six months ago.
I really enjoy using Typst, and I hope that eventually we can put LaTeX to rest. It is a fantastic system, but it shows its age.
Samantha asks, are there ways to customize how Typst renders or essentially add partials like when using LaTeX in Quarto? Yeah, we have a general mechanism that exists not only for Typst, but for other systems, for other formats as well. So Samantha mentioned partials. This is the way to sort of change little bits of the document and give it a new template. The same system exists for Typst. We shared a link to the documentation that talks about custom formats in Typst to do that. So that's all available, just in the same way.
There was a slight small thing on the last question. One of the limitations of Typst in Quarto is we don't yet have books support. We would definitely like to have that. That's a great point. So if you're using LaTeX, if you're using the other PDF format, you get a textbook. So if you want to go down the route, we use PDF LaTeX and we can't currently do it in Typst. We'll fix that, but it's currently not available.
Deploying multiple Quarto docs to Posit Connect
Sean had asked, if you generate multiple Quarto docs, can you deploy them all at once in Posit Connect? You probably could. So there is an R package for deploying things that connect. So there's no reason to think you can't iteratively have some kind of loop or purr to render them all to connect. That probably wouldn't be my recommendation because you wouldn't want to kind of bulk deploy 200 plus PDFs to connect, because it then becomes 200 now pieces of content you have to manage on the Connect server. So I would, I think this is, you know, I've tried to present it as a use case where you just have one template and then it gives kind of users of that template to generate whatever document they want. But again, if you really wanted to, you probably could, and you can check out the RS Connect package in R for programmatically deploying to connect.
Embedding Quarto documents in Shiny
The question I just saw come in on Slido from George was, what are considerations or things to know about for embedding Quarto PDF or HTML into web apps like Shiny?
The main thing to be concerned when you're embedding Quarto documents in general, when using something like a web app, like Shiny to generate a separate document is if you're using HTML, you want to make sure that if you're generating a report, you have embed resources enabled. So embed resources is a option in Quarto that effectively sort of takes all of the images, takes all of the links, like all of the resources that a webpage usually has that are in separate files and makes it into one big file, which is how PDF works, right? Just have this one file and you can share it with people. If you're generating an HTML, by default, Quarto will keep those files separate so that multiple files can share the same resources and that's more efficient. But if you want to be able to email it to someone or to just put it separately so that people don't need to have any sort of additional files, then you need to have embed resources. And so that's the main thing that I would consider.
I would, in general, just lean on using PDF, either the Typst support or the PDF or text support for it, mostly because there's fewer chances for strange things to go wrong with HTML, which is generally meant to like live in a web server somewhere rather than be shared by email and sort of sending it around.
Company branding and upcoming features
I wanted to just share something really quickly before I forget to say it at the end. But I know a lot of times when we're talking about Quarto, we're talking about PDFs, there are questions around using your own company branding. And so there's been a lot of work the team is doing on this. And so if you are interested in a follow-up, like small group chat with our team, Garrick is going to join us next month, I believe November 12th. And this would be a little bit of a different format than here on YouTube, you'd actually be in the room with us and talking to us.
I'm also going to share a link to the general documentation of the feature we are going to discuss with Garrick. And this will be integrated in Quarto 1.6. We're working on the documentation right now. So if you're interested in what that document is describing, I would highly encourage. We would like to hear from you and like you to test it out.
Citations and Zotero integration
A Typst question that came in was, how well does Typst work for citations? Zotero integration. Zotero is a bibliography manager. So folks who work in academia and need to know about their 500 papers that they have to cite regularly, they have a separate program for folks that don't know it. So Quarto has Zotero integration through RStudio and its VS code integration. So you can use the visual editor and sort of automatically bring references from your own Zotero library. And Typst will work with that. So Typst needs its own sort of library for doing this. But you can use Quarto to pull in your citations from your Zotero library, and then we will render them using Typst. And the latest version of Typst supports the citation style language, which is this standard for figuring out all the different ways in which citations and references are generated, like from Chicago to APA and sort of all of this. So for academic folks, that's essentially what you need, because then you just find the file that describes the citation style for your journal or for something like that, and you can just use it. So it actually has really solid support for citations and bibliography management, about as good as PDF LaTeX.
Download button for reports
This is a question from the registration, and I know, Ryan, you showed this a bit in the demo, but I just wanted to reiterate, someone said, I'd like to have a download button on the Quarto website or Shiny app where these reports can be directly printed by the users. Yeah. During the demo, we kind of, again, it was not a very flashy Shiny application, but it had a button right there that said Download Report. So they can download via that document or the poster version. So totally doable within Shiny application, within a Quarto website, I don't know if it's possible to have like an interactive download button, but I think you can, right?
So the main constraint there is in a Quarto website, you typically don't have a Shiny dashboard integrated on the website, right? So you could have to have the Shiny application running on an R server somewhere. There are ways around it. So if you, so there are Quarto extensions that George Stagg has developed, they're called Shiny Live, which George and Barrett have developed, which do all of the R work, but they work in WebAssembly, if you've heard this, which is sort of running your R code like on the browser rather than somewhere. And then you can pretend that you're running a full Shiny dashboard that's interactive, but it's actually running right on your browser. And so that could be integrated in a Quarto website, which then could have the link to something that generates the PDF file. This is something that we really need to give you examples so we can build off of, and we don't have a great example of that today. We're working on that. And so for like early next year, look out for sort of like a more substantive set of these harder use cases, but it should be possible.
Rendering HTML widgets to PDF
Will you support being able to create something like a BS Lib card and then render that card or other HTML into a PDF? Yeah, I answered that on the chat. I'll say it on video again. We really want to do that. That's something that Knitr supports. If you're running by Knitr by itself, you can ask for Knitr to use WebShot 2, which is a library in R to do it. But Quarto needs to support other engines like Jupyter and Julia. And so we currently don't support something that's generic across all the different engines. You can do it in Knitr, but you cannot do it in other formats easily. We certainly want to do it and hopefully we'll get to next year, but it takes quite a bit of work. So we're not quite ready yet. We're setting up the work to do it. And it's going to be there at some point, just not today.
Using Streamlit with Posit
I know this isn't particularly related to PDFs, but there was somebody who was asking about how can I use Streamlit and Posit? Yes, so I'd have to go double check our previous workflows. We may have done a Streamlit one. We've certainly done a Dash one. But for those that aren't familiar with Streamlit, it's a very popular framework for creating web applications in Python. And Posit Connect does support Streamlit applications. So let's say you want to develop one within Posit Workbench. Popular environment to do that would be Visual Studio Code, which we do support, Posit Workbench. And you can easily deploy it to Posit Connect using our command line interface. We're also working on a new Posit publisher to make push button deployment in VS Code really seamless. It's a pretty cool new tool. It's coming. But yeah, short answer, you can absolutely develop and publish and share Streamlit applications using Posit tools.
I see from our private chat that a few of you have to jump to another meeting right at the top of the hour, so I don't want to go over too much here, but thank you so much, Ryan, for the great demo. And thank you all for joining us. This is actually the biggest Q&A room we've had so far. So it seems like something worked better in pushing everybody over from the demo. But thank you for all the great questions.
I'm going to go through and see what we've missed here as well. But I'm hoping we got to most of them. If any of our answers mention emailing us with more info, you could always email me. It's Rachel at Posit.co. And I see Carlos shared his email there in the chat as well. But thank you all so much. Quick reminder, we do have these workflow demos the last Wednesday of every month. And if you are interested in getting together with us throughout the week, I also host our data science hangout, which happens every Thursday from 12 to 1 Eastern time. And each week, we feature a different leader from the community to answer questions from you all. But so great to see you all here today. Thank you so much. Have a great rest of the day.
