I am Kelsey Yule. I am the project manager for the neon biorepository that's located at Arizona State University. And a quick overview of what I want to talk about is just what the biorepository is, what biodiversity occurrence records are, because that's the kind of data that we work with. With the biorepository that is overlapping but not the same as the type of ecological data you would find in the main neon data portal. Show our biorepository portal and how you would find or download samples. Really quickly, just bring up how you can access our samples and acknowledge biorepository samples and publish your own data through the biorepository portal, which is unique. The main neon portal does not typically pull in data from external researchers in the way that we can. So it's a more unique way to get some visibility for your own research within an official neon data portal, which I think is particularly cool. And kind of a demo slash scavenger hunt where I will actually use the portal to go find a couple of different things like a typical user might do. So first, we all probably know what neon is. Of course, there are these 81 terrestrial and freshwater sites. And the main thing I want to say about them is that in addition to all of the amazing data that neon is taking, they are also collecting samples at all of those sites. And we at the neon biorepository consider ourselves like a turntable that pulls in neon samples and data and then provides them out again to researchers to do novel things with neon samples. And then come back to the neon biorepository portal and further, you know, enrich the ecological data community. So we operate using fair principles so in keeping with neon's main data portal we are also, you know, concerned with the findability accessibility interoperability and reusability of data so that's something we just always keep in mind. As we are working with biorepository data and samples we have the same kind of outlook for the samples themselves physically as well as the data. So as I said, physical samples are collected at the neon field sites. They go are brought into the neon domain facilities. Then they might either go to external contractors who do all sorts of interesting like genetic or genomic or biogeochemical analysis on them or they'll go directly to the biorepository. Pretty much all samples end up being curated at the neon biorepository at ASU. We then publish the sample associated data on the neon biorepository data portal which is connected to but separate from the main neon data portal. We then push our data, our organismal sample associated data out to the global biodiversity information facility. So this is important because it is what makes neon sample data fully integrated into the overall biodiversity occurrence record data that is available globally and interoperable with that data. So I'll talk about how we do that a bit more in a moment. And then of course, we give the data and the samples to researchers so they come to us or receive a shipment of samples in the mail, or they get the data from our data portal and then they turn that into research that then we share and give additional visibility to through our portal. So we get a variety of different samples every year, about 80 to 100 plus thousand samples each year, they have a wide taxonomic spread, some of them look like typical natural history collections, specimens like oppressed or variant voucher or pinned insect. And then some are quite different, they might be environmental samples like dried soils, they might be a bulk community sample like the bycatch from neon pitfall trapping, or actually 65 ish percent of the neon samples are cryo samples so they are either chemical organisms or tissues or microbial samples that are frozen, according to the best practices for making their data potential available in the long term. So we have over 421,000 samples that represent over 3400 identified taxa. Of course we have these bulk samples that have a lot of unlocked diversity within them as well so there's more taxonomic spread in our collections then can be represented by the names that you'll see attached to an individual on the portal. So, we trade in biodiversity occurrence records in the natural history collections community. These, these data follow Darwin core standards, which is a standard that is developed and voted on by the biodiversity information standards group or TEDWIG. And it means that all of the records associated with neon samples have are following this stable straightforward and flexible framework for compiling biodiversity data from a variety of different sources. The data associated with a collecting event in the field might will look really different, depending on the protocol that it comes from, but we translate all of that at the sample level into these well defined fields that really represent, you know, taxonomically what is this thing who identified it as that where and when was it collected. If when relevant, you know what life stage was it what was its reproductive condition, the habitat that it lives in, but all of those are kind of standardized across all of the different collections that we publish. The one by repository data portal is a symbiota software based collections portal. This is a really commonly used software for managing and publishing biodiversity occurrence records, and it's an aggregator that brings in data, often from different sources, and then allows collections to both manage it within the portal and then it's published out to the community. I just want to point out that symbiota. There are many of these portals and they will represent different taxonomic groups or locations or research projects associated with samples and biodiversity records. So pretty much everything I'm going to talk about with using the neon buyer repository data portal would apply to how you would interact with any symbiota portal. So, this is a broad data skill to be learning. This is what an example of what a full record that you might see in the portal would look like. And just those those kinds of Darwin core fields that I brought up earlier are all present there. This is what it will look like when you pull up a record on the site, but then you can also download the data in the standardized version for many, many samples or specimens at once. So how you use the portal. I'll go really quickly through this because we'll actually demo it later on. So the portal looks like this like I've already shown this is the homepage for it. The primary way that someone might want to use the portal is through this sample search option in the menu.  So if you just went to the sample search and then said click that search button on the right you would get every single sample that we actually have at the buyer repository in those results but then of course you can filter that in a bunch of different ways before you get yourself search results. All of these menus or criteria in the portal are in these accordion menu so you can open or close those depending upon what criteria you're interested in looking for.  So when you are, you know, the first often most common way that someone might want to filter your results is by the actual tax on. When you start typing into the tax on box, the suggestions will show up and so you know that if you're clicking on one of those suggestions, you're actually choosing a tax on that is indexed in our taxonomic thesaurus so this prevents spelling errors which is really nice for, yeah, searching for complicated scientific names and it will also have common names when those are available. And just going back real fast I want to point out that here in this example we have algae which is not an actual, you know, evolutionary tax on its. But it is like an ecological type of pseudo tax on and we do have those available in the neon biorepository to match the types of ecological collections and ecological data products that neon collects. And so that's kind of unique to this portal. So there are three different types of collections in our portal. The first is the neon collections that are actually at the biorepository then there are additional neon collections. These are legacy collections from before the biorepository existed, or or something like the like the soil mega pits that were collected at the beginning of the neon project are not located at ASU and so those are something that you can also find in the portal, but they're in these additional neon collection section and then there's other collections from neon sites. So this is where we've actually pulled in these interoperable data sets from other biodiversity portals but it's for samples and specimens that were actually collected at neon localities prior to the existence of neon. So this is a way that you can kind of look at baseline diversity that's been studied at neon in the past. So, this is a collapsible menu that you can open to look at these different collections and you can filter them by taxonomic group. The neon theme that the collections are associated with or the sample type this is typically like how the sample is preserved or if it's a DNA sample versus preserved in fluid, etc. So you can, you know, again expand or collapse these options and select collections you're interested in. So you can click on any of the links for those collections you'll be taken to the collection description page. This is really useful gives a summary of what's in the collection photos of example samples in that collection links to the neon protocols and the associated with neon data products and also a link out to that global biodiversity information facility portal and all of the different publications that have actually used those samples, the data associated with those samples and their work. So, yeah, again, the collections that you select will be represented in the chips and under criteria on the right hand side of that form. You can filter the samples in other ways like if they have genetic data or images. And then we have a menu for locality. And this is where you can search by neon domain or neon site. You can click on any of those links and you'll be brought to the actual neon site description page. There's also geographic criteria where you can draw a bounding box in a map or actually type in latitudes and longitudes to search for samples geographically. Once you click search, then you will get the results. And these will be presented in a long list like this you can also look at them, the basic data in table view. And then of course you can download that data, and you'll have two options a symbiota native or a Darwin core native. So Darwin core is that that data standard that I talked about before symbiota native follows that data standard but then also add some additional fields. And then, right, that's what that says. And then when you download the data, if you choose to download the full zip file, you will get this, this folder you can open that will then have a number of CSV files in it. Most often you'll be interested in this one that's called occurrences that's where you have a single row in your spreadsheet for each sample or specimen, but you could have downloaded just that occurrences file or one of these other files like one that represents just the images for these samples. And then there is the option there to copy the URL for the exact search that you did. And this is useful if you want to make the exact search based on all of the criteria again or send these search results to to someone else. As you see there's these three tabs at the top of this list, and we're looking at the occurrence records one here, you can also look at a species list that lists all of the taxa that were included in the search. And then there's the maps tab, where you can actually plot all of these samples on Google Maps, or download a KML file. Quickly just, I want to really plug that these samples are available for use. And for many different purposes, even consumptively or destructively. Sometimes reach out to the technical working group for approval to make sure that we aren't depleting the spatio temporal and taxonomic diversity of the collection. But they're meant to be used very frequently and so we approve most things as long as researchers agree to share after publication of the sample associated data for use by the rest of the research community. And then you can find on our portal, the sample use policies and ways to acknowledge and cite us in your publications. And there is a form that you can fill out to request samples, or also, you know, I recommend just reaching out directly to buy a repo at asu.edu. If you're in the process of preparing a proposal that would use neon samples, you would typically need a letter of support from us and please reach out as early as possible in the process of that proposal of preparation. We'll provide those letters as quickly as we can but sometimes we do need to reach out to the technical working group to make sure we can improve destructive uses. In the end, I want to note that there can be a cost if there is an especially large request or one that requires us to do a lot of special handling or processing of the samples. So that's another thing we'll need to evaluate for in any research proposal situation so another reason to reach out. And you can also always come to Arizona State to look at and work on the samples. Like I said before, a really cool thing is that we do actually publish the value added data collected by researchers on our site. We publish these as public data sets on the site. So there is information about publications. Those are linked to the sample records so the publication is available directly within the sample record and then we also have this page for each paper that will have the paper abstract and links out to the paper as well as links to all of the samples that were used in it. So it's a way that we hope you can get additional visibility for your work. And then we can also publish those data sets out to the environmental data initiative portal for you as well. I want to quickly acknowledge the team that works at the Biorepository. We have collection managers, biodiversity informaticians and sample preparators who work really hard to make all of this available. And so with that, I want to actually just move to using the portal. So I am going to stop sharing this page and actually go to the portal. And you cannot now see what I said that I wanted to find because I'm going to actually go to the portal. But the first one I wrote as wanting to find is a description of the neon soil microbes sampling protocols and links related to the neon data products for soil microbes. And so how I would do that is I would go to our portal. And I'll just point out that our portal homepage also has those nice summary statistics that are always kept up to date and you can actually click on these as links. And then there that was a very easy way to see every single environmental sample that we have. So those would be like soils and aquatic sediments, etc. But if I want to find those soil micro protocols, what I would do is go to find the soil microbes. So what I did here again was I went to the sample search form under search. I wanted to expand the list of available neon collections. I am interested in microbes, so I expanded the microbes option. And then I'm going to go to the description page for one of these soil micro collections. So here, there's two different soil micro associated collections we have the bulk frozen soils samples. We also have DNA extracts from soils. So I'll just go for example to the bulk soil micro collection. Here you can see a description of what these samples are, then pictures of what samples look like this is different. These are the types that neon has used over the years. Back in the early years, they use these world packs but now they're in these nicer vials, but scrolling down. So here we have a link out to the sampling protocol document for these samples, as well as links out to some of the neon data products that are associated with the samples so you could cross reference sample IDs or sample barcodes found in our portal with associated data records in the neon data products. The second thing on my list to find was all perimuscus lucopus voucher specimens. So that is the white footed mouse. And how I would find all of our perimuscus lucopus vouchers is I would again go to this sample search form, and I would find perimuscus lucopus. And again, the search form has helped me not spell that wrong, because it's available in the drop down menu. So here's an interesting thing to consider we have this include synonyms check mark. And so if I uncheck that that I will only get the samples or specimens that are associated with this name verbatim. If I include synonyms, then I will get any other taxonomic names that are determined to be the same so if the tax on name has changed over time because the group has been revised, then those samples or specimens will come up as well. Also, sometimes we'll get samples from neon where they have got this mouse in the field, and it is not possible to distinguish these two species in the field based on the external morphological characters that this particular individual had. The neon field staff will indicate that it may be one of two species and they will do that in this way. And if we include synonyms then we'll make sure to get samples associated with either one of these names. So we won't miss potential perimuscus lucopus. Just because there was some uncertainty in the ID. So we want all perimuscus lucopus. I'm going to include synonyms because I do want them all. And then we want vouchers only. So like I said, this is a mouse. So we're going to go to vertebrates. I'm going to click on all of the available mammal voucher collections. So we get mammal vouchers that come as incidental mortalities from neon small mammal capturing protocol. We also get those from outside of standard sampling. So this is if a mortality is found outside of typical protocols that is also archived for research. And then occasionally a small mammal will fall into the pitfall traps that are put out for beetle sampling. And we also prepare and archive those individuals. So I'm going to look across all three collections here. And yeah, I wanted them all. So I am going to do that search. We have 75 of these vouchers. You can see in some of these cases we have these ones where these are from the ground beetle sampling, where they are this uncertainty. And then we have basically the rest of them. The ID is certain. If we went to the species list, we would see this these two different options. And so I want to look, because I also put on my scavenger hunt that you can't see anymore. So how do I find the determination history for an individual. So we now know that this one is paramuscus leucopus did the field technician know that originally or is that something that has been found out later. And so here we can go to the full record details. Oh, you probably can't see this because this came up in a new window. I'm sorry I will bring that over. Okay. Here we have that individual. And it, we can see the full details for this individual. And we can see that it is determined as paramuscus leucopus. And it was determined here by Laura Steger who actually works at the bio repository. And she has given this reference where she has. After the specimen came to the bio repository she has actually followed the protocol in this paper to actually genotype this specimen. So we can see the identification history. And here it actually was also determined to be paramuscus leucopus based on the field work, as well as the, the sequence in bold. So this one we are very sure of. But we may not have had that certainty for some of these specimens. Well, I've found two good ones, but often there is this field uncertainty that then may later be corrected and the new identification information can be found in the bio repository portal. And I also want to point out that you can see here in the records like this, that we also have material samples associated with the specimen. And here, this specimen was prepared by Laura Steger at the bio repository. And not only do we have the steady skin for the specimen but we also have a number of different tissues or organs that have been pulled out of that specimen and frozen and are also available for research. Okay, the next thing I wanted to, I put in the scavenger hunt is how to find a list of specimens that were used in a recent publication that is documenting vile diversity in rodents. So I mentioned before that we create public data sets associated with publications that use neon biorepository samples. So we can find that here in the research data sets and special collections page and we're looking for viral diversity. So there is this 2023 paper that I've found in this list that actually studied viral diversity and used a few of our neon mammal vouchers like those I just showed in the previous search. And here is an abstract for that paper, the link out to the paper, and then we can actually see the three voucher specimens that were used in this paper. When we look at one of those specimens, we can see that that reference is associated with it. And this reference will also be published in the data download for these specimens. And just as a reminder, it is this download button kind of in the top right hand corner of the search results. That is what allows you to actually download that specimen data and those biodiversity occurrence records, as well as other files like the image records and the determination history is also available in a separate file, as well as the list of all of those, what we call material samples like those organs and tissues associated with the vouchers. Next thing on my scavenger hunt was all DNA samples associated with organisms collected at the CP or Central Plains experimental range neon site. So, again, we would go do a sample search. We would want to find all DNA samples. So, we could go through and select only our DNA extract collections like this but there's a much more efficient way to do that of course which is to go over to sample type and just select all DNA samples. And so you'll see that these are either typical DNA extracts or they are pathogen extracts. So there's a different protocol that's used and those samples are used for pathogen testing, but they are essentially a genomic extract as well. So we will select all of those and then the easiest way to find all of the CP or samples would be to go search by locality. You could go find them in a map or put in the latitude and longitude if you knew it. I certainly don't know that for CP or so I am going to actually find the individual site. I do happen to know that it is located in D 10 Central Plains, which is easy for this one because this is called the Central Plains experimental range but you might have to search through if you wanted to select it like this. It is also quite nice that the neon biorepository search form does allow you to search in the locality field by site codes so we could also put CPER right in the locality but either one will work in this case. So as you see in the chips over here we have everything that is a DNA sample and CPER site and that's the filtering that we're doing. We've got 1454 of these samples. Again we could look at all of the record details for these and we could download the data, we could map the data, we could see our species list here. And so we have a lot of species represented here across mammals and mosquitoes and beetles. There are also microbial DNA extracts that would be included in this search result, but they do not have a defined tax on of course because they're a bulk sample so they won't show up in the tax account but they are here in our search results overall list. And then the last thing I wanted to do is another search, but this time I am asking what the number of unique taxa within the asteraceae family is collected at neon sites in the western continental US and you might be able to see how you would do that already using the search form, but I thought I would not want to miss out on at least showing what the map search would look like where you could do this same sort of search. So this brings up a Google map view of the whole world, but we want to filter it. And then let's say we want this western half of the continental US of course my my prompt here is not an exact thing, but we'll say that this is the western US, we want all asteraceae. This is the sunflower family of plants. And then let's search for that. So these are all of the sunflower family samples that were collected by neon in the western continental US and if we want to see those taxa. We can go over to this taxa list tab. So there are 325 different taxa that meet these criteria that were collected by neon and are available in the neon by repository data portal. And in the same way as with the regular sample search, you can download all of these records directly from the map search. So that's just an alternative way of searching for neon samples using our data portal. So that was what I had to share today and I'm really happy to answer any questions about how to use our portal or how to access samples, whatever folks might be interested in. Yeah.


