📘 Disclaimer: This book is published under a Creative Commons license and is freely available via GitHub.

The Programming Historian pdf

The Programming Historian -- William J. Turkel, Adam Crymble and Alan MacEachern -- bookcover

The Programming Historian

✒️ By William J. Turkel, Adam Crymble and Alan MacEachern



The Programming Historian is a unique guide that bridges the gap between history and technology. It’s packed with practical tutorials for historians who want to dive into digital tools. Whether you’re a seasoned researcher or just starting out, this book shows you how to use programming for historical research. It makes tech feel less intimidating and more like an exciting adventure.


The Programming Historian Introductory lessons on how to:

  • Install Zotero, the Python programming language and other useful tools
  • Read and write data files
  • Save web pages and automatically extract information from them
  • Count word frequencies
  • Remove stop words
  • Automatically refine searches
  • Make n-gram dictionaries
  • Create keyword-in-context (KWIC) displays
  • Make tag clouds, and
  • Harvest sets of hyperlinks

Contents of the Book

Do you need to learn how to program?

  • Techniques that don’t involve programming
  • Why you might want to learn to program
  • What kind of techniques you will learn

Getting started

  • Install and set up software
    • Linux instructions
    • Mac instructions
    • Windows instructions
  • “Hello world” in Python
  • Interacting with a Python shell
    • Linux instructions
    • Mac instructions
    • Windows instructions
  • “Hello world” in JavaScript
  • Viewing HTML files
  • “Hello World” in HTML
  • “Hello World” in embedded JavaScript
  • Back up your work
  • Keep in touch with us
  • Other resources
  • Suggested readings

Working with files and web pages

  • Making use of your ability to do close reading
  • Sending information to text files
  • Getting information from text files
  • Splitting code into modules and functions
  • About URLs
  • Opening URLs with Python
  • Saving a local copy of a web page
  • Suggested Readings

From HTML to a list of words

  • Getting rid of HTML formatting
  • More about Python strings
  • Looping
  • Branching
  • The stripTags routine
  • Python lists
  • Suggested Readings

Computing frequencies

  • Useful measures of a text
  • Cleaning up the list
  • Our first use of regular expressions
  • Python dictionaries
  • Counting word frequencies
  • From HTML to a dictionary of word-frequency pairs
  • Removing stop words
  • Putting it all together
  • Suggested Readings

Wrapping output in HTML

  • Putting new information where you can use it
  • Python string formatting
  • Creating HTML output
  • Sending HTML output to Firefox
  • Self-documenting data files
  • Python comments
  • Building an HTML wrapper
  • Putting it all together
  • Using word frequencies to refine a Google search
  • Suggested Readings

Keyword in context (KWIC)

  • N-grams
  • From text to n-grams
  • Making an n-gram dictionary
  • Pretty printing a KWIC
  • From HTML to KWIC
  • Turning each KWIC into a Google search link

Tag clouds

  • Visualizing term frequency
  • Mapping one range onto another
  • A little bit of CSS
  • Functions to write HTML divs and spans
  • Other dimensions for visualization
  • Putting it all together
  • Combining the tag cloud with KWIC

Harvesting links and downloading pages

  • The idea of text mining
  • Selecting a group of biographies
  • Extracting hyperlinks with Beautiful Soup
  • Scraping with regular expressions
  • Working with accented characters
  • Some helper functions
  • Putting it all together

Indexing a document collection

  • An overview
  • Getting a list of filenames from a directory
  • Normalizing the files
  • Mapping an anonymous function over a list
  • Replacing stopwords with a placeholder
  • Zip and tuples
  • Putting it all together
  • Suggested Readings

Discussion of The Programming Historian, 1st ed

  • Do you need to learn how to program?
  • Getting started
  • Working with files and web pages
  • From HTML to a list of words
  • Computing frequencies
  • Wrapping output in HTML
  • Keyword in context (KWIC)
  • Tag clouds
  • Peer Reviewers

Book Description

Ever felt like digital tools are too overwhelming? Well, The Programming Historian is here to make things way easier. This book takes you by the hand and guides you through the basics of programming, all with a historian’s mindset. It’s not just about codeit’s about making sense of the past using modern methods. You’ll find step-by-step tutorials, real-world examples, and enough encouragement to keep you going, even when your code throws a tantrum. I’ve always thought programming was only for computer scientists, but this book proves otherwise!

Book Overview

Written by William J. Turkel, Adam Crymble, and Alan MacEachern, The Programming Historian focuses on making digital history accessible. The authors know that not every historian is a tech whiz. That’s why they break down complicated concepts into bite-sized lessons. From cleaning up messy data to visualizing timelines, you’ll learn tools that actually help your research shine. And if you’re curious about how other programming languages fit in, check out this helpful overview of the basics of C programming. It’s a fantastic companion if you want to broaden your coding horizons while working through historical data.

Why Read This Book

If you’ve ever wondered how technology can breathe new life into old stories, this book is your answer. The authors don’t just teach you how to codethey show you why it matters in the context of historical research. Their hands-on approach means you’ll actually build things as you read, not just nod along to theory. I love how it makes programming feel less like math homework and more like solving a mystery! For those who want a more foundational approach before diving into digital history, taking a peek at Programming From the Ground Up might be a smart moveit’s another resource that demystifies coding from square one.

Who This Book Is For

This book is perfect for historians who want to get their feet wet with digital tools but don’t know where to start. Researchers who love a good challenge will find it especially rewarding. Even if you’re a student or hobbyist interested in both history and tech, there’s so much here for you! Don’t worry if your experience with computers only goes as far as checking emailsthese lessons are designed for everyone, not just the tech-savvy.

What You Will Learn

  • How to use programming languages for historical analysis
  • Cleaning and organizing messy historical datasets
  • Visualizing timelines and trends in history
  • Building simple digital tools for your own research
  • Applying open-source software in academic projects
  • Troubleshooting common problems (without losing your mind!)
  • Integrating digital skills into traditional historical work
  • Finding more resources for learning programming basics

Book Details


Length: 74 Pages

Language: English

PDF Size: 1.86 Mbs

Category: 

Report Broken Link

File Copyright Claim

Comments

Leave a Reply

Categories

Related Posts

Split List into Columns
PDF Viewer

Please wait while the PDF is loading...
📘 Download PDF Book