Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

This repository contains all of the code we will cover in the Fall 2018 edition of my Hacking the Humanities class, which I teach at Leiden University as part of the Digital Humanities minor program.

This code accompanies the Hacking the Humanities tutorial video that I filmed ( The goal is to create a resource for students so we can spend less time in class talking about the technical details of coding and more about how we can use this code to study human culture.

While this should serve as a functional introduction to Python, it is not meant to be comprehensive. Instead, it is designed to help students with no knowledge of coding at all learn how to do text analysis and data visualization.

This code is written assuming you have installed the Anaconda distribution of Python 3 (and should be compatible with Python 3.6 and up).

As of October 1st 2018, this is fully complete, but I will update the code as I catch errors.


Code in the stylometry files opens texts from a folder called "corpus." This folder is created by code in the, so run that before you try to run the stylometry code. The two fed (federalist papers) examples do NOT require this corpus folder, so feel free to run those immediately.


Renamed files to aid organization. Added DataFrames, Corpus Basics, matplotlib, stylometry, topic modeling, word2vec, apis, and webscraping.


This is code that we will cover in my Hacking the Humanities class at Leiden University. Video tutorials will be uploaded to my YouTube channel at





No releases published


No packages published