Hey folks, in this episode of Code Club, we're going to take this figure and this figure. We're going to smash them together and we're going to produce this figure. How are we going to do it? Well, keep watching and I'll show you how. Hey folks, if you got to watch the last episode of Code Club, you know that I went through and did a pretty thorough critique of what I liked and what I didn't like about this figure published by Ipsos from last winter where they were looking at vaccine receptivity in 15 different countries using data that they collected in surveys from August as well as October of 2020. Of course, the data are dated, but it's still a kind of interesting visual to do a lot of work with and learn more about R. Fast forward, I received an email newsletter from a group called Chart R, no relation to R, where they took that same data and made this version of the figure. Actually, this is my version of their figure. And again, in the last episode, I went through and did a critique and kind of said, you know, this is what I like and don't like about each of these. Here's a figure that I would like to make. And I did a mock up in Keynote and so it's not a polished version of the figure, but it's a roadmap for where I want to go in today's episode. So I'm going to take the Chart R version of the figure and we're going to modify it to incorporate a number of different changes to make what I consider at least a more attractive version of the figure. That does a better job of telling a story about people's receptivity to receiving the COVID-19 vaccine. We're going to head over to our studio and get going. As always, I would absolutely love for you to follow along with me using your own computer and your own code to get started. Down below in the description is a link to a blog post for today's episode where you'll find code for two R scripts as well as the data that we are plotting. The two R scripts, one of them is the Ipsos version of the figure. The second is the Chart R version of the figure, which I've renamed to be August, October, 2020, makeover.r. That is going to be the foundation for our work today. I'm going to go ahead and run my entire R script to make sure it works and make sure it generates the file that I'm looking for without any error messages that ran through without any errors produces the TIF file of our version of the Chart R figure, which I think is a pretty good reproduction of the original figure. The first step that I want to take on is fixing the title, putting in a subtitle, and then bringing over the caption that we actually had for the Ipsos version to this. So the title here, Vaccine Skepticism by Country, attempts to tell a story, but it's kind of flat. The Ipsos version had some version of their legend title, right? So if a vaccine for COVID-19 were available, I would get it, was I believe the Ipsos title of their figure. If I look at the Ipsos website at their page where they published the figure that we started with here, right, the title of this blog post or this article, I think would be a great title for our figure. What do you think? I think it's provocative. It's bold. It's right there. It tells you what the figure shows. So I'm going to go ahead and copy this. I'm going to come down then into where I'm producing this figure down here in this big, long code block for building the plot. And I typically put the labs down here after my various scales. And here for my title, I'll plop that in there. And so that then puts the COVID-19 vaccination intent is decreasing globally. Great. I'm going to remove the chart R x-axis label. It was pretty cool to have it stylized to have two different colors, but it's not appropriate for what we're going to be remaking it as. So we're not going to have an x-axis label. We're not going to have a y-axis label. The caption here, ipsos, is a bit more abbreviated than what we saw in the ipsos version. So I'm going to come back to my ipsos code. And I'm going to grab that caption. Because as you can see, it has a bit more information in it. Copy that and then bring that and replace the caption. And I also then want to take the title that I had for the ipsos version and make that the subtitle of my makeover version. So I'll grab that. And again, I'll put that in here as the subtitle. So I'll say subtitle. So I'm also going to turn off the legend. We might revisit that here in a bit, but you'll recall that up here in show legend, we said true. So for now, I'm going to put that to false. And let's go ahead and re-render everything. All right, so we've got some funny stuff going on with margins, but we have all the text in there. So let's go ahead and into our theme and turn off the margin that we have on the main title. Also, I think there, if I recall, is a negative margin here for this, the caption that we had. So the first margin to change is the plot title. And so again, we had that margin here. I'll go ahead and remove this. And then also our caption, I believe had this margin. Yeah, where the top margin was minus 10. So we could pull it up and made it at the same level as the x-axis label. So obviously we got rid of those extra margin spaces between the title and the subtitle. We also no longer have the caption down here in the bottom left writing over our x-axis labels. We're going to get rid of those eventually, but again, let's just kind of work with the blank canvas here, if you will, kind of starting clean. The title I notice is running off the right side of the screen. I would like my title to actually be two lines and to use up the full width of the figure. So let's go ahead back to our labs function. And let's try to pick a point that's kind of in the middle where we can put a line break. So I think after intent, I'll go ahead and put that line break in there. And so that then gives us a fairly balanced title. We're not going to get a perfect full width two line title. I'm not a big fan of the font that they use. They use this Josephine slab, which is I think part of the chart are styling. They use that font and everything. What I would like to do is revisit the fonts that we're using by going back to Google Fonts. So I've plugged in the title into Google Fonts and I'm looking at all these different categories and looking at the different categories, I thought it would be cool to play around with, you know, maybe looking at a display font. So the display fonts are generally kind of, I don't want to say goofy, but different way of looking at the text. And for that title, I want it to be bold and to stand out. And so again, these are what they consider those display fonts. And so one of the fonts that I found that was really striking to me was this Patchua one. And so it again is bold. It's a little informal, but still formal. It's kind of a, it is a serif font. And I like that it is bold and that it really kind of pops out at me. So I want to use this Patchua one font. In the earlier episode where I talked about fonts, I talked about how we could use this show text package to bring in fonts to define our own families from Google fonts. So that's what we'll do here. So instead of Josephine slab, we're going to use Patchua one. And so then for the family, which we'll use down below in the theme, I'll do Patchua one. Let's make sure all this is loaded. And then we can come back down to our theme and looking at the plot title, I can put in replace of Josephine slab for the family. I can say Patchua one. And that gives I think a much bolder and really nice way of looking at that title. I noticed that the dots on the eyes are above the margins. We might need a little bit of margin space for the title. We can add that. I think we can also make the font a little bit bigger so that kind of the text from COVID to the T in intent goes all the way across the width of our figure. Again, we can come back up to our plot.title and let's maybe bump this up a little bit to say 28. And so that does a much better job of filling the horizontal space. I'll go ahead and add a small margin to the top of my plot title. And again, we can do margin equals margin and I'll do T equals, let's do 10. And so that gives us a little bit of breathing room at the top of the figure. So for the rest of the text in the figure, we were using Josephine sands, which is kind of the sand Serif compliment to the Josephine slab, which was a Serif font. If we come back to Google fonts, one of the nice things that they have are popular pairings that people have used to go with patch one. So in this example paragraph, the title here is in patch one and the rest of the text, you can change to be any of these different font options. So Roboto, Roboto is the most popularly used font on Google fonts. If you look at the riffamonus.org website, the main body text is all in Roboto. There's also open sands, Lato, we get rid of the highlighting there. Railway and Montserrat. The Montserrat seems a little bit more open and airy than like the Roboto does. I think I'm gonna go with Roboto much like we did with implementing patch one. We can come up here and we can say Roboto and then the family, I'll do Roboto and I'll grab that family name and we will come back down. There's a couple of places that we need to update the font family. The first is in text where we will then say Roboto and then up above, I believe we had ggtext right here where we also use Josephine Sands and I'll say Roboto there and I'll do a search on Josephine and I had a x-axis title here being element markdown but we got rid of the x-axis title completely so I'll go ahead and delete that line because we don't need that in our theme anymore and then I think that got rid of, yeah, all of our occurrences of the Josephine slab or Josephine Sands. So this gives us the Roboto font for our subtitle, our y-axis labels, all the numbers next to our points as well as for our caption here and also these x-axis numerical values. I'm pretty happy with the way this looks. One little thing I'm going to tweak is maybe go ahead and put a little bit of a margin below the title because it does seem that the subtitle and the title are running into each other especially with that g and the l in the globally and available here. So again, we'll come back up to plot title and for the bottom, let's do five and then again, that gives us a little bit more breathing room between the title and the subtitle. The next thing that I want to turn my attention to is getting rid of these values on the x-axis. As we talked about in the last episode, I think it's a little bit busy to have numbers right next to the points like we do here. So like this 88 and 79 for Australia as well as having the numbers at the bottom. If we removed the values next to the points then we are asking our audience to kind of scan up and down the figure, which is a lot of work, right? So in a way, it is nice to have the number next to the point. Maybe something we could think about doing is making that number actually a little bit smaller. So it's not such a pronounced part of the figure. So I want to get rid of these numbers on the x-axis. I also want to get rid of these tick marks on the y-axis because they don't think they really add anything when we've got this alternating colored background in the main body of the panel, which I like. But again, soon, soon we're going to change those colors to be a little bit more subdued. I will come back up here and looking at my scale x continuous. I still want my limits to go from 50 to 100 but I no longer want the breaks and I no longer want the labels. So to get rid of the breaks and the labels, so if we don't set anything, if we remove those two lines, it'll put in default values, labels and breaks. So to get rid of those, we can put in null. So that cleaned up the presentation a bit by getting rid of those numbers on the x-axis. Let me know what you think about getting rid of those values on the x-axis. As a scientist, I feel weird, kind of removing that very traditional part of every figure. But again, we have those numbers right there next to the point. So I don't think it really adds anything. Let's go ahead now and remove our lines for the x-axis, the y-axis, as well as those tick marks. Again, coming into our theme function, we can look at axis line and remove that. So now we see those gray axis lines are gone. Now we want to get rid of those tick marks. Those tick marks on the y-axis were created in part by this line here in the theme function. I'll go ahead and comment that out for right now, as well as up here on the scale y continuous. And so we want the scale y continuous as a way to place the country names, but we don't need it for placing the tick marks. So we need to modify the scale y continuous. And to do that, what we really need for the breaks are data y position. So we can get rid of everything else here. And then for the labels, we need data dollar sign country and we can get rid of everything else that's there. All that other stuff was in there for those tick marks. So that gives us a tick mark now for our individual countries.  We actually want to also set that to element blank like we did for axis ticks x. And you know what? I think we can make axis ticks without an x or y and setting that to element blank should make all of our tick marks on the x-axis and y-axis blank. So that did get rid of those tick marks along the y-axis. And I think, again, removing those things from the axes is really cleaning up the presentation and making it a more attractive visual. The next thing I wanna take on are these alternating colored backgrounds. I like the alternating colors, but I'm not such a fan of color. I'd rather this be more subdued and traditional and really let the color be the points. What I want for the alternating color is to have a light gray as well as a white. Now, in this figure, you'll notice there's a space up here at the top between India and my subtitle. That's because there's actually a row here for what they called total. Total was really an average across all of these 15 countries for the two dates. So that's still in there and this was actually a third color. And so when you look at our scale fill manual, you'll see that we have three break values, A, B and C. The data frame that's generating that is the stripped data and that no longer had the total because we got rid of the total. So we don't really need the C anyway. So we'll go ahead and reduce the number of breaks down to two and the number of values down to two. And we'll go ahead and get rid of those labels, which didn't matter anyway. And so I need two values. I need white and I need a gray. And so my white, I'm gonna make FF, FF, FF. So again, the two characters go together. So it's red, green, blue. And so all F's is white. And then for gray, again, we've got that red, green, blue. That if the value in red, green, and blue is the same across all of those, we'll get a gray color. So I'm gonna go ahead and do F8 in all three channels to get a gray color. If it's too dark or too light, we can go ahead and adjust from there. So I think that gives a nice alternating colored background. Of course, we want the background of our plot to also be white. So we can come back up to our plot background and we're filling that. And again, we can put in white. We can also name white in quotes and get the same effect, but let's use the hexadecimal. That again gives us our white background. I think I'm gonna go ahead and make our title black instead of this teal color. Again, like we saw earlier, our plot title is gonna be 000000. So all zeros then in hexadecimal is black. The default color is black. So I could also remove color equals whatever, but let's leave that in there in case we want kind of a foothold to know where to change the color of the title should we change our mind later on. So again, that gives us a nice bold black title, nice clean background. And I really like this appearance of having these white and gray strips. Now, one thing I'm not such a fan of is that France is white and India is white. I'd rather have the plot be bookended, if you will, by gray. So let's go back into our scale fill manual and we can flip these values so that we have A being gray and B being white. So we see that we do now get those alternating colored backgrounds with France being gray and India at the top being gray as well. I just like having that kind of gray boundary on the plotting window. So it's not like those points are just kind of floating off into nothingness. I don't know, it's a small touch. And the other thing I wanna point out is that the A and B in our strip data frame are just kind of dummy values. They don't mean anything. They don't represent anything. They're solely there so that we can then use that scale fill manual to attach a color to those different ribbons in our figure. The next thing I wanna take on is altering the color of the points that we have in the figure. As you can see in the chart R version, there's this green point that is for the October point and the darker blackish color is for August. There was a legend here that again, we removed earlier. The Ipsos version had two different shades that were kind of related to each other, but there wasn't a really strong contrast to them. And you might recall that I had this challenge of constantly looking back to the legend to remember which color was August and which color was October. And so I would like to clarify that for our audience even better in this makeover version. So what I'd like to do is pick a really bold color for the October data. So perhaps like a really royal blue, a really strong blue color and then a paler shade of that blue for the August data. And so we can do that by taking the really strong blue and removing the saturation to again kind of make it more pale. And that way we've got two shades of blue. The brighter will kind of hopefully key to our audience that that's more recent. And the paler will key to our audience that's older. Of course, we will have a legend that we will be putting back in here as our final step in making over this figure. But the other thing that that will help us to do by removing the saturation is to give a stronger contrast than what we saw in the Ipsos version and perhaps a more meaningful contrast than what we see here in this chart, our version. Here in keynote, I have two white rectangles created. You could do the same exercise in PowerPoint or wherever. I just had keynote accessible to me. And so I've got this white rectangle on your right, my left, and I will pick the color wheel for the fill and I'm gonna pick a color that's right about here in this really strong blue color. Again, we could get the hexadecimal by going up to RGB sliders. So I'm gonna grab this and then plop that color, that same shade of blue onto the other side, the other rectangle, and I'm then gonna go to the HSB sliders. So HSB stands for hue, which is what we think of typically as the color, the saturation, which is kind of the blueness of that color, and then the brightness. So again, what I wanna do on this right side is take the same blue and I wanna pull down the saturation, right? So you can hopefully see that as we pull that down, we get a lighter color. Of course, we don't want it to be so desaturated that it's a white. So let's pick something that's maybe about a third of the way across and so we'll get this light blue color. Of course, we can get the red, green, blue for that and so that's gonna be this value down here. Coming back to our studio then, I will go up to my scale color manual and for my August, I want that desaturated value and then I will get the hex value for my stronger blue and put that in for my October value. So this gives us that really royal blue color for October data. I think it really does signify recency, current. Maybe it does, I don't know. Let me know what you think down below and then that paler blue being the older data and again, we do have a pretty strong contrast, but that pale isn't so desaturated that it blends in with the background and I think it looks pretty good and we don't see something that we saw in an earlier episode where my perception of this light blue or the dark blue is being altered by the gray or white color in the background. So there's a few things I wanna do to clean this up further. I'm gonna go ahead and remove our beloved arrows. At this point, I think it's just extra and just makes the plot more busy. We can come back up here where we actually had a data frame for arrows data and go ahead and delete that and then we also had geom path where we were plotting those arrows. So we modified that way back up here in our data pipeline and you'll recall that we said percent August, less than percent October, move it to the left if it's greater, move it to the right. If they're the same, so true, then we wanted to make it in a real. So I'm gonna go ahead and remove this true value as well as this true value. So then I'm gonna make these first case when lines to be less than or equal to. I'd now like to modify that text to be a bit smaller and we can do that way back up here where we had our GG text. We had size equals three. I'm gonna drop that down to size equals two. That does make it smaller. It's a bit far from the actual point. So I'm gonna modify the bump that we had way up here in data to maybe make it plus or minus two on each of these rather than 2.5. Now we've got those numbers closer to the points and it looks pretty attractive. I like the size and the proportion of them pretty well. I think that gray color also kind of keeps the number a little bit subdued so it's not overwhelming all the other stuff on the figure. Something that I think is kind of overwhelming the data in the figure are the handles of the barbell being this black line. I'd like to kind of soften that a bit and maybe give that the same gray as we see for the number and maybe make it just a smidge wider so that it's not lost kind of in the background. So to change the appearance of the handle on that barbell, I'll come back up to GM line and this color had been the color of the August data in the chart R version which is kind of that dark color. So I'm gonna go ahead and make it eights all the way across to give kind of a medium intensity gray and I'll make the size one make it just a smidge wider. And so now we see the handle on the barbell. It's not as pronounced as it was with just jet black. It's clear that the points are connected but it doesn't overwhelm and I think that kind of shifting that black to this gray really draws the eye to the dark blue points which is really where I want my audience to be paying attention. So the final step in this makeover is to implement a legend. We had taken off the original chart R version of the legend because my goal in this makeover was to insert vertical lines showing where the average response was across the 15 countries, colored by the two dates. So we'd have October with a vertical line and August with a vertical line. The more I've thought about this though since I made that episode, I'm thinking that's kind of stupid.  It doesn't make sense to do an average like that when there's so many more people in India and China than there are in the United States and France or Canada, you know? And so it's a weird way to do an average and I just, I don't think it's necessary. What I'd rather do than this is revert back to the chart R version of the legend and perhaps use this subtitle, which is similar to the title of the legend in the chart R version. I'll show you where there's a small difference, but it's an important difference. So we'll come back into our R script and I will comment out the subtitle for now and then we'll come back up to G on point where we have show legend equals false and turn that back to true. And so, yeah, I know it looks bad. And so we see a couple of problems. So the text of the title is overlapping with the legend. The colors of the text matched the color that was previous there for the point. So there's a few things to fix. Let's start by adding a margin to the bottom of our title so there's more space to see what's going on in the legend. So let's go back up to plot title and at the bottom margin, I'm gonna go ahead and make this 20 so there's enough room between that title and the legend. Let's now turn to the color of the text next to the point. This was inserted using a span, an HTML span with some styling using that element text from ggtext. I'm a bit worried that this August 20 is gonna get kind of washed out with the faint blue. We'll see, it's easy enough to change and then to convert back. Again, we can come up here to our scale color manual and our October is this hexadecimal, plop that in there and the August likewise. And so now we've got those two dates. You know, I do just feel like that August 20 is getting too light and hard to see. So let's go ahead and revert that back to black so we can come back up here and remove these two spans in the labels. It was a nice try, but yeah, it just, it doesn't look right. I don't know, maybe you think it looks okay. I don't know, not me. I wanna go ahead and look at the title. I wanna go ahead and grab this subtitle that we'd commented out and let's compare them. The differences are pretty subtle, but I think important. So we'll go ahead and put in this backslash N and what you'll hopefully notice is that the chart R version here on the bottom says, I would totally, I totally agree I would get it. So totally used in this context in American English at least is kind of what we kind of jokingly call valley girl speech. If you've ever seen the movie Clueless, which I know I'm dating me was a big movie when I was in high school. They would say totally as a way to say like they completely agree, right? Like that is just the way it should be, which is very different than actually the way the survey was asked. So totally I think in this context is taking that total and inserting it into the legend. And so what this really represents is a composite of people that have varying levels of agreement with the statement. So I'm gonna remove that totally and we'll use that as our legend and I'll strike this subtitle and I'll also go ahead and remove the subtitle from down here. So by shortening that title of the legend, those points came over closer to the right side of the title. I wanna insert a little bit of space there. Also, you might notice on the left side of the title, the left side of the legend, there's a scape space there as well. So we can change that with two steps. We can do legend dot margin, margin, and I'll say L equals zero. That will move the legend all the way over to the left side of the plot. Now we wanna add a right hand margin to the legend title and we can then do margin equals margin. And then R, let's do 15, that moves it. Let's bump that up a little bit more. Let's try 25 and that looks pretty good. So now looking at this legend for the last couple of moments, I'm realizing that we have October and then August. Let's go ahead and flip the order of those two months. To do that, of course, we can come right back up to scale color manual and we have October and August and I'm just gonna quickly flip the order of these two for the breaks and the values and the labels. And that sure enough, flip the order of our two months. So I think this looks really attractive. It definitely tells a story. Again, we didn't really change that much about the chart R version of the figure and we didn't really change that much about the Ipsos version of the figure. It's a few subtle little steps to try to use the data to tell a more compelling story than if a vaccine for COVID-19 were available, I agree I would get it, right? We put in a title that is bold, that is eye catching and tells a story, right? Intent is decreasing globally. And then we are using color by changing the saturation to show the elapse of time, which I think is again, really attractive. And we have that handled to the barbell there to show to the audience that the points are connected. And I think again, we've done a really nice job of making the figure more attractive. What do you think? Let me know down below in the comments. One thing that stands out to me though about this figure that I don't quite like and that I would like to experiment with is to instead of putting the percent on the x-axis to percent on the y-axis and then to put time on the x-axis, then we could have a line for each country indicating the change in over time of people's attitudes towards receiving the vaccine. It would become much clearer if all the lines are going downwards or I guess to your perspective downwards that there's this downward trend in vaccine acceptance. That is called a slope plot. And so that's what we're gonna talk about in the next episode. If you wanna watch that episode, please be sure that you're subscribed to the channel and you've clicked the bell notification so that you're sure to hear from YouTube when I post the next video. I'd love to share that with you as I've been kind of working through this project. I've had this in the back of my head that I really would like to see this data as a slope chart. I don't think it's gonna be a panacea for all problems. Again, no chart is perfect, but I think it will be an improvement upon this visualization. We'll find out in the next episode. Anyway, keep practicing with these types of tweaks, implementing ways of cleaning up the presentation of your figure, as well as trying to tell a story with your data. We'll see you next time for another episode of Code Club.


