 Howdy folks, we just opened up the waiting room for the getting started with quarter workshop here at our medicine. So I'm going to give folks a little bit of time to roll in and then we'll get started in just a few minutes. If you have already joined and you're here watching. We are going to be working off some slides and public material that I've already put up on the internet so you can access it or today as well as in the future. So I'm going to drop some information into the chat window. So slides slash content. That link I just shared is going to be the primary webpage that has essentially everything you would need, you know it has the content has the slides it has links out to workshop material, as well as to a pre populated our studio cloud instance. So I'll give a couple reminders for that because we're going to have some people that join and not necessarily right at the first second but join a few minutes late, and we'll get kicked off here in just a few minutes. The way that they've set up the workshops is that it's muted for everyone and video off for everyone. But if you do have questions, please feel free to put those into the chat box. Some of those I'm going to aggregate an answer at the end or at the end of each section. And some of those I might address in the moment depending upon kind of what the question is and the content in it. I will keep the chat open off to the side. Make sure to stay ahead of questions for folks that are in the room just to confirm that you can type in the chat box is someone mind saying hello or asking a question real quick, nothing particular but just anything in the chat box there. Awesome. There's a lot of people. Hello folks, how are y'all. Fantastic. Great. So yes, I know Kordo is something that's new to a lot of folks it's been out for a little bit of time but as you have questions please feel free to ask them in the chat. Again, I'll do my best to answer them and stick around for a little bit. And if there's some that are kind of out of scope for today we might address them in a different way, but a lot of content to cover. But thank you all very much for the hellos there. I'm going to drop another link to the slides and content. Yes, you can sign up at Kordo pub.com for a free free Kordo pub handle so you can imagine like signing up for it and then you can publish there from our studio or from the Kordo command line interface for publishing content there. Right, we're going to give it about one more minute, and then we'll get kicked off. Again, for anyone that's joining right now, the slides that I'm posting into the chat box. They have all the content for today. We'll be working through four main sections intro to Kordo authoring Kordo plots and tables and static documents. I've, you know, prepared some material for y'all. Number one, if you did want to install our studio the latest version that comes with Kordo and you're essentially ready to go. Or if you want to visit the workshop material after the fact I put that up on GitHub at my handle slash Kordo dash workshop, then also have a pre populated our studio cloud instance, where you can go and access it. There will be some coffee breaks or bio breaks during the workshop, we've got about three and a half hours of time together. And I imagine we'll have a couple breaks in between sections for each of those. I'll be 234 or 235pm local for me. So I'm going to go ahead and jump into the content, and we'll get started. I'll paste this one more time. So slides. Interesting. Okay, yeah, so if you're not able to access the slides on GitHub, sorry about that. I can try and upload a PDF copy as well for for the future. But those are hosted on on GitHub so possible that you are blocking there. For today again this website has the links out to everything. And if you were to click on the GitHub logo here in the top right. You can go to the actual source code and that has again links to the workshop materials installation of our studio or studio cloud, as well as taking you back to the art and medicine homepage itself. So once the slides are going to be working on we're going to go here on the left, or click on the slides button and get to the same content. And those are the four sets of slides for today. I have pre populated our studio cloud with workshop materials so we can actually go through some of those, because we have such a large number of participants, and because we're fully virtual. I've really set this up as more of like a I do we do in terms of like I will show you kind of what the purpose of that little workshop material is. And then after the fact as well you can go in and play with the code. So today is going to be a lot of kind of slides obviously but then some hands on material that I'll show and swapping back and forth between those. So let's get kicked off. We're going to go to intro to Cordo and getting started with that. So very nice to meet everyone. My name is Tom Mock. I work at our studio. I was the Cordo project manager, leading up to our studio cons, and also work as a customer enablement lead here at our studio so helping a lot of our customers and open source users get really good value out of our open source and professional products. We're going to be talking a lot about Cordo so hello Cordo hopefully you're in the right workshop and this is what you're here to learn about. We're going to be covering a lot of what Cordo is how it's a little bit different from things like Jupiter or Markdown and some of the new syntax that you can use with it. Without this workshop feel free to ask questions in the chat. Some of those again I will address live. Many of them I might save till the end of a section, closer to when we're taking breaks or kind of in between the different presentations. So for the assumptions for today. My hope is that you know a little bit about our, you might even know a little bit about Markdown, but ultimately you want to learn about Cordo which is the next generation of our Markdown. We'll teach you, you know, Cordo syntax and formats more Markdown and how to use it inside our studio and elsewhere and a little bit of our along the way. The focus of today though is not necessarily learning all the intricacies of our, it's more about applying skill sets that you already have or learn inside our for Cordo. Again, my name is Thomas Mach, if you do have questions after the fact. There's my Twitter handle or GitHub with all my content at Jay Thomas Mach or my personal blog written in Cordo at the mock up dot blog. So we'll cover all of these different things and feel free to reach out after the fact as well. Again, for today's workshop materials. There's a couple ways to get here if you just navigate to the link and again I'll drop it into the chat box really quick. There we go. That has all the slides materials and then I have a separate section for the two day workshop I taught at our studio con. Obviously that's 16 hours of content which is too much to fit in today, but just so you have access to it. And then on our studio cloud I have all of the workshop materials that we use for those two days, and you can play around with it interactively without having to install anything. If you want to use Cordo locally, really the the answer there is install the latest version of our studio. So that's version 2022.07.1. That's the latest version that came out around the same time as our studio con. And it comes pre installed with Cordo so you can essentially get started and get going straight out of the box. So there's a couple packages. If you did want to go through all of the material, you can install these packages and be ready to go. But again if you use our studio cloud, the environment is already set up for you and you can use that for free. I'm going to copy the link to our studio cloud into the chat as well. So that is going to be open forever you can sign up for free and have a kind of a weekly or monthly bandwidth they can use there or you can use that content locally by pulling it off of GitHub as well. So now we've covered a couple of the different resources in terms of the slides are here the slides are also linked at the bottom of every single slide. So if you get lost you can always go back to the homepage. And that links out to packages and other pieces of content that will be using today. So, if you kind of wanted to get started and you were doing this after the fact, again, install our studio and I've got a link out to the latest version, and then you can clone this specific repository to get all the workshop materials or use our studio cloud for free up to a certain time period for months per month and use the workshop materials there. Getting into our actual presentation on Cordo Cordo itself is an open source scientific and technical publishing system built on Pandoc. So this allows you to weave together text and code and produce essentially elegantly formatted outputs things like documents or web pages blog posts books and all sorts of other pieces of content. So as far as what this means in action, you may have heard the term Pandoc before, maybe you've used it, or you might have realized that Pandoc also powers things like our markdown. So we're going to talk a little bit about the mental model of how our markdown works, and then compare that a bit more to Cordo so you can help differentiate between the two products. So on Cordo knitter and our markdown, those are packages have been around for a little over a decade or almost a decade for our markdown. And they've been very productive in terms of lots of people got great value out of them, lots of people use them and we're going to continue to support and maintain our markdown and knitter moving forward. So in the technical diagram of how our markdown works, you have a plain text are markdown or dot rmb file in that document you would write some text you write some our code or other language code. And then you would pass that along to knitter to actually evaluate the R code. This will generate an intermediary markdown file that also includes the text you've written in your markdown document. And then you would pass the Pandoc, which actually does the conversion over to say like a report or a presentation or a project that you would then display and share with your users or other stakeholders. The important part to realize though is that our markdown the R package as opposed to the dot rmb format actually did some pre processing and post processing of the content. So the literal R code that basically changed how the document worked based upon which our markdown package you were using. So things like blog down and book down and page down. In addition to the core or markdown package, each of them had kind of their own syntax and their own little extras that they did by adding on additional our packages. Because our markdown kind of grew is kind of a separate ecosystem over this long period of time. There wasn't always the shared syntax across them. Now when we talk about Cordo the diagram actually looks really similar, but it's more than just knitter or more than just our markdown. So this diagram might look almost identical to what we saw before. What we need to notice is that we now have a dot QMD instead of a dot rmb so a Cordo markdown document as opposed to a pure R markdown document. We're still using knitter as our engine to execute our code. We're still generating that intermediary markdown file. But now we have this Pandoc with Lua filters that's at the stage of conversion. So rather than having literal R code that varies between all the different packages, Cordo actually bundles all of the pre processing into the Cordo command line interface and actually does the conversion directly with Pandoc through what are called Lua filters or extensions to Pandoc. So this means that while you can continue using R, you can also in the future have documents where you can actually write, you know, entire Cordo presentations that have no code in them and you wouldn't even have to have R installed on your system. So you can imagine a future where your non technical colleagues or your domain experts you're working with, don't even have to install R to collaborate with you on Cordo documents. You would just see it as writing another page or writing another report or presentation or project. But for y'all who actually have some experience with our or at least gaining experience there. Y'all can embed our and other data science languages into your Cordo documents and again create reports and presentations and projects and other formats. The next stage is that while this is, you know, very similar to what we did before, we're also opening up the population of people that might want to use Cordo. So you might imagine if you have colleagues using Python or using Julia, and that's something that they really enjoy using. It's kind of hard sometimes to motivate them to use things like reticulate to wrap their Python code or to wrap their Julia code in R just to execute their documents. So Cordo also provides other language engines. So still using the Cordo markdown document, still using Cordo with these, you know, extensions to Pandoc with Lua filters. But now you're replacing a midder with a Jupiter kernel or Jupiter as the engine. This allows Cordo to execute native Python or native Julia code, in addition to other languages, and still use them with the exact same syntax as what you'd be doing with R. So with the knowledge that you've learned with R and R markdown and midder, they can be applied across other different languages or in collaboration with colleagues using things like Julia. So a lot of power here in terms of going more than just one language thinking of like, overall, what are the different languages you can bring into your computational documents. So the things that you work with, they may not even want to use a plain text format like QMDs. So they can actually use Jupiter or I Python notebooks as the actual kind of interface that they're writing their Cordo documents in. But Cordo can still convert that notebook over to the exact same formats or presentations or whatever else you're creating. So however you're collaborating with your colleagues in whatever language you are using, you can still use a shared syntax and format that you're working across all those four. Those are exciting times in my opinion. So if we think about this kind of moving away from our diagrams, talking more about the internals, Cordo is using an engine like nitter or Jupiter kernels to execute the code and that generates the temporary markdown file. The markdown file is processed by Pandoc and Cordo specific Lua filters, along with some CSS for HTML or custom latex for PDF, and then it's converted to the final output format. While you might hear different languages throughout this presentation, Lua filters basically are language agnostic. So you can imagine that stuff we're writing today applies to any language. And if there's other developers that contribute to Cordo or write extensions to Cordo, it doesn't really matter what language they wrote in. So you can have someone who wrote an extension that they're coming from the Julia world, but they're using Lua filters so it still works for R and still works for Python. Basically, there's this interchange between all languages. It's not specific to just one. So this is again really useful for collaboration or for shared syntax across all these different ecosystems. Cordo can also support things like HTML widgets. So if you have interactivity and you want to have, you know, graphics or, you know, images or tables that are reactive, you can have those with HTML widgets like R or what are called Jupyter widgets for Python and Julia through the Jupyter extension. Cordo also comes with native support for JavaScript or what's called observable JavaScript, which is essentially like a package or enhancements to vanilla JavaScript from the same group that put together D3 for for graphics in JavaScript. So observable is really cool and it's going to feel, you know, similar to things like ggplot because it's using a grammar of graphics. And again, while you don't have to use it, it's something that you can pull on and bring on to the table when you need to. So if we look at some observable JavaScript, you might have a presentation and it has like a little widget here. So with this widget, I can say well in Texas it's about 91 degrees right now, which is 33 degrees Celsius for my friends across the pond, or maybe they're saying well it's 23 degrees Celsius and this is about 73.4 degrees Fahrenheit here in the US. So you can write these by custom kind of extensions or JavaScript that you're adding. And for most of it it's going to feel very similar to basic shiny code. So creating this view up here is done with what's called inputs range. And you can say, you know, zero to 100 and step by one default value is 34. And then I'm using some HTML strings to say like add the degrees Celsius or degrees Fahrenheit, but you don't have to use things like that. So I do a default to 34 in this example. So again, you can pass data back and forth between our Python Julia into JavaScript and back. So you can have client side interactivity and do some really cool and complex things without having to go only to shiny or only to things like dash or streamline in Python. But you can still extend them with other languages and other server side activity as well. So where observable really shines is like there's actually this context of building widgets together. So here I have, you know, slider and I can adjust that, and it will actually affect the graphic itself rather than just raw data. And it will also apply to tables and other different components I'm putting together. So building small UI components and a report or even interactive graphics, these may written with JavaScript and with observable in addition to the R code and other things you're writing. So overall I hope this kind of gives you a brief overview that Kordo is a big universe, you know, obviously we're loving and it can adding a lot of features for our core are users. So adding, you know, JavaScript in the equation with observable JavaScript and giving support for Python and Julia for a lot of your collaborations he might do, or stick with one language and maybe you're staying only with our and not touching the other things which is also fine. All together this gives us Kordo which can then convert all of our different source code and markdown into complex, all sorts of beautiful documents whether it's HTML or word or office or PDFs, or presentations like the Kordo presentation I have for you today. As far as what Kordo actually is and how we get around this ability to not have to rely on using a specific language like our Python but applying to everything. Kordo itself as a command line interface or it's called a CLI. And this is what actually does your conversion, it's wrapping pandoc and it takes things like QMDs or RMDs or ipython notebooks, and then converts them over. If I were to go to my terminal and call Kordo dash dash help, it would give me this little help page that you see here which says you know version 1.0.36. And then it gives me a few different commands like to actually get to the help you can use dash dash help, or you can use things like render or preview to convert your documents between formats, or to maintain a little server so as you save and make changes to your document, they show up in real time. So while this might seem quite different than how you would use our markdown, it's still very much a code based approach, and our studio especially the editor has a lot of features built in so you can essentially use the exact same workflows as you would with our markdown, but you can always escape out to the command line interface or the CLI if you want to use that. Speaking of different interfaces. There's obviously the comfort of where you want to work in the workspace that you want to use so obviously our studio we've got extremely deep integration, even to the fact that our studio actually bundles Kordo so if you install the latest version Kordo is just there and available it's already installed. We have things like the render button or the publish button as well as like the familiar interface of like the our markdown experience, but now we're using Kordo. You can still generate and preview your documents in the viewer pane and other kind of different formats like presentations and websites can also be built into their studio workspace. But again we're opening it up to additional users. So maybe you have colleagues that are using Jupyter notebooks or maybe you yourself like using Jupyter notebooks for things like Julia. You can write that code whether it's Python or Julia or whatever else in Jupyter notebooks and again render out the exact same type of documents using the command line interface. And lastly we've also released a VS code extension. So for folks using VS code as their primary editor or one that they're switching in and out of. You get a rich experience with that as well with the ability to like run interactive cells, as well as generate the actual documents out. And rather than talking to colleagues you're collaborating with and having to standardize around one tool or one IDE, you can each use your platforms that you're, you know, appreciating that you like, and collaborate across them and use them all together. For our studio, it goes even further because the integrations that we do we control like the full stack so we can go as deep as we want with those integrations. That brings in what is called the visual editor mode. This allows you to see the literal markdown converted into the final format, without having to render out your whole document. So here at the top of the bar and it might be a little bit small so let me zoom in a little bit. So you can see the difference between source and visual. By clicking on those unable to switch back and forth from the source mode or the literal plain text, and the visual mode, which gives me the ability to actually see headers as big headers and links as links and so forth. This also brings in a couple word processor things in terms of there's little buttons for bolding text italicizing changing header levels, adding links and tables, and you can do all of this interactively and it will show on the page, as well as inject the code and plain text that you can switch over to in your final version. So the visual editor mode just allows you to be more productive when you're writing documents or writing computational documents inside our studio. Let's do a little bit of how that works, and we're going to open up the quarter workshop materials. Again, if I wanted to go to those I could use them locally and have cloned it from GitHub, or I can go to our studio cloud and open up this specific environment. So again, that our studio cloud link is here. We're not necessarily going to do all of this together, but I just want to show you what some of that looks like so that when you are looking at this in the future, you can have the same experience. So let's zoom in a little bit down and we'll get started from the beginning zoom in a little bit more. If we go to computation visual editor. It's going to default to showing things with the source mode here. So I actually like working in source mode sometimes and I know how to read Markdown understand like oh this is a link this is a header. But you can imagine as you get to more complex structures like tables. It's kind of awkward to write them sometimes in true Markdown. What I'm going to do is actually switch over to visual mode. And with this dot QMD that I'm working on, I'm going to say let's use visual mode. It'll do all these conversions for me so all of the Markdown will actually get converted to the final format, and I'll have my headers and links and code and tables all nicely presented on the page. And if I go and find graphics they'll actually be embedded in line along with the source code. I can still run code like if I were to go down and let's see content editing let's just say I wanted to add a code chunk here. I can insert a code chunk with our, and I can still execute that code and run it, and it's going to execute the code in line in the cell, even though I'm in this visual mode. So if you're writing computational documents or just really writing a lot of Markdown the visual editor mode gives you a lot and allows you to embed graphics and you know gives you these word processing like abilities directly inside of our studio. So, while we can turn visual editor mode on and off, and that's what you're doing with toggling between the source and visual. If I were to render this we can compare the visual mode to what is the actual final output mode. So I'm actually going to render that out and pop it up here in the corner, we'll take a look at it. Now it's in my browser and this looks again very similar to what I saw in visual mode, but I've actually rendered the document and executed to run all of the code within it. So the ability to both render doing source mode or visual mode, and actually get out the final output. And as far as other editors, things like this code or Jupiter, they have their own kind of implementation of how they approach this. So this code has like a notebook extension, and that allows you to write pure Markdown. So you'd be limited to Markdown but you can use it interactively and then render and preview the output. And it also will give you, you know, working with YAML inside of your VS code documents. So whether you're working with dot QMDs or I Python notebooks and VS code, you can also write an author quarter documents inside those interfaces and work with the YAML. Both our studio and VS code have what's called YAML intelligence, or the ability to have auto completion for YAML. And this is, oh, let me pause for a second. I can see that a few people are saying they can only see the slides. And then some people can say what, so I think people can see what I'm doing but let me know if you're not able to see the slides. All right, so it looks like people are able to see the slides so just going through some of these. Yeah, so when we're using our studio cloud. This is the interface for our studio cloud that we're using. And then we have the slides here that are all on the same page. I believe we're able to see those all together. Yes. So I'm not actually switching into our studio desktop because I have this pre loaded inside our studio cloud. So this is an environment that's pre installed with all of the quarter workshop materials. So for both VS code and our studio again there's this ability to have auto completion or YAML intelligence through through the YAML headers themselves so your ability to like auto complete and you start typing out things like code folding or code copy, and it will actually inject and allow you to insert the code to finalize that that output. And then for Jupyter, Jupyter lab, if you are using that you can still edit your markdown cells and your code cells together. But for the YAML headers you'll need to do those as what's called a raw cell in Jupyter. YAML intelligence already exists inside our studio so that's available in both our studio and VS code I was just showing it in the other one. So in Jupyter because it kind of has constraints around the user interface, all of the YAML be written by hand kind of the older way that you would do it inside what is called a raw code chunk. But you can still write and author those even side an ipython notebook for previewing or rendering out in things like VS code or in Jupyter, you would use the command line interface, and you do something like render or quarter preview on that notebook, and then you could specify what type of format you want to convert over to. So in this case we're converting or previewing our ipython notebook to HTML. Preview, whether you're using it in our studio or VS code or Jupyter anywhere else allows you to maintain a background web server, so that as you make changes and save your document, it'll actually watch your source code. And here at the bottom, it still might be a little bit small. It says watching files for changes. When this means is that as you save it will actually re render the entire document and show those changes in real time on the one that's displayed and rendered out. So that's an option that's available and all the editors as well. And for Jupyter, the YAML is treated as a raw cell so we're not able to add that YAML intelligence, but in our studio and in VS code you have that rich experience of having like auto completion for your YAML and that you're adding throughout the document. So ultimately this means is that Cordo is really really good for collaboration. You might have a project that looks something like this, where you've written some dplyr code, it's pulling some data down from AWS, and you wrote this a few months ago so it was written in R Markdown. But then you have a colleague who's working and doing some data cleaning in Python and they want to use an ipython notebook. And then they do a handoff and they're writing out some code and they generate a file through another Python notebook that is then pulled back into R through a Cordo document or QMD and you do some pure vision with the torch library in R. With Cordo, all of these different documents could actually be executed with Cordo, all within the same project and all being kind of natively executed in R or in Python or in Julia, all together within a single environment. This content section that I've added up here is really just an example so you can imagine that this is a YAML project and that there's these four files and a directory. And those are built in to say like a web page or a lab notebook of some type, where again your different colleagues that you're working with are able to work in their preferred tooling, and then generate this out for a specific web page or an aggregation, even though they're working on different things at different times. One of the other things that Cordo provides is that it actually has built in publishing. So not only can you generate things locally, write beautiful documents and create them. You can also publish them out to the web. So Cordo publish has a few different commands. Someone asked earlier about Cordo pubs. So that's a free service that we provide. If you go to Cordo.pub you can sign up for that, and then use it for your publishing of any documents you create with Cordo. Now for publishing to GitHub pages or to RStudio Connect, one of our professional products, as well as other kind of more websitey places like Netlify, which is where a lot of people host blogs and personal content that they're want to host and share on the web. So regardless of kind of where you're publishing, Cordo allows you to do some of this via the CLI, and otherwise you would just have like HTML files that you could drag and drop and put into a content management system if you wanted to go that route. I highly recommend Cordo pub and signing up for that. So you have a handle or like an account there. And then you can publish there for free and manage it and aggregate all your different content. So Cordo.pub is a great resource for a lot of people that want to publish. And that is for again some people doing data science at work. Maybe you're using RStudio Workbench or RStudio Connect. Cordo is supported on those platforms as well. So you can author Cordo documents inside RStudio or VS Code or Jupyter, all running on RStudio Workbench, and then publish and re-execute that content and code on something like RStudio Connect, which will be able to process both the R code as well as handle Cordo and many other types of document formats. Just to say that if you did want to use this and you're using Workbench or Connect, that is totally possible and appropriate today. So we're using it on the cloud, just one good question about, say, like an EC2 instance. If the marketplace is updated to the latest version of RStudio, it'd be pre-installed. Otherwise you would need to install it and there's install instructions on Cordo.org for installing it to a local environment or to a Linux-based environment. So part of the benefit of Cordo, again, for installation purposes, which kind of wraps well into that question here, is that Cordo is bundled and comes pre-installed with RStudio. So as long as you're installing the latest version or in the future, newer versions of RStudio, a new version of Cordo will always be updated with the IDE itself. So you can install it anywhere and you don't have to use RStudio to use Cordo, but we are trying to integrate it as much as possible into the editor, so for this really strong experience. There's also this concept of the batteries included. So not only is it included with the editor, it's essentially always around and ready to go, but it's batteries included in terms of it's not many different packages that you're installing, but one command line interface that does everything. So for R Markdown, we have five different packages here. We have the core R Markdown with things like HTML documents, we have presentations, PowerPoint, Schringen for presentations, Reveal.js for presentations, Tufti and Distill articles. All of those would be separate kind of R Markdown packages you need to install and maintain. So Cordo, once you install Cordo, it comes with all of those. It also comes with even more so websites and blogs or books, interactive documents, as well as a few different formats that we're adding later this year for things like page down or flex dashboard. So for writing scientific articles, we have added most of the functionality for writing journal articles already with Cordo. Right now it's written as an extension, but we're also going to pre install a lot of those into the Cordo CLI itself later this year. So that's to say that Cordo is pre installed with our studio. And if you're installing it separately, one installation of Cordo gives you all these features that might have been five or 10 or more different R Markdown packages. So a lot installed just at that one time. At this point, you might be asking like, wow, we went really quickly through that like what about my other R Markdown documents or my colleagues or myself who have Jupyter notebooks, what do I do with them? So for some of you, nothing changes. You can keep using our Markdown and all of the knowledge you've gained over years or recently on our Markdown, but the vast majority of it still applies for Cordo. So those core workflows are similar. Now for folks who do want to take their existing content and render it via Cordo, you can do that a couple different ways. So you can render it with the command line interface. So from the terminal do something like Cordo render my specific RMD to HTML, and that will take an R Markdown document and render it over to HTML. For Jupyter notebooks, they actually store some of the computation within the source code. So it's it's almost like a JSON blob behind the scenes. For I Python notebooks, you have the option of just rendering and reading the data that's stored inside the notebook, or adding the execute command, which will then both render and execute it linearly from top to bottom kind of how you expect with our Markdown, or with Cordo. So you have that option with those two. So the question about learning flex dashboard so flex dashboard will be coming to Cordo later on, and that will allow you to create kind of dashboard style presentations or websites in addition to more traditional kind of linear scrolling websites. So for some of these folks who want to compare like what what is our markdown what is Cordo. Some of the core differences is that Cordo's batteries included. So all one install gives you everything. And there's a shared syntax across those because we're building them all together at once. We're also providing syntax that applies across different formats. So things that you do for PDF also apply for HTML. Also apply for Word documents or for presentations. So you can share a lot of that knowledge and syntax across them. You also choose your own editor and this allows you hopefully to collaborate more and better with some of your colleagues who are using other tooling or other data science languages. Cordo comes with better accessibility and richer features out of the box. So batteries included for sure, but also the defaults are really good. I think they're very beautiful and attractive, but they also give you good accessibility defaults for contrast or for low vision users. So obviously there's just going to be more enhancements over time to Cordo. Our markdown the core package obviously is still going to be maintained and bug fixes that are required across the R Markdown ecosystem will happen. But the majority of new features are going to be built into Cordo itself. The reason that happens is that again with our markdown, you would actually be building out an entirely new R package. Again with Cordo, you're extending or expanding the Cordo library itself or the Cordo command line interface. So rather than having to maintain an entire new package or build it out separately with Cordo, we're kind of able to consolidate our efforts and apply them all together. So again, kind of summarizing this collaborating with others working together with a shared format choose your editor in your native language. So wherever you're coming from or whatever you want to use you can use that tool and that language. As far as rendering, I've talked quite a bit about, you know, using the command line interface, but that's not the only way to do it. So within our studio and I can actually zoom in a little bit on this. I can select this box for render on save and then every time I save it I'll actually re-render the document. Or I can click the render button to render the document out to that specific format. So this is the terminal or the system shell and just call Cordo directly. So things like Cordo render this specific document to PDF or DocX or HTML. And there's also an R package. Now the Cordo R package is very, very lightweight. It doesn't really do anything besides send commands to the command line interface. So while you can absolutely install Cordo the R package, that is a very separate idea than the true Cordo install of the command line interface. So the R package is just wrapping the features that are available via the terminal. But again, you can do almost everything you need to just through the RStudio interface itself. So just kind of taking a step back from what Cordo actually is, part of why computational documents are so powerful is kind of thinking about what is your source and what is your output. So the goal here is to partially change your mental model, rather than thinking about it as like your source is your output and like they're interchangeable and you cannot kind of extract them. So like a Word document, whenever you're typing, you can't recreate what you're typing, just every edit you make is then saved into the document. Sure, there's things like revert or reverse or undo, but you don't have source code of how you actually got there. With things like Cordo, you have your literal source code, and then you have your output. So there's two things with your data and your source code, you're able to recreate any document. So you have this ability to reproduce your findings, or if the data is changing over time, re, you know, re execute the code with new data and see what the data says today or what the outcome is today. So by combining these together, you have reproducible documents in terms of you have like the R code and the data that got you to this report that you're able to share and collaborate on or share with your other users. But importantly, they are separate things. Both can be checked into things like version control, one contains code, one contains the output, and that's the source versus the output model that we're trying to build up here. As far as what a dot QMD looks like when you're writing it, so you might have seen this QMD here, it's got a couple of different things going on. We can break that down a bit further in terms of what we're looking at. So for a plain text file with a quarter markdown document, we might have some metadata or YAML. Here we could define what is the format we want to write out to, like HTML or PDF or word. What's the engine we want to use, maybe Nitter for R or Jupiter for Python. Then we'll have code chunks. Those code chunks can do things like load libraries and analyze data regardless of what language you want to use. And then you have text or what's called markup or markdown that allows you to create, you know, section headers or text with bold or italics or images that you're bringing in off of disk and adding alternative text to for screen readers. So overall you can kind of mix these three core components of metadata or YAML that controls the overall document. Code, which is the actual R code or other code that you're generating in, and then all the pros or text or documentation about what you're actually doing with your code or finding with your results. We're going to break it down into the different components. So again for YAML this header is always going to be kind of the first part of your document. And this is processed along with essentially every single part of rendering. So it can affect the format, it can affect small minutiae of like how the code appears or the theme, as well as making changes to actually the size of the graphics or anything else. Overall though you can think of it as metadata or controlling the entire document as opposed to a small component like you would do with code. YAML is going to look like this where you have it divided and fenced with three dashes. So three dashes at the top, three dashes at the bottom, and you define what are called key value pairs in the YAML. So you might have a title, something like my document. And then you have things where you're choosing the main option, as well as sub options. So for format, we're saying format is equal to HTML. I want table of contents to be true. And I want to turn code folding on so making it true. By nesting these different key value pairs together, you can make again global changes to how your document appears or what you're doing to your document. While it can seem intimidating to memorize all the different kind of core changes that you can make, again, because our studio has what's called YAML intelligence, you can actually search through the available features or have auto completion of things as you're changing them or writing them out. The next component, after you finish with YAML in terms of writing your document is the actual markdown. So Cordo is based on Pandoc compatible markdown. And this goal of this is that it's plain text, meaning that you can literally look at it and on disk, you can kind of read it in its plain text form. And it's still easy to read, as opposed to kind of something like looking at raw latex might be a little bit harder to parse through, because there's a lot more formatting that's occurring, although for some people that that's easy for them to do. You don't find it to be the easiest. Markdown will look something like this, where on the left you have traditional markdown syntax, so using asterisks to italicize or bold text that generates italic or bold text, doing things like super scripts or subscripts, strike-throughs or presenting verbatim code. On the left hand, again, we just have this ability to write the markdown, and then this is what the actual output would look like once you put it into a Cordo document. So, again, while it looks a bit nicer when you see the final output, you can still kind of guess or interpret what's happening by looking at the pure markdown itself in terms of it's somewhat descriptive as to what it's doing. Some of the other really important markdown syntax that we should remember is things like headers or section headings. We do this by adding pound sign and then a text. So as we increase the number of pound signs, we get smaller headers or subsections, and you can see that as essentially they move to the right, they get smaller and kind of lower priority headings or subsections. So traditionally, I'll use heading one, two and three, which I can do by having one, two or three pound signs in front of some text. You can go even smaller, but you'll notice that, you know, heading four, five and six aren't different in size. They would only be represented by subheadings within everything else. So this allows you to again structure your document and have different sections or chapters that you're working in within a single document. Now the last component of any quarter document is assuming that you're doing some computation. So you're bringing in some code. We have a code chunk. A code chunk is always created by having three back ticks, curly brackets, then a specific engine. So in this case we're using are because we're writing our code. We then have chunk options, which in Cordo are specified by doing what's called the hash pipe syntax to imagine this is a hash pipe or a pound sign and then a vertical line. And then what are the different key value pairs you're writing here. So things like output location equals column or label equals figure air quality and other different components that we're choosing. Then we have some actual R code so loading GG plot and creating a plot. And based off of this it actually puts the graphic into the column. So it puts the code on the left and the output location is the column next to it. It adds our label of temperature and ozone level, which is what we did here for the figure caption, and then the R code generates a graphic that is displayed on the presentation. Again, I wrote my slides today with Cordo. So I was able to write the document together with source code and markdown a lot to put these in. There's a good question about put options within the curly brackets. So if you're coming from our markdown, you're very used to putting all of these options here or into the curly bracket section right after the engine. Cordo is fully backwards compatible with our markdowns knitter syntax. So you can do that. Just you'll find over time that the putting the chunk options like this might allow you to write more or do more with it as opposed to squishing it into the syntax up here. It also adheres to what's called YAML style syntax. So whether you're writing chunk options or in the YAML header, they will have the same words as opposed to with our markdown. There was slight differences in how you'd spell things in the YAML versus the chunk options because they weren't the same thing. For doing the spacing. So someone had a question about this is a 50-50 split. If you wanted to do a true 50-50 or a 30-70 split and change that, today you cannot do that by chunk options. This is essentially a wrapper around other Cordo syntax, but you can write that Cordo syntax and I'll actually show you how to do that later on in the presentation. Again, you can do more than just R. So you can use Python or Julia or JavaScript or SQL or bash or many other languages inside your documents. And again, using similar syntax of like a label or figure caption, get a nice graphic out with its labeling. Now, again, I want to emphasize that the CLI is useful and there's a lot of things you can do with it, but you don't have to use it for everything. It allows you to do all these different commands with like rendering and preview and publish and all these other things, but almost all of that you can also do with the RStudio editor itself. But if you feel comfortable and you should get a bit of comfort using the CLI over time, you can get a lot of value out of it. There's a question about mixing R and Python. So if you're mixing R and Python together, that essentially means that you've made a decision that you're okay with having multiple languages in your environment. In that case, you would still use reticulate because you're calling R and Python together via Nitter. But if you want to have a pure Python and a pure R quarter document, they could use the Nitter engine for R and the Jupyter kernel for Python and Julia, and those could be separate. But if you're combining the two languages for Steven's question, it'll be using reticulate. I'm going to address a couple of questions after I finish this section out, but good questions and I'll talk about this in a second. For navigating in the terminal, again, because not everyone comes from using the command line interfaces of the terminal very frequently. I've included some commands here about how to work with the terminal and do things like where am I, what working directory am I in, change the directory, list the contents of the directory, work with Cordo and see the help files, make or remove directories as well. I've also linked out to a nice workshop by the data carpentries or a tool that actually allows you to search for different commands and define what they mean. So before we get into this our turn I'm going to address one question so from our cell, how are dependencies managed in terms of our and Python packages or modules for reproducibility. For example, collaborators might be using a different version of Python, or maybe I don't even have Python installed in my system. So if we were using the same Cordo project, we would use what is called a Cordo project and I'll actually talk about that in the second section. But there's this concept of what's called freezing computation, as well as using them with things like virtual environments with Python and the virtual end, or for R be our end. So you can access those and allows you to use virtual environments and freeze computation. So you can actually hand off a file that's been executed in person to within work with the same file but not re execute the code they'd use the stored computation that's available from the freeze command inside the Cordo object. So that's our turn that we're doing here, I'm going to again move over pretty quickly to our studio cloud, and show a rendering via the command line interface, as well as with our studio. So inside our studio and again I'm inside our studio cloud environment, I'll drop that here into the chat. The goal here is that we're going to show kind of taking one document and rendering in a couple different ways. So I've opened with an own intro the history dot QMD file, which is a Wikipedia article. So let's take a look at that real quick. The Wikipedia article looks a bit like this, we've got some history, we've got, you know, pictures and beautiful Boston tear dogs and some information about them, as well as there's a little bit of, you know, floating hover text about the different footnotes and things that are on the page. So inside our studio cloud, I can inside our studio, click render, and that will go through and generate an article. It looks pretty close to that Wikipedia article, but again, I wrote this with Cordo. I still have hover text over citations. I have graphics that are included in line and in the footer. And there's all sorts of other things within this document that are similar to the Wikipedia article, as well as a floating table of contents, and the ability to link to any data or specific sections. Now I used all that through our studio and again I don't have to use the CLI I'm using our studio to do that rendering. But let's say that I want to actually generate this as a PDF, because my colleagues like I don't want to receive an HTML file, I want to receive a PDF file. So using the command line interface via the terminal in our studio. So render 01 intro slash history dot QMD. Let's get that to PDF. So now I'm taking that same file that we're working on and using the CLI. I'm saying hey take this file. Let's see if I can find it. Okay. Workshop so I need, I didn't specify the correct directory. So workshop 01 intro slash history QMD. Let's see where I'm at. So if I look a bit closer at my terminal, I'm already in that directory. So I'm already in history QMD I made it too easy for myself and tricked myself. So let's go back a bit. We're going to delete this. So now because I'm already in the 01 intro folder. I can just specify it by name. So quarter render on history dot QMD, and it's going to run through and use formatting this out to a PDF. And now, in the same document I have again a good looking PDF. Now importantly you might say like well HTML and PDF are very different. And that's true part of what quarter is providing is a unified syntax for different formats. This looks slightly different from the HTML version because you're constrained in what you can do with PDF, but from single source and from a single source code. I was able to generate a very nice looking PDF without having to write any latex and for the nice HTML. I didn't have to write any CSS or custom HTML. This is all written in pure quarter syntax with plain text markdown and graphics and images and text for converting it over to say a doc format or doc X. So I could either change this and say like doc X or a different format. So let's say control enter doc X is a format that I can change. So that's one of the options is converting it to doc X. Or if I'm using the terminal, rather than saying to PDF, I could say to doc X and then convert it over to word. Now because I'm working in our studio cloud there isn't you know it doesn't have word installed so I'm not able to actually like view the documents, but you could create that and generate word documents as well. There's one other point that Hannah brought up which I appreciate, which is for the windows shell if you're using so Linux and Mac books are based off a Unix style terminal so they essentially have very interchangeable syntax. Windows does things quite differently. So it emulates what you can do with other terminals. So there's different flavors of terminals in windows. Some of those such as like git bash, which is a version of bash for windows requires you to do things like quarter dot command, or quarter dot execute when you're running commands inside windows. So if you find that you write, you know, like quarter dash dash help, and rather than returning the help it says like command not found, and you're on windows, you could try appending dot exe or dot command to the end of it. That's part of a nuance of using windows. And again, while you don't have to use the terminal, it's possible to do things inside our studio. So we're not working on, you know, doing more so trying to get around some of the windows specificities and make it really don't have to append dot command or dot exe. But that is something you might have to use, depending upon which flavor of the terminal you're using in windows. So that was the end of section one. The goal there was a relatively fast, and in some cases very fast just broad overview just trying to show you that quarter was a little bit different. There's some things we're going to talk about just trying to hit the high points. The next three sections are going to go much deeper on individual portions. So like repeating syntax and covering them. Now, in case people want to take a quick break. I'm going to give us a five minute break here so we'll return at 335 central standard time is my time, but just five minutes from now, we'll meet back here to start on the second section. I'm going to drink a little bit of water, and then we're going to get started on authoring Cordo. So if you have questions I'll try and answer some of those in the chat as well for y'all, but otherwise feel free to grab some coffee, or go to the bathroom or anything else you need to, and we'll be back in now four minutes. Question from Elizabeth. Can I change the YAML key value pairs via the terminal when I render files. So there's kind of two ways of thinking about this. One is like when I have this document, I already have YAML I've written right and it has specific key value pairs. So just to doc X, I've now changed the YAML and saved it and when I render it'll render out to that format, or to PDF, and it will render out in that way. If though I wanted to use the terminal by doing things like quarter render to PDF. It is actually overriding the YAML that's already been written. This is essentially like manually writing small components of the YAML. If you have lots and lots and lots of different changes you're making. It probably makes more sense to do those in the YAML because you can again get auto X auto commands where it's like okay what's available I can do control space, and I'll say here's the different things you can write, as well as when I start typing things it'll auto complete and say, here's the different options so it'll help you out a bit more. Again you can do a lot via the terminal but if you're changing many different YAML features you might want to do that via the actual Q and D itself. For presenting quarter slides via GitHub like I'm doing, do you just create a new repo and put the output there. Yeah, so option one, if you actually go to, we go to my GitHub repository. The way that I've approached it is GitHub pages has a native understanding of what's called a docs sub folder. One of the materials is the folder I'm using to organize all of my materials and it has like 01 and all these other different slides that I'm working on. But I've used Cordo in a Cordo project to render out to the docs directory. So now when it outputs the files it says throw them into docs. So I go back to Cordo medicine, go to docs. And now this is only the built HTML. So all this HTML is built there on GitHub. If I go to settings on my repository and pages, it says branch from main, that's the only branch I have, and then it's building from docs. So I just basically look inside my docs folder and build everything out there for, you know, writing it all out and doing available building of the content into a web page. We close down a few of these different things, get that up. A question from Dua. So authoring HTML. So parse the HTML correctly but IntelliSense was not available in both our studio and BS code. So yeah so part of working with our studio in terms of authoring this is there is kind of some expectation that you're kind of writing out the HTML by hand. And I hear you in terms of a feature request here might be natively writing HTML code and auto completion or IntelliSense for other languages besides R and Python and things like that. So taking that as a feature request. Part of what you can do with the visual editor though is let's say you want to modify this. If we were to insert a span. Dive. When I go here it actually allows you to insert things like either pandoc divs or HTML divs and then you can apply specific CSS or classes or IDs or other things to it. And this does allow you to write out a little bit of more complex kind of structures and HTML and have them work together with the R studio editor. All right. So we are. So last question from Jeremy is GitHub flavored markdown format available in Cordo. Yes. So if I were to go here. And let's do format. G GitHub G GitHub. All right. Okay so it's parsing this stay GFM or others many different markdown formats. There's GFM get a flavor markdown as well as all sorts of other different markdown flavors and if you look on. Cordo.org there's an entire section dedicated to like the 10 different flavors of GitHub or markdown it can render out to. So now that we're a few minutes past we're going to look at section to authoring Cordo. Here hopefully this will go a little bit kind of more deep on specific topics rather than covering all these different high points. The first section was really more about motivation or like seeing what's possible and now we're going to pull apart and look at the individual component parts. Again for Cordo there's three main components. There's the metadata or we call YAML. There's the text or markdown, and then there's code that you're using knitter or Jupiter to execute within your document. When you add this all together that's how you're creating these powerful and useful outputs is it's not just a dot are a dot pie file, but you're able to interject you know customization of how do I want to create it, or putting in text or graphics or HTML or late tech to present your your topic in a specific way. This is all an implementation what is called literate programming. This is the idea of like writing out program logic in human language, along with primitive markup code snippets and macros. So if we think about again a quarter document, we have the YAML header. We have markdown or markup or text, and then we have code that is actually written into the document when you're generating it. So you can write all these different components in our studio especially will help you as you write these whether it's through the visual editor or auto completion or intelligence. But put this all together and that's actually what a quarter document is is actually having all these components together, rather than just one or two of the different things. As far as the metadata, we're going to break down into the three sections starting with metadata and go a bit deeper into that. The YAML, if you've never heard the definition, you can say it's yet another markup language, or for some people they call it YAML and markup language. The important part here is to think of, it's always key value pairs. So when you're writing YAML, you always have to have three dashes to start three dashes to close the YAML. And then in the middle you have these key value pairs or an option and the option choice that you're making there. So in a quarter presentation, I'm using opt or the alt key plus the left hand button to zoom in on the slides, which is a nice feature that some people ask about. So what this might look like is in the YAML you might have something like format is equal to something. GitHub flavored markdown or HTML or whatever else. Within the YAML you'd have format equals HTML or format equals PDF or format equals reveal JS, which is how I made the presentation today. And just by changing that one component, the entire rest of the document can be the same, but you're saying take all the source code and the markdown and convert it out to this other format. So this kind of gives us a definition of that key value pair of format being our key and the value that we're choosing for that option. You can also add sub options or option arguments below that. So rather than just saying the basic defaults of HTML or reveal JS, I can also nest different options within one. So format is equal to HTML and HTML then also has sub commands. The part to remember here is that YAML is a kind of like code, very sensitive to spacing and definitions. So you can't write invalid YAML. And in order to do that, you have to space things appropriately and use the correct commands. So when we go to our studio, if we were to, you know, save this document and look at the source code, it's actually going to give me this error and it's saying, hey, you made a mistake, right. So I'm like, okay, well, what's the mistake key format has value table kind of single true must be a possible value. And it's basically throwing all these errors because it doesn't know what to do with HTML. And save it now it says, hey, this is valid YAML and it's ready to go. Or if I space things out inappropriately and try and do something like this and save it should give me a little bit of an error. It's not throwing it right now, but it's sensitive to the spacing that we're looking at. Let's go back real quick for source. So for this, you want to have spacing in align them so all of your sub commands are going to be tabbed over or two spaces over from their original placement, indicating that that's a sub command that you're not adding on. So key value pairs, but then if you're adding sub options for a specific thing, you can do those by including a colon afterwards and then spacing them appropriately. Sub options should always be below. So if I again look at this, you have such like option one or option two, it doesn't matter what if they're like text or numbers or logical or whatever, that you always want to have them below moved over one position from the previous sub option. So you can see format, tab over, HTML, tab over, and then you have all these different options that are a sub option of HTML. And this will work for any format but just the approach here of using the default with HTML. As far as why we even worry about writing YAML, we don't want to have to write everything out by the command line interface every time. Sure, this is pretty easy to do and you could render a document from like PDF to HTML or vice versa. It's one extra command. That's fine. But then you want to add some sub commands or options and now you have to remember, you know, dash M code fold equals true and move forward with that. You can add even more, you know, some options and parameters and now it's like running off the page. At this point, it probably makes more sense to have that all in your YAML header, so that you don't have to keep appending things to one line of the string with the command line interface, but you can define that all by the YAML like we showed in the previous slide. As far as navigating that within our studio, part of what I want to show here is the Cordo workflow. So we go back, whatever we're rendering, let's say this, show two options here. So inside our studio, we've defined our YAML in its HTML. That's great. If we were to render this, I'm going to keep this background job open real quick. If I click render, it actually runs that render inside what is called a background job. Now you may have never used background jobs before. They've been around in our studio for a couple years now, but that essentially means it frees up your core console and it's not, you know, you can still type code in here. But Cordo talks to our studio and runs the render preview inside a background job and basically keeps this open and saying watching file for changes. And if I were to add a space here and save, and then it could re-execute that code and re-render the document that we're seeing from cloud. So it's basically like maintaining that real-time preview for you until you tell it to stop. This is always kind of like a single document in terms of you're working with one document at a time. If I were to render this other one, you go back, it's going to overwrite that previous one. So you're not necessarily like rendering 15 different files in parallel. That's not really what the purpose is for this. It's more of like render a document and maintain that document as you're editing it. What you can come into play is let's say you have a website like I have with a webpage and there's like 20 different webpages. If I were to render that inside of a Cordo project, it would render all the files linearly in terms like render them all together and build them together, as opposed to just rendering one file alone. But it's always going to be kind of one background job at a time. You could start background jobs manually and say like execute with the Cordo R package, run Cordo render and do it a bunch of different times and parallelize it that way, but that's not a common workflow that I'm using right now. I just really wanted to show that when you do render out a document, you're going to see these background jobs. If you want to stop it, you can click the stop button, and that's kind of why it's going on. If we think about rendering, that's possible via the render button that we're doing with our studio, as well as the command line interface, as well as using the Cordo R package in Cordo render. Again, the Cordo R package is just sending commands to the command line interface. It's not actually giving you the install of Cordo or doing anything like that. It's just providing some of these commands so you don't have to go to the terminal. The other part, so I've talked, I kind of skipped ahead to do this because I really wanted to show that interactive workflow in terms of showing off the background job. So I've essentially done this, but if you wanted to, you could go to this and render it just like I did previously. There was one question that's in the chat in terms of parameterized reports. You can do the same type of params workflow or parameterization of our markdown. You can do that also in Cordo with params syntax that you're familiar with. I'm not covering parameterization today, but the Cordo.org content has a lot on parameterization and it's the exact same workflow as what you do with our markdown previously. Now, the other part in why it's useful to write inside our studio with Cordo and why you can do things in YAML is you get linting or essentially like code analysis. So when you type something and save, it will then check your code and say, hey, I found an error. Like if I save a document and I haven't specified a format, it's looking for some string. It's basically like what format are you trying to do? Are you trying to give me like ASCII doc or some other type of format? And similarly in VS code, if I mistyped my YAML, it's saying, hey, you mistyped this and it's trying to find a key value pair that's not available. So the YAML linting that's available is new to Cordo and very, very nice. It really makes it a lot less painful to write this YAML out by hand. The other part of what is provided is you can do what's called intelligence. So not only is it linting or finding things, but it also does auto completion. So if I can start typing and it will pull up different commands that thinks I'm typing and as I'm typing those out, it will basically search for those commands and find them on the page as we're seeing here in the GIF. This also works for chunk options. So part of the benefit of using hash pipe syntax is you get this YAML auto completion and search just like you would in the YAML, but also in the code chunk in the code chunk options with the hash pipe syntax. So while this can feel a little bit different than doing it all inside the curly brackets, there are some very big benefits to doing it that way, both for consistency and for auto completion and search. Now, I talked about single source publishing a bit before, but again, a core concept of what Cordo is providing is that there are certain features that it adds that apply across formats and allow you to do with what is truly called single source publishing or publishing to Word and PDF and HTML from one source code, not writing custom Word stuff, custom PDF, custom HTML, but just using Cordo for everything. The main features where this applies are called pandoc divs and pandoc spans, or what are called fence div blocks. Now, you might be familiar with CSS but that's okay if not, what I'm showing here is I'm creating a CSS class called big text and it's printing text at a very large size, 120 pixels. And then writing what's called a pandoc div, which similar to code chunks, or similar to YAML, has a starting and an ending section. So it's going to have three colons to define the start of a pandoc div, and then three colons to indicate the ending of that pandoc div. And then I'm applying specific, you know, commands to this pandoc div, it's basically just like a container, it says everything within this do something to it. So within my curly brackets, I'm applying a specific CSS class, or what's called big text. And when I render that, it actually shows up as really big text. Now, this example is limited to CSS, which limits me to HTML, but Cordo provides a number of predefined classes that apply across all formats or at least most formats that are available to do those type of things. There's also the idea of what are called spans. So where pandoc divs apply to like an entire paragraph or an entire section, a span applies to potentially like a single letter or a single word, or a subset of words within a sentence. So here I'm saying this word, special, I'm putting it in square brackets, and then applying a specific class to it. In this case, style is color equals to red. When I render that out, the whole paragraph is not changed, but just that one word that I've applied that context to. So just special is getting the red coloring attached to it. So with these two concepts, pandoc divs, meaning three colons, and then a class within the curly brackets ending with three colons, or with square brackets. And these curly brackets here, you can apply different things to paragraphs or entire sections or images and apply a lot of stuff to that. There's a good question about our studio shortcuts to insert div block skeletons. There is. So let's say, I'm inside our studio and visual editor mode by go to insert. There's this idea of inserting a div. And I can say, you know, let's say, you know, dot big text. Now I haven't defined dot big text inside this document, but it will actually give me that that div. So if I go back and look at the source code, sorry. Let's find got to find that because I made a big one. There it is. Alright, so I've got my three colons and then my class and then three colons. The other option is what is called code snippets. So I go to edit code snippets, mark down. I can define snippets that do things like insert dot columns syntax, which is used to create different columns in, in presentations and other things. And I could inject that as some type of snippet that I'm defining. But the visual editor applies it or you can define custom snippets to do whatever the heck you want. Again, just building up on this idea of fence divs always starts and ends with equal and matching number of colons. Typically you'd have something like three colons and three colons to start and end it. But for nesting or like aggregating multiple things on a single piece of content, you might want to go more than three. So you could do three or four or five or six or however many you want to visually separate the nesting of divs within the formatic formator. The important part is whatever you start with, you have to end with an equal amount. And by default, you can actually just use three for everything. That's a good place to start, but you might see examples with like four or five or six. That's fine. They just have to match the ending. If they're mismatched, it will never end and quarter doesn't know it's ending and it kind of messes up the formatic. So for nesting, what I mean by that is there's things like dot columns and dot column syntax. This allows me to put text side by side like create a left column and a right column like a 50% and a 50%. I'm using four and four to start and end. And that will allow me to visually say like, okay, this is the bigger one so it's like the parent div, and then these are the children div within it. You don't necessarily have to always do it that way, but it helps with me in remembering the start and the end. And then within that I have a three ending with a three and a three ending with a three. You can nest many different things like columns and tab sets and other things. Just realize that some things work better together and maybe it makes more sense to have like a tab and within a tab you have columns or vice versa. But you can nest different things together and see what components work. As far as if you're familiar with HTML, you might be saying like, why am I writing three columns instead of just using a literal div from HTML. Importantly, using these pandoc divs or these quarter specific divs, those apply across formats. So again, you could have a div that applies to word and PDF and HTML, as opposed to having literal HTML that only works for HTML type outputs. So you can think of them as similar if you have that mental model built up. But in generally, I'm going to suggest using literal, you know, colons as opposed to writing divs because they're generally transferable. If you're writing raw CSS and HTML, that's totally fine. You can use raw HTML, but these pandoc divs with the colons allow you to apply across formats. So for example, this section here, so three colons, layout number of columns equals two creates two images. So there's, you know, this male Boston terrier and female Boston terrier image. And it will actually separate them out into a left column and a right column and present that in any format. So it doesn't matter which format you're using. You could accomplish that with HTML or CSS, but then you can only use it with an HTML. With this, you can again apply it to any format. You can make some match text and images with this that's called like block layout where you have like text and then a graphic. And we'll talk a little bit more about that in the tables and graphics section. Another example of what you can do with these pandoc divs is something called call out blocks. And again, three colons to start three colons to end. And then I'm applying a specific class or is called dot call out dash note. And these can be like warnings or notes are important or captions, and they inject this like color or this kind of call out box that says hey pay attention to this this little part I'm doing. And all of these different types, they're still using the same syntax so three colon to start three colons to end, but then they have different classes applying so call out dash note or call out dash tip. And just by changing that one word, you're able to get a different presentation, but you're still using that same thing you've learned of a pandoc div with your three colon to start and three colons to end. So we're going to run these over and over throughout quarter syntax, and that's where you get a lot of power to do things across different formats. So we're going to go to the call out boxes and look at that really quickly. So if I go back to our studio cloud quarter workshop, authoring call out boxes. Again, I've got all these different pieces of code, I'm going to delete the code chunks so I can see those. And then I can render these out and I get to see all the different outputs that I've created. So now you have like these actual call out notes or captions. And you can even do collapsible call outs so that you can have like a really long section that someone could open up to say like oh learn more about this but for most people they're not going to read it. But for some people you want them to have it available to read. So you can have these collapsible call outs as well. So I've included a lot of different syntax that's available for this type, and that's included in the studio cloud section, mainly just to show you that this is the syntax and it actually works in practice as well. Another really good question that someone had was about using tab sets and tab sets again use the same syntax. So you can use these three colons and then panel tab set, and you define your panels by different headers or different sections within it. So I'm always going to start with three and end with three, and then I have things like two pound signs and a title, and then two pound signs and a title to indicate the second version. So maybe have tab sets that have like code and output. So first I show the code and don't evaluate it. I can just show the output without the code. So you could use this to first display the code and display a graphic or whatever you want to use it. You could have as many tabs as you want, each separated out by their own specific header. So to create that code that we just saw in the previous slide where we had headers that we could click between. So we have a code of zoom in on that three colons to start and at the bottom three colons to end dot panel tab set for creating these panels, and then a level two header to define each of the specific tabs. And then that gives me like a specific thing of code or output or whatever else I want to title these is whatever is added to the colon or to the level two headers that are seen here. Another option. And again, we're kind of just building up more, you know, familiarity with using pandoc divs in many different ways. You can also do things like layout specific images or graphics. And there's several different ways to do this. You can call it layout divs, and you're typically using those to layout or typeset images, although you can do some of that with mixing text and images. Option one is there's some predefined classes, things like layout number of columns or layout number of rows. And those take a single number, basically saying like, I have two columns and however many images there are, fit them always into two columns, you have a specific number of rows of three, and however many, you know, images there are fit everything into three rows, and you can define whatever number you want like two four or five three whatever. A more flexible option is just the pure layout class. And this allows you to find exact kind of percentages to how you lay out an image. You would read this as 70% for the first image, 30% for the second image. And then because we're closing this with square brackets, we're adding a new line. And then the third image will be 100% of the width. You can do more than just like pure 100% addition but I find that a lot easier to follow along with, because then you're doing kind of like 7030 or 5050 6040 everything adds up to 100 and easy to parse. Layout can also accept negative values and negative values in interject white space or gaps. So we might have like 40% for image one, a blank space of 20% 40% for image two, and then 100% again for the last image. So you can mix and match kind of this idea of like white space and image alignment and image width however you'd like to. What this looks like in practice is let's say I have this figurative. Let's start three columns and I have three images that I'm presenting here. Image one is going to be 40% and there's going to be a 20% gap. Another 40% image closing the section off. And then the second row will be 100% of the width. I actually grabbed this out that's exactly what I get, you know something that's about 40% 40% 20% of blank space and then this one really big image on the bottom. And you can use this again across different formats so using this layout allows you to structure slides as well as static reports or PDFs or HTML or whatever different format you'd like to. So there's a lot of power there I really find that these like number of columns and rows are probably the easiest to use because you just like layout number of columns is to and just like have a grid that you're working with. But you can have this really tight custom control if you want to go that far. Now we focused almost exclusively on these divs because we're thinking of like structuring an entire document or typesetting entire document. So if I have this string or hand allow you to apply things to like a single item or single string within a sentence. So for example, you see this down here. This is a footnote, and it's actually describing itself. So if I have this string, maybe a footnote, and it's got this number one saying this is the first footnote in the presentation. I actually created that by saying maybe a footnote. So I can add this tilde up and then square brackets to add the text. So I can basically say for this whole string, you know, whatever it's attached to, add this footnote to the end of it. And then within the footnote I've added this is important text or whatever else I want to show. So you can add different things and like footnotes or citations or one example where a span is really useful in addition to just like coloring text or something. It's just like magically appearing words with additional point after like basically make specific parts of my sentence apply to effectively bring a point home. And that would be done with again, the span syntax of a square bracket around the strings closing with another square bracket, and then applying the specific class to it. So this is called a fragment, which makes it appear later in the presentation. So magically comes first, then I have appearing word with an additional point after, and I have two sets of spans with two different fragments within a single sentence. So this allows you to whatever you're doing just like apply things to individual components of your of your talk or document or whatever else you're working on. So we've covered a lot about kind of some of the markdown and we're going to do more of like specific graphic and arrangement in the plots and table section. But we're also want to talk a little bit about code, because again if you're coming from your markdown world, there are some changes that are beneficial. So number one, depending upon which language you're using you're going to want to specify an engine. The engine is specified now the animal looks like this where it just says format horde will use whatever language is found first. So it finds some our code it's going to try and use nitter. If it finds Python or Julia it's going to try and find a Python or Julia kernel to use. You can force it to use something like nitter, where, an example maybe you have Python first, but you're using reticulate to call Python and are together, and you can still use the nitter engine for that. In the kind of Jupiter Python Julia ecosystem, you can, you know, specify just use Jupiter as the engine, or you can specify a specific type of Python like Python three or Python three dot 10 or whatever or you can go all the way down to a very specific Jupiter kernel that you've created. So maybe I have like a virtual environment with a Python kernel is attached to it, and I can bring that specific kernel in and have that type control. For our users, you can again kind of just default to leaving a blank and just having the R code be evaluated, or specifying engine is equal to nitter if you're having some options. There's a question about spans and can they be made programmatically. I mean, you could have like a snippet that adds a span, similar to like how code snippets work in our studio, you can do those with like shortcuts. And you, there's not necessarily like a quarter specific way of like injecting spans to specific components like you're telling quarter with a span to do those those parts. As far as nitter code cells, that's where I'm going to focus a lot today. My assumption is that it's a lot of, you know, are in medicine users and we're going to talk exclusively about our which is valid for today. There's a lot of options you can see for the nitter specific details at quarter dot org or the nitter package, as well as it for Jupiter users the Jupiter cells. The big part to remember about code chunks is similar to everything else. There's a starting and an ending. So three back ticks. And then within the curly brackets you define the language like our or bash or sequel. Then below that you have your chunk options, basically this hash pipe syntax or pound sign in a vertical line. Then you have your key value pairs, and then you can add your R code below all your key value pairs. This is the structure that quarter prefers, you can still write it with older kind of our markdown syntax, but you don't get all those niceties of like the auto completion, and the consistency between the YAML header, and the coach like options themselves. In this example, we have some R code. I've got one mistake and maybe we caught it, which is up here. I don't actually have, I have labeled twice. So part of this is like if you just do a comment or a pound sign. It's not going to be able to interpret that basically says oh this is a comment ignore it. And then you have that pound sign and the vertical line for it to actually pick up on the quarter options that you're placing. After you've written one hash pipe, if you click enter, it will insert more hash pipes and you can continue filling it out. And then if you click enter twice, it will give you a blank space that you can continue working with. So for this we have, you know, a nice graphic that we've created in a bunch of different options for like the label or the figure caption or the warning and everything else we're creating. Again, you can do the same thing with Python, but we're going to focus on R for today, but the same syntax is used regardless of language or bash or anything else. If you have code chunks, you can manually type them, you can click back to back to back to curly bracket are curly bracket, but more often you're going to either use the shortcut, so command option I or control all control all I and windows and Mac, or there's the add chunk command in the editor toolbar. If I go back to our studio cloud. There's this insert code chunk button. So let's say I delete this, I can do a code chunk, and it will insert a code chunk for me. Or if I do control all I or command all die, it will inject a code chunk for me based upon what's available in the document. So you can just insert those automatically without having to manually type out everything. Lastly, there's also the command palette. So if you go to, let's say, delete this, make some space here, command shift P opens what is called the command palette and this allows you to do anything that's a shortcut. So if I say insert a new our chunk, insert a new our chunk, and if I do command shift P again, insert a new bash chunk, it will insert a bash chunk wherever my cursor was. So command shift P gives you this ability to search all the different commands, and you can do any shortcut that way inside our studio. If you used our markdown before you're probably you're familiar with syntax like this, you have a chunk label, then a comma, and then option equals true or this kind of equals syntax and everything jammed into the curly brackets. That is still valid with Cordo. So I mean if you have older or markdown documents, or if you just write out this way. That's fine, you know you can still do it that way, but you don't get all the auto completion or the consistency between the syntax. Again, Cordo is introducing this hash pipe syntax where you have a hash pipe and then the key value pairs, as opposed to using the equal sign, and having some of this kind of inconsistency between what the YAML looks like, and what the actual chunk options look like. So this is the preferred syntax, although again backwards compatible with our markdown. So for what is called, there's a great song by Weezer called hash pipe, and that's how I always think of it is like it's a pound sign and a slash or vertical line, or a hash pipe symbol, or the pound sign pipe symbol. As far as why this is an option like why do we change things around. Number one it gives us consistency across engine so for Jupiter and Nitter, it's the same kind of approach. So if you write things across the YAML and the chunk options, as well as the fence div. So if you write things, you know with the fence steps like this, there's consistency with the naming of those across all the different ways you write them. Lastly, you also have a lot of control over the order spacing of chunk options, you're not just limited to one line that keeps on running, but you can add things below each other. So with this chunk option, there's eight lines or seven lines of chunk options that we've added here. So I've got a warning goes false figure caption all these short things, but then line six through eight is actually all all text. You can imagine writing alternative text and you're describing this graphic. It's going to be very long might have a lot of text. And if you try to squish that into one line of code. It's going to wrap and wrap and wrap and be a bit messy to work with. But with the YAML style, you can do another vertical line and then however many lines of taxi want to all within a single key value pair. So the short cut for the hash pipe in terms of it is one. It's really like two, two command presses. But let's say we did like label equals Tom's chunk. Every time I click enter it's going to add a new hash pipe below it. So classes equals true. And I click enter is an insert another hash pipe. So I really only have to write one hash pipe and then I'm ready to go. While it's not a shortcut. There is those helpers of every time you click enter it'll inject a new one might click enter again, it'll then go back to being a code chunk below that. For some of y'all you might have actually used our code inside your syntax for chunk options and you can do something similar with our inside knitter and quarter as well. So here on line three I have I'm using what's called the exclamation expression syntax. And this allows me to evaluate any R code I want within that chunk option. So I'm gluing together the mean temperature was mean of air quality temp, and then I'm rounding it off. And that prints out the figure caption is the mean temperature was 78, which looks pretty valid like most of the values are kind of within this range. So I'll take that as the mean is about right here, which looks pretty valid to me. But again, any R syntax you want to evaluate, you can do that with exclamation expression in the chunk option itself. So in the quarter on our markdown you might be thinking at this point like I have older or markdown syntax, maybe I want to convert that over, or do I have to convert it over. Again, there's a lot of backwards compatibility with quarter on our markdown, and especially if you've done pretty traditional like HTML and PDF documents. They're going to transfer over very well. So on the left we have like output equals HTML document quarter changing that to like format equals HTML. We have like content, number sections CSS. There's consistency there between what the old names were and the new names. But again, Cordo is focused on real YAML syntax so it as dashes and no underscores, for example, where our markdown was less consistent with having underscores in some cases. YAML and Cordo is always going to follow this kind of word dash word syntax, as opposed to our markdown has some like underscores syntax, or other things where it wasn't as consistent with traditional YAML style writing. So you don't have to change all these things if you use like the Cordo CLI, you can render an existing our markdown as is, but if you did want to convert them, there's some of this consistency in a good way between the two documents. Just to prove it, I'm going to go in and in the workshop materials 04 static. It's pretty basic, but just proving that this is a dot RMD and the output says HTML. You can see it has the knit button here so if I were to knit it it would actually be our markdown. I can either use Cordo Cordo render with the R package, or from the terminal Cordo render old R markdown, markdown.RMD, and that would actually render it out to Cordo, even though it says dot RMD. The other option would be either changing format to HTML, and then you can see it pops up to the render button instead of the knit button. So let's take the back when I save you see out switches from format or from render to knit, or I can rename it to dot QMD, and that will force it to always be a QMD document and show it off as as a QMD as opposed to an R markdown. So let's rename that one more time. Let's just rename this back. I don't want to modify that too much for you. So you can render via the CLI to force even older markdown to be rendered as Cordo moving forward. Now, if you had something that you're like I'm really adamant and I want to modify our markdown to now be Cordo and be stable as Cordo. Option one, change that RMD to QMD. This will force Cordo to be used for rendering. Or you can change, you can keep the dot RMD file type, but change the output to use format and basically say like format equals HTML. That means you use Cordo. The other part is you have all these chunk headers or chunk options. Knitter the dev version as of a few weeks ago has an experimental function called convert chunk headers. And that will convert all of these like figure dot width syntax to the hash pipe syntax throughout an entire document. So you could very quickly take an existing RMD and convert all of the options to hash pipe style syntax across the entire thing. Importantly, though, like you don't have to change all this because there's backwards compatibility. You can leave it as is, but if you really wanted to like show the software like educational purposes or just so that you have all those nice features you can use that to convert all the chunks over. Now, if you remember, we had those figure dibs or pandoc dibs and we can do similar things with chunk options and make plots from code in a similar way. And again, this is part of the consistency between YAML chunk options and pandoc dibs. So if we look here, we've got some, you know, normal code, but then line four has this layout number of columns equals two. So I'm generating two graphics with ggplot. When I render this, it'll actually generate two graphics. So, you know, left and right, basically two columns fit the graphics into whatever those are. Because I am displaying this on a slide, you can see that they're kind of running off the page, but they're at least stuck into their own columns as appropriate, because that's what I'm telling you to do. For Madeleine, there was a question about a hash pipe shortcut. There is not a shortcut for hash pipe. It's a short kind of option. Let's go to here. Once I type one, and then say like label equals true, whenever I click enter, it will add a new hash pipe below that until I click enter again, and then it will go back to normal code. So it does have some helpers, but there's not necessarily a shortcut for it. You can do more than just, you know, the layout number of columns. There's all sorts of other things you can do. So you can do like two figure captions and display those beside or below a graphic. And we can use our percentage based layout also within the chunk options. So before we were doing a pandoc div on figures that already existed on disk. And again, here we're creating graphics and then doing the custom layout. So with this, you're going to say 40% for image one blank space of 20% and then 40% for image two. And when I do that, that's exactly what I get, you know, I get one graphic, some blank space in the middle, another graphic. And then I have two figure captions here, and those are applied to image one and image two. So whether using chunk options or using the pandoc gives you can apply similar syntax between them, and the layout, and the kind of hashtag syntax makes it pretty easy to do all that. Another part that a lot of people care about in terms of like creating their documents is making them look a lot of better. So that's a good question and I'll address that cons pros and cons of using ggplot title labels versus figure caption. Number one is if you do a ggplot label that's embedded in the graphic. So it's not actual text, it's part of the image. Figure captions are literal text. So if I like zoom in here, like this is text on the page. It's not part of the graphic where it's attached to it. So you can separate out creating the graphic from the very long description. So you might have someone give you a graphic and you're adding captions to it, and you don't have to recreate the graphic you can just inject captions onto it. Or you can use our code to evaluate and create figure captions based off of something and have them automatically numbered without having to use things like patchwork or cow plot. So in terms of creating like actual good looking documents. Again, I think that each the quarter defaults are pretty nice, but there's a lot of options you can customize across it all. So if you're thinking of HTML, it's going to be styled with what is called bootstrap five, or this is a CSS framework that's used for websites and many other things. And it comes with a bunch of different themes. So there's 25 total themes that quarter bundles and you can further customize them to use a theme. It's one extra line of code. So you say format equals HTML and theme is equal to La Terra. Or if I wanted to add additional customization to an existing theme, I could also include a dot s CSS file for this kind of SAS variables that allow me to change specific components of the theme that I'm using. Now as far as what themes look like, you might have something like this like a traditional blog, and it's using La Terra theme very minimalistic almost like 538.com or something. Or you have a dark mode theme like we see here with boot swatch, or one that's a little bit kind of more blue and kind of like a sky based theme. And there's all sorts of 22 other different themes you can apply, but just note that with these themes they change text, they change background colors, they change every component of your of your page, as opposed to I'm going to do it piecemeal by piecemeal. Again, I'm linking out to all the different themes, but we can go and look at the oh for static a boot swatch themed to go to quarter workshop. Oh for static boot swatch themed. So it's going to start with Yeti but let's change that to quartz, and then we'll render that out. Now when I get this you can see that it's got this kind of transition of colors behind the background, and it's changed the text to be white and then you've got like a color call out behind it. If I want to change it back to La Terra, for example, just change out the one theme component render it. And then this document will change and now it's a bit more traditional looking. And again it's changed the font the color all these different aspects of the report. So if you can't remember what themes are available, you can just type theme, and then control space, believe. Nope, the terror. Save that real quick. Should. Oh, it's not auto completing for me but there's a lot of different options there in terms of like the different boot swatch themes that you can use here. So they're linked out to I really really really like the terror, but there's other ones that you might get more value out of and really like. So you can change those by modifying the theme component within a quarter document. I'm going to briefly cover some formats like presentations and then we're going to take another quick break and go into graphics and tables and then finish with a deeper dive into static documents. So presentations that kind of a joke is that this entire presentation, you can just kind of write it in the same syntax. So reveal JS is how I wrote the presentation for today and quarter. And it gives you these interactive kind of JavaScript based presentation format, but you write it all with markdown. You're going to use format is equal to reveal JS. And then you have separation of slides by using either level one, or level two headers. So slide one, some content or list or graphic whatever you want it. A new slide is indicated with a level two header, additional content and then an image, and then slide three with another level two header, a code chunk and some chunk options. And essentially what this entire presentation was written like. And part of what quarter provides is you can also visual edit presentations in addition to static documents with with quarter. So you can convert some of these level one headers level two headers out to what they're expected and author nice looking presentations inside our studio with quarter. So it's not to go into presentations, but the main things that I would focus on is use level one and level two headers to separate your slides. You can add all sorts of content lists images code. You can use fence divs for columns. For example like here's some content on the left with a list in a paragraph. And then I'm an image on the right, which is my dog Howard, and he's really smushed up against the side of that column over there. So with presentations this fence div of columns is really useful for you know structuring your page. Again I'm doing my opening and closing of those fence divs let's zoom in a little bit on that. So I have four to start for the end. I'm using dot columns to initiate a section of columns. And then I'm adding a dot column and a dot column to separate out into a left and a right column. I'm also adding an additional class called a fragment on there, which is what allows it to show up is first the left, then the right. And that will allow me to display certain chunks of content as they pop up and you can nest these even further. But this is about as far as I go is like two columns or maybe three columns with fragments to show them up as they appear on the presentation. I'm showing you that again, learning those fence divs allow you to be very powerful, regardless of the format you're creating whether it's a presentation or a document itself. Someone was asking about collaborating with quarter projects and using like Python code and libraries with our code and our end and things like that. Porto projects are one of the most effective ways to use that. Porto projects are really directories that provide a way to render all or some of the files in a directory together, for example, like quarter render my whole project or quarter render on my entire blog or website. It also allows you to share repeated YAML across all of the documents. So in version, rather than writing YAML 15 times for 15 documents that are all the same, you can actually use quarter projects and an underscore quarter dot YAML file to apply the same YAML across all the documents that are available. It also allows you to like redirect output. So for someone who's asking about how to use GitHub pages. I'm using a quarter project to render my documents to the doc directory. So then when I put it on GitHub, it automatically builds as a web page. And then for collaboration, you can use freeze to freeze computation. That basically says like render a document and then store the output for the entire document. And if you transfer it to a colleague, as long as you don't edit that document, you just add your new ones. It doesn't have to re execute the code or even have code on that system. Now there's special types like websites or books or other kind of projects that you can create, like creating a blog, for example, but quarter projects don't have to be a website. It could just be an aggregation of files. One second. As far as for quarter projects, creating a minimal one, you have to have at least some quarter document and was called an underscore quarter dot YAML file, and that's what actually creates a quarter project. Usually that's going to have like a project at the top, and then you can say something like output directory is output or docs or whatever. And then you have some YAML that you're applying to every file in that directory. So maybe like table of contents, or maybe you're rendering to HTML and rendering to PDF for all of your reports. And you can further customize the things within the specific documents, but this will apply by default to everything across every folder in that project. If you want to learn a lot more about like building a blog or building a website, my colleague Isabella Velazquez, about a week from today, so next Tuesday is going to be walking through on YouTube, building a blog with Kordo and using Kordo projects. She's doing that for an entire hour. And again, that's a great opportunity to focus just on quarter projects. And you can add it to your calendar via this link or STD.io slash Kordo blog. You can just join it on the RStudio YouTube without having to sign up for anything. I'm going to skip forward through this one person at the start asked why the name Kordo. So number one, we named it Kordo because it's based upon a publishing format from the 1400s. What you see here on the page is actually the front and back of a single kind of piece of paper. If I had one piece of paper, and I printed kind of four sections on each page, when I fold it in half and fold it in half again. I have essentially like a document, I can just cut the top of it. And now I have eight pages formed from just four prints on either side. And that's what it was classically called a Kordo, which is a form of publishing in the early 1400s. So that's kind of where we got the name for Kordo, because Kordo is a publishing format in modern times. It felt like a good mix and mash between historical use and kind of current use today. We're going to take another quick break. So we'll take about a five minute break right now. So you're back in about five minutes from right now. So we're going to start on plots and tables and go over a little bit more of that syntax and creating graphics and tables and aligning them together and doing even more with that. All right, I see your question, Jonathan. So yes, that's partially a, my question would be, are you doing markdown tables, like literally writing them by hand or using an R package to create tables. So, not all packages can generate the same things across formats, you can imagine that at the package level. It's pretty hard to develop for word and for latex and for HTML at the same time. There are some packages that make that easier. GT summary. So the GT summary R package is one I'm going to talk about that actually wraps several packages including GT and flex table and other ones that is really good at kind of taking statistical tables out. If you're seeing inconsistency there, you might want to reach out to Daniel Solberg. He, I think he did a workshop yesterday on GT summary and he was using Korto. And I know I've used it personally and it's worked out good for me. So if you are seeing problems there might be worth opening an issue on the repository to make sure like what what's kind of going wrong and he can help diagnose some of that. It tagged me on that issue though and I can work with Daniel and we can kind of figure out if there's an issue with Korto and it's doing something weird or if there's something at the GT summary package level. But in theory GT summary should work for PDF and for HTML. We're going to come back together in about two minutes. And yes, thanks shop and yeah, glad that you're able to do that workshop I think there's some overlap and kind of walking on the same topics with GT summary in this quarter workshop. I think Daniel probably just approached it more from very heavy focus on maybe the clinical reporting with tables and this is much more focused on like general tables and some of the quarter specific syntax. And Daniel's great though in terms of very very good programmer very kind person. So if you do have an issue with it kind of not displaying properly. I think an issue on GT summary would be a good start, and then feel free to tag me in on that as well. All right. We are back and gonna be jumping a bit more into plots graphics and tables. We're talking a bit more about some of those layout options and kind of again, we've gone through some of this and just kind of repeating and providing some context about how things work. But this hopefully looks similar to what we talked about briefly earlier. So there's these layout options for on disk graphics. So things like layout number of columns equals two. So the task is to take two images or multiple images and put them all together and presented on the page. Now, the part that you're also seeing is that we have caption of like a and B and sleeping and happy. And then we have an overall figure caption of like figure one, the two states of Howard, actually make this full screen to zoom in a little bit more on that. So what we're doing that is by giving these their own kind of figure ID. So adding a span to this. So the curly brackets with the pound sign and then a name pound sign and a name to each of the images, giving them a description. So we're in the square brackets on the left, adding what we want the caption or label to be for those, and then adding an overall caption label for all the graphics as the final sentence within that. And if we do it this way, that's how we're able to get, you know, graphics with sub labels and IDs and an overall label for the captions together, in terms of this is two images as the two states of my dog. So we're always sleeping or always happy. Another option is with number of columns equal to. So here we were, you know, doing all the different captions and labeling, you don't have to use those so you could just use, you know, separate them out with layout dash number of columns equal to, and putting those together and you would get essentially a smaller image like it would give you this like on a table or off a table, but you don't have to use those sub captions if you're just trying to type set them or lay them out on the image. As you aggregate more images and you're not just with two. Maybe you have four or six or 10 or even more. You might want to switch between number of columns and number of rows and make things go a bit more laterally or horizontally depending upon how your document is structured. So one equals two will basically like always have two rows and append on to those it will never go longer than two, it will keep adding on kind of left to right, as it adds images on to there. So that's another option is like switching from number of columns to number of rows and then controlling it. Again, you can add specific captions to these, if you want to or add an overall figure caption at the bottom. Now, you can add basically anything into a figure div like here I have like an iframe to a YouTube video about baby elephants. I didn't necessarily create this as something of an image I pulled off of disk I just wrote it as a raw pandoc div. So here I have a three columns to start a label in terms of this is fig elephant as the ID for it. Then I'm just using literal HTML to do an iframe and giving it a figure caption of elephant as the final piece of text. And this will say figure two, and specifically saying figure two because figure one already exists in my document. So I didn't have to write out figure two equals elephant, it will automatically add the numbering system to images as you add them into your overall documents. So we can go between the row and column layout by going back to figure layout. So we got our studio cloud. And we go to visuals. There's a lot going on in here so we can go to plot layout.qmd. It has some options for using it with code chunks. So you have layouts in terms of the code chunk options. As well as basic plots with doing gg plots. And then it even has figure layout two, which has some more of the kind of captions like we were saying. So let's take this one. This is figure-layout two. If I render that, it'll show the different structure of the document. Now, I'm not as focused about showing the specific code here but just showing you outside of a presentation. The structuring of these images is a lot more useful because you can scroll, as opposed to on a presentation, if you add more rows to it, they're going to go off the page. So we can add like the labels for excited and sleeping still excited still sleeping, and then a figure caption. And then below that it has figure two. And then figure three. So it's automatically numbering these even though I'm switching between like row and column layout and the overall structure of how I'm setting up these different images together. So while we can swap between them, as you add them into kind of a more traditional layout of the document, it'll add on all those numbering systems to it as well. Now I talked earlier about the percentile based custom layouts. I still think that's much more intuitive, but you can also use just a pure numbering system of like ones. And here, you know, like it's going to read this as two equal sized images on section one. And then below that one that takes up 100%. So by doing that with the layout, we get something similar to this where it basically tries to fill as much as possible the space with the image on the bottom. And then the two images on the top are equal with up there, even though the images themselves are vastly different in size. So while this is possible, I still would rather prefer to see this as like 5050 100 and using that percentile based syntax. That's a bit more intuitive to me and more consistent when you're looking at it and trying to interpret it. If we were to do that with the percentile syntax, we would do it as like 7030 and then 100%. And then we have one that's a large image taking up 70%, a somewhat vertical image that's 30%, and then below that one that's trying to take up as much space as possible, essentially like the entire row for that document. And again, these images are not actually scaled behind the scenes, like they're very large images and they wouldn't actually fit together very well. So I think that's why I chose doing its best to align them and structure them, according to the percentiles that you're placing there. Howard gets all the treats so he is very much a cat dog or a lap dog and he gets to hang out with me all the time. So he gets all the photo shoots for sure. Good call Madeline. And part of the benefit of why I like the percentage based layouts is you can do like these negatives and they actually make sense. So I have like 40% negative 2040% to make a total of 100. And that gives me like half and half some space in the middle, and then baby Howard taking up the bottom of the page as he's on the table. And then structuring it this way, you can do it up, slice the dog or slice the cat up a bunch of different ways, but percentile based is the one that I'm most comfortable with and I think is what I prefer teaching. If you were trying to do vertical layouts, like you could imagine I have this very tiny image and I'm doing this where it's like, he's a baby puppy and I'm trying to make it smaller and over to the right. So you get into these really complex layouts where you have layout and numbering systems with like some negative space, and it's basically like, mostly picture one partially picture to a little bit of blank space. And then I'm vertically aligning them to the bottom. So even though this one is very tiny, it's pulling it to the bottom. So this is layout or format agnostic so you can use these different types of layouts for all sorts of different documents without having to figure out how do I do this and word versus doing PDF versus do it in HTML or CSS. So it's very extensible, but you know you don't have to use all these different features all at once, you can start with some of the basic layout number of rows and number of columns. And that takes us back to the document we were looking at that had like all the different figure layouts together with number of rows and number of columns. I'm probably going to leave that one as more of, we've seen parts of it, but just so you can play around with it in the future. Now the other part is with. I'm actually sure that's a good question. Can you specify exact dimensions. I believe that's partially why you're not limited to the 100% syntax. You could imagine doing something like 500 and 100 and thinking of it closer to like almost like pixel widths but it's not true pixel width, you do that more with code chunk options where you could do like fig dash width is equal to something and you can layer those together. That's kind of what we're doing here, not not fully but like when you're doing code chunk syntax, you have a lot more tight control over exact sizing of images. So, again, those figure layouts work for for graphics, whether you're doing them in pandoc divs or in code chunks. So here layout number of columns is equal to two, because I'm creating two graphics. I can align them in that way. And if I were to put these together. Now I actually have side by side number of columns equal to two. And in most situations you want equally sized images. Obviously, maybe there's a time where you want like a really narrow really tall image, but this is really nice for actually programmatically generating specific images for like ggplot. And then you can add your figure captions just by adding additional dashes to separate out those one from the other. For those figure sub captions, the way that I approach that again if you think about this like with having a and B, as opposed to before we had just figure captions and it wasn't like numbered or lettered or anything. It's just saying item one and item two sub captions allow you to do like cars and empty cars, and it'll be figure three. So for this figure caption is charts. So that's why it's giving you this overall figure three of charts and figures sub caption is what's actually giving you the a and the be that we see here at the bottom. So a is cars B is empty cars and then it's cut off here on the page, but it's figure three, which is overall description of charts for that one. So when you can do a lot of control then those code chunk options and doing it with this hash pipe is a little bit more controlled to me as opposed to trying to do it in one line across the page. And again, you can even do this with your percentile based format and get very, very tight control and add like individual spacing in between, and have blank spaces, even if the graphics you're creating aren't using something like how plot or patchwork to align them. And then you're adding the sub sub captions or overall figure captions, in addition to their overall layout. So this plot layout is covered a bit more in depth. If we go back to section 07 visuals plot layout QMD. This document has a lot of different options of like doing figure captions figure sub captions layout number of columns, really just to show you a few of those in action, as opposed to in the slide form where we're only looking at screenshots. So we can render that and get the actual page. And now we have the proper like here's just captions of the document. So we have captions giving us actually lettered or numbered versions of the images with a overall figure caption, and then doing some of the more custom like adding spacing in between, or overall structuring of the the images. So that's just available in case you want to go a bit further with like how you control those layouts. There's one who had asked earlier about overall structure of kind of arbitrary content so you can imagine like lists or paragraph of text as well as images. This layout number column equals to also works for text. So this, this Pandoc Dev here has two columns. It's got list one with a bunch of list items list to with a bunch of list items and then it ends the Pandoc Dev. So if you want to get a left and a right column essentially like with obviously you could use the dot columns syntax but you can put together images and text this way. So for journal articles, if you want to customize the facets that you're doing. I don't actually have this in the presentation but on Cordo dot org, not Cora or dough. There we go. So part of the benefit of Cordo dot org it has these nice sub cap. Let's do this. So figure sub caption is how we're actually creating those and we can go this is on the Cordo website, the authoring figures. Sub figures. Option location. So I'm just trying to find this for you and if I can't. It's a good question to tag me on online. So yeah I'm not sure about changing. I know there's an option for it. I'm just not thinking about top of my head. It's a good question that I'll write down. So, Hannah I'm going to grab your question and put it in my notes for later. And I'll tweet that out or something to see if I can actually grab your ask. Copy that. Thank you. Sounds good. So you can do this for text as well as for images you can kind of put images and text together or overall just structure the text that you're working with. So you can imagine I have like some bullet points and then I have a long paragraph immediately after that that I'm laying out with like a column structure. So that exactly as you imagine there's the items on the left and then all the text on the right. So you can again type set these documents in an efficient way without having to do weird things in different formats. The other option and this is awkward because again I'm in a presentation and I don't think it yeah it's not going to do much customization, but grid layout is one more option see if I can. We're going to try the grid layout as well. Grid layout is something more specific to CSS. It's not really something you can do across format, but it really lets you dive super deep into layout structuring of documents. So we're going to try the grid layout here. So we're going to go G columns so let's go to our studio cloud. The visuals. The part that I'm looking for here. Go to quarter to org grid grid layout. So grid layout basically allows you to think of your page in units of 12 basically like 12 wide, and you can do these dot g call for g call eight. And the reason I bring this up again it's very specific to CSS and it only works in HTML, but it allows you to do very creative things with like tables and text and images all together and control their layout. So if you get into that situation and you get frustrated by some of the other options CSS grid and using this column layout is an option for you. So most of those were focused on like type setting images or text and just like individual parts at one time. Another option is what is called article layout that overall structures kind of the entire section as opposed to just the images. So that would be things like limit to the column body like you normally saw with just the center portion, or an outset where it goes out to the left to the right, or span the entire page, or go into the margin. So these are again going to be classes that are applied with pandoc divs. You can use a pandoc div, take this content and it will escape larger than the overall document it will go a bit farther into the right hand margin or completely take up the margin for example. This is again, it's not really possible to show on a presentation without screenshots because the presentation is always 100% with. But we can look at the plots section. So we go to plots dot QMD. And if I render this, we're going to look at what that looks like. And it has some of the other sections for the layout. So more traditionally, you have the body, which is like the actual width across here. So it's just taking up essentially 100% of the body, but it's, you know, not taking up the whole page, you know, I'm just zoomed in where it's showing part of it. And a normal graphic will just stay within that range, you know, it's not going to go outside of the body of the text. But I can make it fill the entire width and do things like figure dash width or figure height and customize the sizing of images and force it to take up 100% of the image. I can throw it into an aside or into the margin so we can actually embed a tiny graphic next to some text. Or I can do what's more called like overflow content. And this is where we're actually using those body classes like body outset right. In addition with figure width to force it into the margin, or to force it even farther and there's all these different subclasses that allow you to really control like how far to the left or far to the right. So this is kind of a force together example of like, you're not necessarily going to do all these different layouts in one document. But you can imagine that there are times where you really want an image to be full width and go into the margin, or other times where you just want to be constrained to the to the body of the document. So this overall the plots q&d within the visual section of the workshop gives you all that available. Yes, so good question about hiding the hashtag lines. So I'm doing echo equals fenced on all of my code. If I did echo equals false, and I were to render it, it's actually not going to show any of the code. Or it would show only the code and not, not the fence portion. So if I go back to, well, these are all echo equals true, but so echo equals true will show the code. Well, these are all echo equals true, but so echo equals true will show the code echo equals fenced will show the code and the curly brackets and the hash pipe echo equals false will hide the code. So that will allow you to control showing you the whole thing showing just the code or showing no code just by changing the false true or fenced options within the echo. So echo equals false. Good question. Now for ggplot to if we think about it. Number one, I'm using the Palmer penguins package, which is a common one for examples. It's a cute example with these penguins that will be using using ggplot and removing all of the nays from the data set. I'm not really concerned about like what the code is to create these but it's from the Palmer penguins website. I'm more interested in controlling how this image is presented through quarter. So by default, it looks pretty good. It kind of like fit it on the page and made it wider than it is tall. And just by printing it, I get a nice looking image that's appropriately sized. But I can control all these components about the image through the code chunk options so I can constrain it to be very small on height. So a figure height of about two inches. I feel very good. But maybe for another graphic or if the DPI were smaller. This would allow me to fit like two images on the page. But if I were to make it even taller like on a linear document, I could make it fill up more of the vertical part of the page, but you can control this with things like figure dash height or figure dash width to control the height and width of your images. So figure dot height equal for this is more appropriate the size looks good. And by increasing the DPI, I've made the image appear a little bit better, and also shrunk down the text a little bit. So this is not too big for the image, it's appropriately sized for this presentation. So if I make the DPI or the dots per inch, this does make the image larger on disk in terms of it's like a megabyte as opposed to 400 kilobytes or something like that. And you don't necessarily want to go like 2000 or 3000 DPI. For most situations, you know, 300 to 600 is appropriate, but you can go higher than that if needed. But if I make the image really big. And again, on a presentation, it's really constraining it to fit into what's available. So it's not running off the page. But you can see how everything is shrunken down because I've made the image bigger and increase the DPI and then the quarter presentation has had to respect that and shrink down the image overall to fit in this range. And you can combine height and width to overall control the sizing of your document. So again, we're not using gg save. This is just, you know, applying the customization to the image itself, and then doing things like controlling the DPI as well with with you can combine height and width and DPI and all these options are controlled via the chunk options with a figure dash, you know, appendix to the front. So you can kind of search for fig dash and then there's all these different options of the customizations you can you can also control the alignment so you can imagine that if you had this wide image rather than forcing it to the left, maybe it looks better in the center of the page. Again, by using fig and then something behind it figure dash align here, we can make it left or right or center aligned on the page, and that will allow everything to appear more appropriately for your document. The last part I want to cover in terms of graphics before we get to tables is that you can also embed interactive graphics. So HTML widgets and R. What is the size. Oh, good question. So there's a question what is the size of the whole slide. These slides are 1600 by 900 pixels. So the slides themselves, you're thinking of like these are in inches is what these dimensions are. So when you do something that's larger than the actual slide, it's going to shrink down the image for the workshop components for like the plot layout and some of the other stuff that's here with figure layout. So you can actually customize them to actually go beyond what's available just in a presentation for interactive graphics like this HTML widget which is leaflet. You can actually control those in a similar way. In terms of controlling the size of the overall presentation, but just note that there's this interactivity available in an R through HTML widgets, in addition to observable JS. We talked about it a little bit beginning but again you can essentially create like on the fly interactive graphic graphics, and they follow a similar grammar of graphics that GG plot does. So it's a new syntax, it's a new language in terms of JavaScript, but writing it is going to feel fairly similar to the code that you would have written with GG plot in some ways. The last example I want to cover with with graphics and interactivity is from GG IRF. And this is one of my favorite because it lets you essentially take a GG plot and make it interactive. So again I'm not too worried about showing the code here. I just wanted to include it so you could see for the future. But this allows you to have like hover text that applies across graphics. So I have graphic one and graphic two, and you can hover over things and like here in Texas I live kind of down here and in Bexar County or Bear County right there in San Antonio. And when you're moving back and forth between these graphics there's also the ability to move across the two graphics with GG IRF. Madeline had a good question about aspect ratio. Yes, so if I were to go in here and go fig dash, you can see all the different things that are available so figure dot aspect ratio, which allows you to do figure width and then set the aspect ratio for height and width, as well as things like figure column DPI format height, all these different figure options that are available. A question from Raha with HTML from our markdown there was a limit to how many interactive plots you could have. I don't know of like an upper limit on that part of it is that as you embed data in terms of like JavaScript like this or SVGs are literally embedding some data or JavaScript libraries or additional things into the HTML. If you're using the same data set multiple times some of those can actually conflict with each other. So I don't necessarily know of any constraints that Cordo has per se, but some of the JavaScript interactivity might have constraints where they don't play nicely, regardless of format. So you do have like a reproducible example Raha I'd love to hear that on the, as an issue on Cordo, in case there is something that's unexpected. The last part of this section is covering more about about tables, in terms of, there's a lot of ways to make tables and are there's some good questions earlier about like using like PDF and HTML and working with it and I'm going to talk about a few different table making packages and how they work. So GT is one of my favorites. GT extras is actually a package I wrote that extends GT for including graphics. The big part of GT is that it's essentially like a grammar of tables. Like ggplot is a grammar of graphics for creating plots GT tries to apply a really good syntax to creating tables with a consistent and expected user interface. You will typically talk, start with a data frame a table or data frame, pass that into GT, and then you can create HTML latech or rich text format as the output from that. When I say a grammar of tables, what I really mean is that all these different parts are defined. And you could, you could actually like indicate with our functions and GT functions to apply different customization to those. So the title is subtitle labels different cell values all these different components you can change within GT. The GT table is very easy to create in terms of you take some data and then pass it into GT. And then you can take additional, like options to like customize the sizing or the font sizing across all of them. Pause for a second. Question from Nick. So if your data are embedded for interactive figures in your HTML is that able to be accessed. So yes, in theory, anytime you're using JavaScript and embedding data into the content, the data is available. You can't really hide it. So if you imagine like going to like 538 has an example of an interactive table and you can actually see the data being loaded behind the scenes. I generally say that like when you're working with graphics, you're typically working with summary level data. And so you're not as concerned with people finding like the exact values because you're not attaching like a username to it or anything. It's just data. And honestly, like, for a lot of things, even with static graphics, you can still identify. Oh, this this data value is found, even if it's not interactive. So for GT extension packages, again, GT extras is one I wrote that does a lot of like theming and inline plotting. And then GT summary is an amazing package for descriptive statistics, or statistical summaries of models in addition to traditional GT tables. So GT summaries has a lot of applications within medicine is basically like our medicine. And it comes with some clinical trial data, even in the package that we can work with. So when we create GT summaries, you might notice syntax like this, take a data frame, create a table summary, group it by treatment, and then add p values. And this will actually do like statistical test it will break it up by treatment in terms of drug a drug be those are the two treatments. And then it gives you all these characteristics like age and grade of the tumors, and then p values to see if they were significant according to Wilcox and rank some tests and appears in Sky Square. So it can do a lot for like statistical summaries of data as your descriptive statistics as well. A very, very good package. The other part I'll say about GT summary is that it actually wraps several our packages. So in most situations, it should be able to write out to word and PDF and HTML within Cordo and outside of Cordo. So it's a good package for generating these medical summaries or descriptive statistics that you need within medicine for GT extras. What I'm doing here is taking a data frame grouping it by species and sex, and then creating what are called list columns of data. So look here we see things like this column actually has 73 values in it, and this column is 73 values in it, and then some of the other ones have fewer values by that group. This is essentially like embedding the data within each of those rows. So when I create a graphic, I can create like a summary distribution of that data. So with the singular values, they're using those as like the average of the bill link or the average of the mass, but then I also have a graphic, in this case a density plot of the entire distribution for male and female species of different animals. So I have the male and the female representation of the sex, as well as a different species here with the summary statistics embedded in there. So this actually wraps part of GT extras for some of this functionality so you can do this in GT extras and GT, GT alone, or actually apply these additionally to GT summary tables for Daniel Silver's package. Lastly, I'll just say that like GT extras also allows you to do kind of stylized data journalism tables that embed things like inline graphics and colors. So this example of recreating a graphic from the German political elections this past year, and that was done with really only one line of code. Take GT or one additional line of code, take a GT table of this data frame, and then do a plot dot graphic and add it to that. And then a bar chart below it that's based off the number of seats that were one. So there's a lot of graphics and things you can combine and then also use those within Corto. I've included a couple examples for GT summary and doing those within QMD as well as PDF and other formats. Again, part of what GT summary provides is, let's go to the 07 static. You can add HTML PDF and otherwise, I've included examples so you can render those out and see that they do render out to PDF normally. So I would expect like the table to look like this from from GT summary when you create those summary statistics, you'll actually create a PDF table, or it could also work for HTML. For browser, they do look a bit different in terms of what they look like, but you can create these nice looking tables in either format. We're going to take another short break and then wrap up by talking about static documents. We've got about 46 minutes left before the workshop is over. So if you do want to go through like the hands-on material, I've really been trying to cover just like here's the core concept so that you're presented with some of them. And then giving you this material to try out after the fact. With a lot of the workshops that I've done, you know, doing it all at once. You know, you play around with it, but then you forget providing these as take home examples is kind of my goal for not only showing you how to do it but also providing you examples you can work with after the workshop is over. So we'll have a short break. So we'll come back in about six minutes and then close with static documents. I'll stay around. I'm going to turn my camera off and get some water real quick. But if you do have questions, I'm happy to answer some of those and I'll still be here. A good question for vignette building. So right now crayon does not have corto available for. I don't think bio conductor does either for building vignettes. I'm going to benefit in the reason like we're still maintaining our markdown, because there's so many different are specific things that it does. You can imagine that trying to do all that with quarter would require rebuilding entire are specific ecosystems within quarter. And the value add for doing some of that is is low when the ecosystem is really well established. The areas where our markdown is kind of more friction heavy was in this like single source publishing or just consistency between things that weren't artificially constrained like crayon. So crayon very specifically has opinionated defaults that they want to receive. And there are limitations to the types of PDF and HTML that they will take. In theory, you could create the type of content with corto, you're definitely not going to use the full extent of corto within crayon. So for now definitely you're to stick to using our markdown for vignette building and documentation for packages. But great question. We're going to take about a five minute break here. All right, we are going to jump back into it now and close out the last 40 minutes or so with static corto documents. Again, I'm very focused on HTML. I think that there's this drive that I think that moving to HTML and kind of motivating groups to move to HTML is very powerful for both open data science open kind of computing and better accessibility and a lot of other benefits. I'm totally aware that word and PDF are very, very common across the world and academia and in medicine. But as much as we can kind of advocate for using HTML as a default. That's a much better world for a lot of people to work in. I'm going to focus on HTML, but again, a lot of the content that we cover here is also applicable to PDF. I'm trying to focus on features that are cross compatible. So even if you learn a lot of things that HTML only for corto specific stuff that can apply to PDF as well. Again, for some of your older or markdown documents or when you're trying to convert generally static documents like HTML PDF are very easy to transfer directly to court. You can just take an existing or markdown, try rendering with corto and see what happens. And most times it'll actually come out looking, looking really good. The main difference here is that difference between the format versus output in HTML document versus HTML, or in this case PDF document versus PDF. The old our markdown we've already kind of shown that in terms of taking old content you can render it via the corto command line interface, or change the file to be dot QMD. For me, like a static document. This is most of what I create outside of like maybe presentations I do a lot of internal presentations and training where I actually write presentations to do those. But a static document is really the daily driver where it has like, you know, table of contents there's figure there's code, other things and it's a linear document. So it's nice for things like just a scratch pad or even a final output for your team, as well as like a lab notebook or notes on the experiments that you're running. As far as table of contents, part of what that provides as a benefit is structuring your document. So while headers can actually physically separate out a document. So table of contents actually allow you to navigate between them quickly and have an outline or this table of contents that floats with the content, and you can move through it. By default, the table of contents is level three headers and above so like level one two and three headers. But you can also customize this to be more exclusive or more inclusive on the depth of table of contents that it picks up. So quick example and see. So here on this page. Literally it says on this page, these are the different table of contents, and you can see that as I scroll through the page, the table of contents floats with it. So I can move down to the instructor the overview, or go all the way up to the top, and go back to the schedule and move quickly through the document in that way. The benefit of what the table of contents provides is not only do you separate sections where it's like okay this is the start of a new section, start of a new section, but I can link to this one, like actually give a direct link to this part of the page, or navigate through the table of contents. So that's about tab sets in terms of switching between columns. So I'll probably skip through, I think this is repeating so for footnotes that's, that's a good part. Footnotes we talked about inside the presentation. And if I show, let's do this. Let's do our TD.io. Let's start Cordo. Okay. I'm going to show off one part of this, apologies. I just want to make sure I show this aspect getting started with Cordo. Apologies I'm bouncing back, I just realized that the iframe is not showing. So that's unfortunate, but for footnotes, citations or other things like that, you can take some text and then use this syntax to add a footnote to it. So this upwards block and then open and closing square bracket. And that allows you to add a quick footnote to something where it's, you know, more specific to that and allows you to add footnotes just to a specific word and say like here's some more information about it. Now when you do that, it's actually going to show you a, a hover text in terms of you can hover over the final output and it will show it within presentations or PDF it will just create a footnote at the end of the document or an end note at the end of the document. So what we can use with like static documents is what are called cross references. In this case, I can add details about an image and then link to it later. So by adding this ID or this cross reference in this case like fig dot glamour or fig dot Howard. I can use those to link to it later on in the presentation or in the slides. So there would be, I can actually use this syntax like copy this into the document, and then link back to that exact figure and move back and forth between the document in addition to just the table of contents I was working with. So for the references that we wrote, you can, you know, hover over mouse over the citations and footnotes and you'll see a pop up, and you can control this behavior through the YAML header. So again, sub options is like do I want citations to hover yes or no, don't want footnotes to hover yes or no. So for this, you know, I say like for example, did you know that Howard is a dog, and then add this footnote that says specifically he's a boss interior, although sometimes he acts like a cat. And then if I look at this inside a rendered document. If I hover over that it gives me the hoverable footnote, and he is definitely a cat. And then I can actually navigate back and forth with the footnotes that are at the end of the page and will take me back to number one that footnote. So, you know, obviously this is a constrained example but they are useful for adding additional context, or citations out to a URL or anything like that. Just additional details that you want to share about your information here for code. This is again going back to get some good questions we had, how do I show or hide code. So at the entire document level, I could say within the YAML header. Go back to code within the YAML header format is equal to HTML, execute echo equals false. And that will basically say for the entire document turn off code echoing or don't show any code. And still at the individual code chunk or code block level, say echo equals true and show the code I want to, only with some of them showing. But I don't have to show all of the code for everything if I don't want to. So you can balance these back and forth like turn on code echo equals true and then turn it off for individual chunks or vice versa. These are all features for what are called like code folding or code summary. Code folding allows you to fold the code behind a details tag, so that you can basically turn it on or turn it off at the user level. So it's typically defaulting to hidden, but they can open it up or close it. You can do this at the individual code block level as well. There's always kind of this balance between doing it at the YAML for the entire document or at an individual code blocks. If I do something like this, it adds on this kind of option to hide all code show all code or do things like view the source. That gives the user the ability to actually display or hide code interactively. So maybe you default to hiding the code, but for data scientists who are looking at it, they can open up and be like, oh, this is how they did it. They are using this type of graphic. And I learned something, but for your business users or physicians are working with. Maybe they just want to see the results and they don't really care how you got there in terms of the code. They just trust you that you're using the code to create it. And then balance that in terms of showing hiding code or interactively allowing the user to make that decision. That other option in terms of the source was part of code tools as well. And I can again say like source is equal to true. So make it where you can view the source code that created the document. Or make it where you can have a caption or toggling on and off the code. There's a lot of different customization you can do with that code tools option. So for source equals to true, if the user were to click on that, it will actually display the entire source code for that document as a pop up page. So for this, it would actually show the document itself. And if you click on source code, it basically puts up an iframe and allows you to scroll through the source code for the entire document. And that would show you like the actual markdown in addition to our code that you're seeing there. So for examples like today where I've got, you know, 15 different documents, maybe I don't want to show individuals I just want to send them to GitHub or source repository. You can also say here's the source go to github.com and look at this, this page. So at Cordo dev, this page actually builds the index for how to build the homepage. And it's links out to there I supposed to embedding a really really really long source code into the document alone. So we can look at this real quick and go to our studio cloud where again we're on 04 static now. On Penguin report, I'm just kind of combining a few different things we can actually turn code tools true. And let's render this real quick. So I'm taking a document with a table of contents and just kind of trying to show how that looks throughout it. So, number one, I've got the code here, and I can look at the source code for this entire document, even though it's got a little bit of code. It's mostly showing all the markdown and other customization I've done you can see how it's embedded as an iframe on top of the graphic. I have a floating table of contents so as I navigate and say like well I only care about the modeling section. I just want to see the summary table. Okay, everything was significant for these and here's the R squared values for the relationships. And the wrap up says this is an example, but now I want to go back up and understand what was the statistics for the body weight, and you can navigate between the document. In a relatively simple and nice looking document it's got a lot of details with the YAML header, embedding the source code, and providing a nice table of contents that allows you to navigate through that. As far as moving forward with more of the code you can also change the code highlighting. There's a lot of code highlighting options that are linked to here. So maybe rather than just hide it you want them to appear better. So I can change the highlighting style so like for my editor that I use personally on our studio, I do I really like the Dracula theme that gives me this nice contrast and a dark mode theme. And then you can also change like the border color to be dark green or white to contrast against that. You can change it to be more of like a GitHub style and go for that and again change the border color and make it have a different background, and you're changing the colors of like overall how the code appears as opposed to just the syntax highlighting. Nice part with both Cordo and our markdown this is not necessarily specific to Cordo, but the download our package allows for syntax highlighting and automatic linking of our code. Now, download with our markdown was really only possible via package down so like when you did package documentation you could link to source code. So Cordo brings it into the default YAML and you can actually do what's called code link equals true, and that will allow you to whenever you're writing our code, it will again give you specific sections of where you can click on the our code and it takes you to the code documentation. So a lot of nice stuff there. So we close out with some information about journal articles and then take open questions for the last section as we close out for the day. But for journal articles. So Cordo does have the ability to write out to many different journal formats, such as ACSM plus ACS journal statistical sciences, Elsevier and many others. What this allows you to do is again you don't have to write any latech, but you would actually use these formats, and you could just bring those in use a template and then write everything by working with the article templates themselves. Behind the scenes these templates are tech files or latech, but you don't necessarily have to write all that by hand. If you did have some things that you're applying you can bring in templates or partials that you want to. And especially for doing things like adding author affiliations, it's got this rich ability within the YAML to add all that so that when you put it at the top of your documentation. The journal articles will appear appropriately formatted for for that journal specifically. There's a lot more formats that we want to add over time. And we definitely want to hear from y'all in terms of if there's specific journal formats that you want to see, please reach out and post those on issues on Cordo journals. That we want to make sure that we're basically creating the journal formats that the y'all need for your daily work. I also want to make sure that, you know, as we kind of wrap up and then go to open questions that, you know, like the same team that works on Cordo also works on our markdown. So you might recognize the names like Yiwei or JJ or Kristoff. These are people who've been in our studio for a long time working on our markdown. Carlos and Charles are newer to the team that they've been with us for quite a while as well. And they're working more exclusively on Cordo. But these are the same teams work on Nitter and Cordo and our markdown. So again, we're not dropping support for our markdown. Just, you know, a lot of the newer features are going into Cordo rather than building additional our markdown extension packages. As a summary in terms of like what's going on here with Cordo like there's this benefits of batteries included in sharing syntax across a different output types and languages. So again, choosing your own editor and if you're collaborating, people can use their own data science languages. We're building a lot more of our materials into newer features into Cordo. For the content from today, we have full workshop materials at this short link, or for the RStudio cloud materials, I'll drop these into the chat. Copy that. You can see the RStudio cloud link with all of the workshop materials available. If you don't want to install anything. Cordo.org. I'll just give it another kind of shout out to that in terms of, it's an amazing amount of documentation. Two parts that I would suggest is for the guide. Think about what is the format you're trying to do. So like if you're trying to work with static documents, there's all sorts of different sub sections for the specific formats. You can see that it covers most of the markdown syntax and Pandoc and Cordo syntax that you'll need. And then computations goes over things like using R. Specifically to writing like journal articles or scholarly writing, there is this other section for cross references and citations and footnotes, lots of use there that's beneficial. And lastly, the search is actually really good. So for example, like if I want to do expression. I'm going to do this and find our studio and actually get things about the knitter engine and the expression syntax is there. So even though this is kind of like a very niche element, like being able to get there quickly from the search bar. And if I search for like chunk options. So you can see first it does like using our and talk about that then execution options and all the places it finds using in our studio, and it breaks it up into these sections for when you're searching. So, don't don't sleep on the search function it's actually very, very powerful. For these last 15 minutes or so I'm actually going to see if we can open up for audio based questions. And I think, I think Emily is still around if you could open up or help with audio. People can now unmute themselves. Perfect. Cool. So I'm going to keep, I'm going to reshare the slides but I'll answer kind of open questions at this point. Is there an R command or get Cordo version the highlight which version of Cordo is used session info. Thank you for the kind words for Jeremy. I have an open feature request on session info so if you want to pile on to that and upload it. I was asking for it to be added. I had a short helper function that I wrote that was returning Cordo version. But if you want to thumbs up that or add some more context this is the issue to follow it on session info. So for the Cordo R package, there's one way so Cordo path tells you where Cordo is. Or you could say something like system, Cordo, sorry, Cordo version system. And that will actually return like the Cordo versions you could have that inside the body of a document, make a system call like that. Lastly, this is a bit more hacky so I don't necessarily always want to recommend it, but inside any HTML document. If you inspect the behind the scenes and look at the head. It'll tell you what version of Cordo was used to generate that document. So that's one way of checking it after the fact if you forgot to do it. But good, good question. If you're learning Scheringan presentations to Cordo, you have any suggestions. The biggest thing is I was a very much Scheringan power user, and I truly loved Scheringan, like I was a big fan of it. I very quickly, you know, started enjoying using reveal JS, because it worked a little bit better with our studio and there was just more features built into Cordo as opposed to again with Scheringan. So we're relying on Scheringan and Scheringan extension packages and not all of our markdown work there. You can keep using Scheringan there's nothing wrong with that. But if you did want to, you know, work with reveal JS, like for some of the materials that I have here, like intro to Cordo. Scheringan presentations is very similar to Scheringan. The biggest difference is that you're separating sides with headers, as opposed to dash dash dash syntax. So where Scheringan used three dashes to indicate this is a new separator, Cordo is kind of relying on headers. That being said, let's go here to a Cordo presentation. Let's create that. Number one, you'll see that it has the visual editor mode that's only possible with Cordo presentations. Let's go back to source. You can still use dashes to separate slides and or you can use level one or level two headers. So you can try just rendering your existing Scheringan presentations over. Some of them will work, but there's some Scheringan specific syntax that you'll need to translate into Cordo. Specific page breaks and HTML document. Yeah, so first off, good question. We are working on the page down equivalent of HTML. That is going to be a way of actually doing paginated HTML as like a first class thing as opposed to kind of hacky doing it. But for the Cordo documentation, I want to say, I've got too many things open now. I want to say there's a page break. So this is more focused on PDF and Word in terms of it's more applicable there. But in HTML, it does this page break after CSS. I'm not super familiar with how that actually works in practice. Because again, like an HTML document is not really paginated, but you could separate out your content that way. But this page break shortcode and Jonathan, I'll drop this into the chat. Rebecca, great question. So part of there was a very intentional decision in discussion internally with like book down conversion and other things like that. And part of the part of the decision not to kind of provide a translator is because some of that is so custom that it would actually be more annoying to kind of have this thing do something automated. And you're not sure where certain things didn't come over, because you can imagine that book down uses quite a bit of syntax that's specific to book down but also does things with like HTML and other parts that don't translate well via our code. What I'll say is that if you go to Cordo.org, or there's actually a book down to Cordo book, Nicholas Tierney, I think, now I'm literally just trying to, yeah, okay, I got that right. So, number one, for the product books, creating a book. In this way, like if you just took your dot RMBs from a book down, and then put them in here as chapters, you could probably convert your book down over exceptionally quickly. The part that would take more time is any of the customization you did that was hyper specific to book down. So you're still using this idea of like chapters that are each their own dot RMB or dot Q&D. And the gallery has some examples of books. So, there's a number of books that we've converted over with hands on programming or other things both an R and Python that have been conversions and like Hadley is working on like our packages, I believe he's doing Cordo now for our packages and our for data science, or at least we've converted those over as examples, and it's got source code as well as the published version. Now all that being said, Nicholas Tierney is a great human being, and actually has written out a their notes on changing from our markdown book down to Cordo. So in this and it's a not super long, but it just talks about like what is the differences, what does it do, and then moving from our markdown to Cordo. So in terms of like, he wrote some little things about like doing some of this programmatically. Again, I can't promise that everything's going to work out perfectly. But the core difference is that you have a book down yaml, then he's become a quarter dot yaml. So in Cordo dot yaml is going to control overall the structure of your website or book or anything else. So remove that and then he's got some additional building and talking about like here's where the errors were, and how he changed the metadata and things like that. So this is a great resource for kind of understanding some of the basics, but overall, the gallery shows you some working books and how they approached it and they look really nice. Or the actual documentation on Cordo dot org books talks about like how you need to structure it. Absolutely. Thanks for a great question. I'll stick around for some more questions I know we're we're losing some folks as we get closer to 6pm for me or even later I'm sure for people on the east coast or elsewhere. But thank you all so much for hanging out for almost three and a half hours I guess three three hours and 20 minutes or so. At least for the next 10 or 15 minutes if needed for questions. But if you have any other questions I would say, there's a few places to get help. So, Cordo discussions if you go to Cordo dot org help quarter discussions is a way to ask questions directly to the dev team or on Twitter and I'm going to make the decision to pull up Twitter live which is never a great choice. The hashtag Cordo pub is what I'm trying to promote as a good catch all for the Cordo resources, and then you can see all sorts of things that people are sharing. But thank you all so much for your time. I hope you enjoyed the art for medicine conference. And thank you all for hanging around with me and hanging out. And thanks everyone for the kind words. Thanks Rebecca good to see you here. It's been a while I think I've talked to you Rebecca but good to virtually see you and thank you all. And Emily I think we're wrapping up I'm not seeing any more questions but seeing some very kind thank yous and appreciate y'all's time for hanging out and for the kind words. Thanks Emily.