top of page
TEXT MINING FOR HISTORIANS COURSE
UNIT 5: ANALYSIS WITH PYTHON Pt 1
This unit is composed of several lectures which will introduce you to Python.
Lecture A: Introduction
This session runs in an interactive notebook on MyBinder. Click for more information on how to access and run a notebook. An overview of all interactive materials is available here.
We start with a brief introduction to the aims and principles of this course: why should a historian bother to learn a programming language for analysing textual and other types of data? Why Python (notebooks) in particular? We also discuss what to expect from this course (and what not?) and give an overview of the skills you will obtain.
Lecture B: Basic Python: a Gentle Initiation
This session runs in an interactive notebook on MyBinder. An overview of all interactive materials is available here.
This notebook starts with a gentle introduction to the basic elements of the Python syntax. We discuss how to create and manipulate variables, and demonstrate common operations. Some topics are more extensively discussed in 'break out' notebooks or in external documentation.
Lecture C: Text and String Methods
This session runs in an interactive notebook on MyBinder. Click for more information on how to access and run a notebook. An overview of all interactive materials is available here.
Finally, we move on from more fundamental syntax to working with actual text data. In this notebook, we introduce 'string methods', which are Python tools for processing and manipulating text files. We also demonstrate how to open and read text files (at scale).
KEY READINGS
*Matthes, Eric. Python crash course: A hands-on, project-based introduction to programming. no starch press, 2019.
*Montfort, Nick. Exploratory programming for the arts and humanities. MIT Press, 2021.
*Sweigart, Al. Automate the boring stuff with Python: practical programming for total beginners. No Starch Press, 2019.
*Wentworth, Peter, Jeffrey Elkner, Allen B. Downey, and Chris Meyer. "How to think like a computer scientist: Learning with Python 3." (2015).
EXERCISES
Integrated into the course (please see above)
bottom of page