Materials for a one hour workshop on using the Closeread extension for Quarto to author scrollytelling articles with data from plain markdown. Throughout the workshop, please refer to the official documentation: https://closeread.dev/.
You can open the materials for this workshop in a Berkeley DataHub account by clicking the links below.
Then click on the terminal tab and change your directory to the new file of workshop materials
cd closeread-workshop
Examples:
- A Poem (and a Painting) about the Suffering that Hides in Plain Sight
- MLU-Explain: Neural Networks
- Childhood cultural capital and adult wealth
Starting doc: 1-components-of-closeread.qmd
Solution: solutions/1-components-of-closeread-solution.qmd
Two Quarto structures that Closeread takes advantage of is the fenced div and the bracketed span. Please have a look at the Quarto docs to get a sense of how this syntax works. The syntax is also strongly inspired by the syntax for cross-references.
- Experiment with different quarto formats.
- Instructor only: Remove
_extension
then runquarto add qmd-lab/closeread
in this directory. - Switch format to
closeread-html
. - Add
cr-section
to encompass the image and first code cell for the table. - Flag image and table as stickies with
#cr-
ids. - Add triggers to the items with
@cr-
. - Change style.
- Make non-
cr-section
narrower by adjusting thegrid:body-width
.
Move the second code cell for the scatterplot into the cr-section
, make the plot a sticky, then trigger it. Also experiment with additional styles.
- Add
.scale-to-fit
- Turn on debug mode
Starting doc: 2-text-and-code.qmd
Solution: solutions/2-text-and-code.qmd
- Create a
cr-section
for Working with Text. - Flag the poem as a sticky.
- Add
.scale-to-fit
. - Add a trigger on the first narrative block.
- Instead, wrap the level 2 header and the first narrative block with a div and use
focus-on
to trigger the poem. - Add a focus effect to the second block:
highlight="1"
. - Add a span id to the first reference to birth.
- Add a focus effect to third block to highlight the span.
Create a second closeread section for the Working with Code section and treat the code block as a sticky. Split the paragraph into narrative blocks and add focus effects (highlight and zoom) to draw attention to the relevant components of the code.
- Change the layout.
Starting doc: 3-static-images.qmd
Solution: solutions/3-static-images.qmd
- This will largely be an inspection of how to create an illusion of animation even on static graphics.
Starting doc: 4-animated-graphics.qmd
Solution: solutions/4-animated-graphics.qmd
- Add a cr-section around the description of our big globe.
- Set the layout to
.overlay-center
- Flag the plot as a sticky.
- Create a trigger on the first narrative block.
- Set the angle in the plot to
crTriggerProgress
. - Wrap the narrative blocks in a
.progress-block
. - Reset the angle to track
crProgressBlock
.
- videos
- figure highlighting
- math