HTRC Feature Reader
AdvancedThe Basics
The HTRC Feature Reader is a Python library designed by HTRC staff for more easily working with HTRC's Extracted Features derived dataset. Head over to our EF documentation, if you want to learn more.
The HTRC Feature Reader is an advanced level tool, meaning that you'll need to have a basic understanding of Python (version 3) and be able to write code that uses the library.
Two helpful sources of information for working with the HTRC Feature Reader library are this Programming Historian tutorial, and this GitHub repository.
What can it do?
The Feature Reader helps researchers access a HathiTrust volume’s EF file, one way to access in-copyright volumes. In addition to some helpful functionality in getting the EF data, the Feature Reader also helps users manage and explore across multiple volumes, by one volume, or even by one page. The Feature Reader uses a popular Python library called pandas, used for manipulating large sets of data in table form, to explore patterns in a volume or workset. With the Feature Reader, users with a basic understanding of Python can quickly explore a book or workset to investigate, for example, use of adjectives or pronouns, or to make a timeline of publication dates across a workset. A researcher can use the Feature Reader library to more easily explore any aspect of their volume or workset that is represented in the extracted feature dataset.
- Use the Feature Reader to more easily download the EF data for one or more books.
- Use the FeatureReader object for loading the dataset files for many books. FeatureReader objects contain multiple volumes (single books).
- Use the volume and page objects to return volume-level and page-level metadata, like title, language, or word counts by page.
Where can I use this library?
You can use it locally by downloading it via pip/conda, from the Github repository, or you can use it in an HTRC data capsule (where it is already included and ready to go). Many Python users, especially those new to coding, might consider using Anaconda, which helps manage Python libraries that are installed and find and install new ones. A basic install of Anaconda comes with many Python data science tools all in one place, like Jupyter notebooks, another helpful software tool for working with and sharing Python code.
Referenced pages in this document:
HTRC Feature Reader references:
- HTRC Feature Reader Github repository
- HTRC Feature Reader Github.io page
- Text Mining in Python through the HTRC Feature Reader
- Pypi htrc-feature-reader 2.0.7
Extracted Features references:
Python references:
- Python (official site)
- Anaconda (official site)
- Python Packaging Index (PyPi) for downloading Pip
- pandas documentation