Kalani Craig, Ph.D.

Fall 2024 H699 Week 2

Week 2: The Historiography of Digital History

  1. Week 2 Overview
  2. Week 2 Reading and Discussion
  3. Week 2 Lab: Text Editors and Regular Expressions (or how to do fancy searches)

Week 2 Overview

The Historiography of Digital History

Reading: Crymble, Technology and the Historian. What’s at stake for digital history and its future?

Lab: Install a text editor, and learn the basics of searching for specific strings using that text editor. (Sublime Text and Visual Studio Code are well supported across most platforms. I use BBEdit because I’m old.)

Collaborative data management: No student presentation. We’ll learn how to move between text editors and spreadsheets for quick and dirty data management

Week 2 Reading and Discussion

  1. How do we practice–learn, teach, research–as individual digital historians or as community members of the subfield?
  2. What do we do as digital historians, broadly defined?
  3. If we call it “digital history” vs defining it some other way, how does that change the answer to questions 1 and 2?
  4. How is our digital history work shaped by engagement with different histories, archives and communities?
  5. Where do we go next?

And, because methods matter, what methods did Crumble use to write this history? How does that help you think about what digital history is, or isn’t, or what it’s called?

Week 2 Lab: Text Editors and Regular Expressions (or how to do fancy

searches)

ETA: The searches we did in class

Here’s the base text

  • Arizona June 30, 1907. Deaths diphtheria 1
  • Arizona June 30, 1907. Deaths enteric fever 4
  • Arizona June 30, 1907. Deaths scarlet fever 11
  • Arizona June 30, 1907. Deaths smallpox 2
  • Arizona June 30, 1907. Deaths tuberculosis 49

Here’s the find: (\w\w\w\w) (\d\d), (\d\d\d\d).

Here’s the replace: \t$1\t$2\t$3\t

Install a text editor on your computer.

  • Sublime Text: Broadly supported across all platforms. I can support Sublime Text reasonably well.
  • Visual Studio Code: Common in Informatics departments, built-in integration with GitHub (a common place to share open-access datasets and code). I have some experience in VSC, but many other resources exist.

Start using that text editor

Our aim here is to get familiar with the idea of a text editor as a data tool, rather than a writing tool.

1. Why do I want to learn this: Read the first 4 sections in the Programming Historian’s “Regular Expressions” lesson for several use-case examples of how regular expression can help you level up your find-and-replace skills.

  • Lesson Goals
  • What Are Regular Expressions and for Whom Is this Useful?
  • Getting the Text
  • Ordinary search and replace

Much of the rest of this Programming Historian tutorial is more complex than we’re ready for, and it’s also specific to LibreOffice, which is not widely enough used in the programming community to be useful.

Instead, let’s go simpler and get you used to your new text editor.

2. How do I turn on regular expressions in my new text editor? It’s usually in the find-and-replace dialogue box.

  • Sublime Text: https://sublime-text-unofficial-documentation.readthedocs.io/en/latest/search_and_replace/search_and_replace_overview.html
  • VisCode: https://blog.devsense.com/2022/find-and-replace-with-regexp#:~:text=By%20default%2C%20regular%20expressions%20are,same%20icon%20as%20in%20VS.

3. How do I use simple regular expressions? Start simply with this file: FILE REDACTED> . There are course listings here (HIST D 200, HIST H 585, etc.), with each course number on its own line. Try this sequence and see what happens

  • Here’s a regular expression that looks for 4 capital letters, a space, 1 capital letter, a space, and 3 numbers: “([A-Z][A-Z][A-Z][A-Z]) ([A-Z]) ([0-9][0-9][0-9])”
  • Can you modify the regular expression above to find only the courses that are in the “H” subject? (e.g. not HIST D 200)
  • …to find only the courses that are 200 level?

OPTIONAL: I’m ready for something more advanced. Look at the examples in https://librarycarpentry.org/lc-data-intro/01-regular-expressions.html and use some of your own research data. See what you can extract.

This site built with Foundation 6. Kalani Craig, 2025