Mallory Weiss-Tair versus Borhov syndrome. Hey guys, I'm Boris. I'm a physician assistant. This is gonna be day three of 30 days of PANTS review. Physician assistant, national certifying exam, PANTS, whereas some people like to say PANTS-C, PANTS review every day for the next 30 days. So let's choose another no-card at random. I guess I just did for my gigantic stack of no-cards here that I personally use to study for the PANTS. And this question is going to be, give me the differences between a Mallory Weiss-Tair and Borhaves or Borhov's syndrome. So Mallory Weiss-Tair versus Borhov syndrome.  Okay, I hope that was five seconds. So Mallory Weiss-Tair. So these are both esophageal tears, okay? Tears in the wall of the esophagus. Mallory Weiss and Borhovs are both esophageal tears. Mallory Weiss-Tairs are partial thickness, whereas Borhovs are full thickness. That's the main difference. Partial thickness versus full thickness. So a little bit of bleeding versus a lot of bleeding, okay? Partial thickness-Tair, Mallory Weiss, full thickness-Tair Borhovs. Also, differences usually in how you get these things. So a Mallory Weiss-Tair is usually due to retching and or vomiting. So the classic presentation, which you might get in a test or on the pants, is gonna be, I don't know, 28 year old person, 28 year old male, was at a bachelor party, had too much to drink, mixed too many different kinds of liquor, and spent the entire night retching.  So usually from retching, vomiting, that's where you'll get your Mallory Weiss-Tair. And even on my note card here, I have the classic presentation as a patient drank too much alcohol, spent the night vomiting, and now has hemoptysis, he metemesis, they're either coughing or vomiting up some blood. And again, don't forget, a Mallory Weiss-Tair is a partial-Tair in the wall of the esophagus. A Borhovs-Tair, Borhovs syndrome, is, excuse me, it's a full thickness esophageal-Tair usually due to an EGD. Forget what the heck EGD stands for, but it's an upper scope where they stick a camera down your throat to check out your stomach and esophagus and whatnot. So it's actually usually iatrogenic, iatrogenic means caused by a healthcare provider. So it's a disease caused by a healthcare procedure or treatment or of some sort. So iatrogenic means that people like me, people like us healthcare providers gave you this problem. So Borhovs is usually iatrogenic with an EGD. So they're doing this scope, this camera down the throat and they pierce the esophagus all the way through. It's a full thickness-Tair. And the way this presents is a lot of pain, hemoptysis, you're coughing up blood, coffee grounds emesis because so much blood is going down the esophagus that's bleeding so much and the blood is going down the esophagus, you're swallowing it and then it's getting digested and then it comes back up as black kind of coffee grounds emesis because it's blood that's already been digested by the stomach and now on its way back up the other way up the esophagus. Also hematocasia, melanin, so either purple or kind of dark black stools, not bright red blood in the stool, that's a lower GI bleed, this is an upper GI bleed. Remember, this is an upper GI bleed so it's gonna be dark stools or purple stools, usually kind of dark black, not bright red, okay? Bright red is gonna be in the vomit, so hematemesis. So one more last time, what is the difference between a Mallory Weiss-Tair and a Borhovs syndrome? Mallory Weiss-Tair is a partial thickness-Tair of the esophagus, Borhovs syndrome is a full-Tair of the wall of the esophagus, full thickness.  Borhovs, it's usually itrogenic, usually caused by an EGD, a procedure where we put the camera down the throat and it's usually due to a mistake during one of those procedure, it pierces the esophagus and you get a lot of pain, it's much more painful than a Mallory Weiss-Tair.  So they both could have hemoptysis, hematomesis, coughing or vomiting up blood but there is just gonna be more of it in Borhovs syndrome and you're more likely to have the coffee ground emesis, the melanin and the hematokesia in Borhovs versus Mallory Weiss-Tair. See you guys in the next video, peace.