closeread
BSTA 526 Functions of the Week
See the syllabus for links to presentations from previous years.
0.1 Instructions
- Please sign up for a function(s) here (Enter your name and the week you want to present): URL coming soon
- Please submit on Sakai
- both the
.qmdand the.htmlfiles, and - your dataset if you are loading your own dataset (without your dataset I will not be able to render the file and add it to the website)
- both the
- It is VERY important that your yaml is updated so that posting your file on the website is seamless. Update in the yaml above the following:
- title: use the format
package::function, such asdplyr::slice. - description: a brief description of your function(s)
- author: your name
- date : date you are presenting
- title: use the format
- Do not change the
pagetitleorsubtitle. - Your submission will be added to the class website. Remove your name from the yaml if you do not wish it to be included and let us know if it is okay to post it anonymously.
- Delete the sections with the
InstructionsandDataset instructionsfrom this file before submitting.
0.2 Dataset instructions
- Please use a dataset that is publicly available. In particular, do not use a dataset with PHI that we cannot publicly share.
- Include a description of the dataset and from where it was downloaded or how it was created.
- If these are data from a project you have worked on, make sure there are no identifying information and also slightly alter them so that they are not the original data.
0.2.1 Datasets that are included in an R package
It is easiest to use a dataset that is a part of base R or a part of an R package.
Some R packages that include datasets are:
- The datasets in the package
datasetsare included with base R and “ready” to use without having to load them first. Learn more about the available datasets here and here.
- palmerpenguins package
- fivethirtyeight package
- A list of R packages and datasets included in them. This list is not comprehensive.
0.2.2 Load your own dataset
- If loading a dataset from a file(which could be one downloaded from the internet somewhere), make sure the dataset is in a folder called data and use
here::here()to load it. This is to make it easier to include it in the website. - Upload the dataset on Sakai along with your .qmd and .html files so that I can render your .qmd file.
1 Function(s) Name(s)
What function(s) is being presented and what package is it from?
closeread is not exactly a function, but rather a Quarto extension. It adds support for “scrollytelling”, which is a type of visualization where graphical elements and text change dynamically as the viewer scrolls through a document.
2 What is it for?
Discuss what the function(s) does.
closeread provides the ability to create a presentation that is more engaging and dynamic, and even interactive through the integration of javascript elements. To use closeread, the quarto document type must be changed to closeread-html, and closeread elements must be wrapped in fenced divs using a mixture of markdown syntax and closeread’s proprietary syntax described in their guide at closeread.dev. Images and plots may also be included, as will be shown in the following examples.
3 Examples
Provide at least two examples that you have created yourself for your dataset of choice that show how to use the function(s).
4 Is it helpful?
Discuss whether you think this function(s) is useful for you and your work. Is it the best thing since sliced bread, or is it not really relevant to your work? If not relevant to you, can you think of examples of when it would be useful?
While I find it to be too cheesy/gimmicky for formal reports, closeread can be useful for intuitively demonstrating certain relationships, such as spatiotemporal ones as I did in my examples.
I work with spatial data and collaborators that are very knowledgeable in biological/spatial relationships, but not so computer savvy. I think this would be particularly useful during the exploratory phase of spatial data analysis, where the goal is to identify which patterns/relationships to further investigate.
This typically involves sitting down with them and modifying one or two parameters in the code to generate a ton of plots and switching between to visualize changing relationships. This process can often be overwhelming and annoying.
This specific case would be where closeread can make things a lot smoother. I could send a report that holds the plot in place and allows the collaborator to intuitively scroll up and down to visualize the changes, while keeping any comments I add synced to their respective plots. This could eliminate the need for a meeting, which can sometimes be difficult to coordinate.
Lastly, it appears to integrate nicely with a standard Quarto document, so you can have just one section of scrollytelling where it matters while the rest of the document remains normal, which is a big plus.