 Hey, in this short talk, I want to introduce you to a new R package called Flow Diagrammer that we recently developed. This package can help you make nice looking diagrams just with R code. The motivation for this package is that there are many areas of science where people use models that can be represented by variables and flows, also sometimes called compartments or nodes and processes. These models are often cast in diagrams and these diagrams are very good ways to communicate the model. At the bottom there is an example, the SIR model, which has become pretty popular lately due to the COVID pandemic. This model is susceptible, infected and recovered individuals on a population level. And so you see the differential equation formulation and then at the bottom the flow diagram. And these flow diagrams are very often used to communicate models like this. Generally, what you need to do if you want to create a diagram like this, you need to use some kind of graphical software. You want it to have a way to be able to produce those diagrams with just a few lines of R code. And we wanted it such that you have a fully reproducible plot, made-in-gg plot that you can also then further modify. And the Flow Diagrammer package that's developed by us, which is my colleague Andrew Tridentic and myself, allows you to do that. Here are the basics of Flow Diagram. First you specify the model. It's very simple. You define a vector of variable names and then for each variable you define again vectors of flows in this kind of nested list structure. And once you've defined your model, there's a two-step process. First you call a function called prepare diagram that gives you a data frame that we'll talk about in a few slides and then you use that to make your diagram. So if we apply this here to the simple model you just saw, you get the diagram at the bottom. Almost always you will likely want to adjust the look of your diagram. There are multiple ways you can do this. One way is the make diagram function has an optional list diagram settings where you can supply all kinds of settings such as colors and line width and text size. So here's an example and if you were to apply this to the diagram we just saw, you would get this kind of diagram. So you can see you can do a lot of modifications here already. Another way you can do modifications is the prepare diagram function also allows for an optional argument and in this you can define settings that also change the look of the diagram. Currently implemented you can specify the names of the variables and if you want to use them and then a very important one is this matrix var locations. With this you can arrange the boxes, the variables on a grid. For a simple diagram and if you don't specify anything they are just applied left to right. Now that might work for something like this SIR diagram but if you have more complex ones you want to align them probably in a specific way. And you can easily do that with setting up this matrix. So in this example it's not necessary here but just to illustrate we put S and R in a top row on the left and the right and I below that in the middle. And if you supply this to the prepare diagram function and then call make diagram you get the diagram at the bottom. You can combine the two. You can supply settings both to prepare diagram and make diagram. So in this example we had the make diagram settings from earlier and the prepare diagram settings you just saw and then you get the plot the diagram at the bottom. You can do a good bit of customization with that but it might still not quite get you where you need to be and for that we have this two step process. When you call prepare diagram it returns a list with two data frames one for variables and one for flows. Here we're just showing the one for variables. And what you can see is that this data frame specifies the locations of the boxes and the labels and what the colors and a kind of other things and the same for the flows. And so since it's just a simple data frame you can now address specific elements in the data frame and change them. In this example here I'm going to make the I box a bit bigger than I trust the inflows and outflows so they're still at the edges of the box and also move the B times S times I flow around a bit. So you see I'll just supply different numbers for those. You can of course also supply colors. And here is the diagram you get and you can see you can combine this kind of adjustment with applying settings as I just explained earlier. And in the last step you can get the full code. There's a function that you can call. You give it the model and potentially all the settings you have and you get a file back that has the full reproducible code to make your figure. And so you can edit this code to make any other tweaks you want. Basically fully customizing your model. For further resources go to the web page of the diagram or package if you're further interested. It has a lot more minuets and examples. The package is not yet on crown. We're just trying to figure out a few more bugs in quality testing, but hopefully it will be soon. And we appreciate feedback. You can deliver that through GitHub or you can contact me at these addresses below. And thanks for listening.