HTRC Data Capsule Specifications and Usage Guide
Dive deeper into understanding the specs provided in each Data Capsule environment. Here we break down the different types of Capsules, modes, and preloaded libraries, data, and tools we include in each Capsule.
HTRC Data Capsules are secure computing environments developed to facilitate non-consumptive text analysis research. Each Capsule is a virtual machine (VM) that provides researchers a desktop they can use to perform their investigation of volumes in the HathiTrust Digital Library.
Capsule Access and Interaction Modes
Maintenance vs. Secure mode
The Capsules are configured with special security settings that allow you to interact with them in two modes: Maintenance mode and Secure mode
- In Maintenance mode, you are allowed to access the network freely and install whatever software you want.
- In Secure mode, general network access is restricted, but you can access the HTRC corpus repository, which is otherwise blocked. Any changes you make to the Capsule in Secure mode will not persist. To save data from your analysis, you'll need to save your results in the Secure Volume storage on your Capsule. This storage option is not visible in Maintenance mode.
Watch a video on switching modes in a Data Capsule here.
Ways of accessing Capsules
Access your Capsule in-browser from HTRC Analytics by connecting via Remote Desktop (both Maintenance and Secure modes available) or the Terminal command line interface (Maintenance mode only).
You can also SSH into your Capsule in Maintenance mode only if you've followed the directions under "Advanced Features" to set-up a public key.
For a detailed explanation for how to create, access, and operate your Capsule, please visit the HTRC Data Capsule Tutorials page for step-by-step instructions.
Capsule Sharing Functions
Research Data Capsules can be shared between up to 5 collaborators. The person who creates the Capsule has the most control over it, and they can add and remove other collaborators, assign permissions, and delete the Capsule.
There are 3 roles for users of a shared Capsule:
- Owner (and Owner-Controller): By default each Capsule creator will get this role. It comes with the highest level of control. The Owner-Controller is able to perform all Capsule functions available in HTRC Analytics, including accessing, starting, stopping, switching modes, deleting, and managing the collaborators on the Capsule. By default the person who creates the Capsule will be the Owner-Controller until they delegate control of the Capsule to a collaborator, at which point their role becomes Owner and the ability to start, stop, and switch the modes of the Capsule moves to the Controller (see below). The Owner can resume Owner-Controller status whenever they choose.
- Contributor: The Owner can share their Capsule with other HTRC Analytics users. New collaborators have the role of Contributor when they are added. This role has the lowest permission level. Contributors can connect to and conduct research in the Capsule, but cannot perform any of the Capsule management functions.
- Controller: The Owner can choose to give a Contributor the status of Controller in order to delegate some management tasks of the Capsule to that user, including starting, stopping, and switching modes. There can only be one Controller at a time, and the Owner can revoke control of the Capsule at any time.
Once a collaborator is added to a Capsule, the Capsule will appear for them on their Capsules listing page in HTRC Analytics. Before the new collaborator can access the Capsule, they will need to agree to the Data Capsules Terms of Use.
For Capsules with full-corpus access, HTRC will review the request to add a collaborator and either approve or deny it. The Capsule details will only appear on their Capsules listing page if the request is approved.
As Demo Capsules are meant for short-term exploration, they cannot be shared with collaborators.
Watch a video on adding collaborators to a Data Capsule here.
Requesting Help from your Data Capsule
To receive HTRC staff help on any kind of problem you are experiencing with your Data Capsule, you may submit a 'Request Data Capsule Help' form directly from that Data Capsule you are working in. Find the link to this form in the 'More Data Capsule Functions' dropdown menu located on the right-hand side of your Data Capsule's status page.
Pre-installed Software, Libraries, and Data
Each Capsule comes pre-loaded with the following software, libraries, and data. For more information, consult the ReadMe file on the desktop of your Capsule for more details about installed packages.
Software
Name | Version | Note |
---|---|---|
Akka | 2.4.14 | |
Anaconda 3 | 4.2.0 | Supports both Python 2.X and 3.X. See list below for the Python libraries pre-installed (some via Anaconda) |
Ant | 1.10.12 | |
Hadoop | 2.7.3 | |
InPho Topic Explorer | Project website: https://www.hypershelf.org/ | |
Mallet | 2.0.8 | |
R | 3.3.9 | |
Sbt | 0.13.13 | |
Scala | 2.12.1 | |
Spark | 2.0.2 | |
Voyant Tools |
Python Libraries
HTRC-developed
- htrc-feature-reader
- htrc workset toolkit
General
- csvkit
- dask
- GenSim (currently running with warning)
- nltk
- numpy
- pandas
- pytables
- regex
- scipy
- theano
- toolz
- ujson
Sample data
- 3 sample HTRC worksets of 1000 volumes each: U.S. Government Documents, German language volumes, 19th Century English Literature.
Customizing your Data Capsule's software
While each Data Capsule comes with standard tools and libraries installed, because of security limitations and how our systems work, HTRC pins certain software to specific versions. As a result, the best way to make sure you have what you need for your research and the most up-to-date software is to install your own Anaconda or Python environments. This section will contain some information on how to do this, though we would also encourage you to seek other outside resources if required.
Creating a new Anaconda environment
To create a new Anaconda environment, first open a terminal window. Use the following command to create a new Anaconda environment with a specific version of Python:
conda create --name myenv python=3.7
Substitute "myenv" with whatever name you'd like for your new environment, and "3.7" with your desired version of Python. After creating the environment, you must first activate it:
conda activate myenv
From here, you can now install or update Python libraries with Anaconda as usual. To install a library with Anaconda, you can use this command line code:
conda install scipy
Or to install a specific version, use:
conda install scipy=0.15.0
Creating a new Python environment
Data Imports and Exports
Importing data into an HTRC Data Capsule
Use the HTRC Workset Toolkit to import HathiTrust text data into your Capsule. Any outside data you plan to analyze in conjunction with HathiTrust data can be added to your Capsule from a web-accessible location when your machine is in Maintenance mode.
Non-consumptive Exports from an HTRC Data Capsule
Data and tools can easily enter a user's Capsule, but anything leaving a Capsule must undergo review prior to release to the user. The guidelines used during review of the outputs of a Capsule are as follows:
- Files containing any OCR text or images of pages or volumes will be prohibited from leaving a Capsule.
- Binary files are prohibited from leaving a Capsule
- Encrypted files are prohibited from leaving a Capsule
- PDF files or other format of file that contains images of OCR text or text images are prohibited from leaving a Capsule
- For any Capsule results directory that exceeds 1 MB in total, the collection will not be released pending discussion with the Capsule owner
The general rule-of-thumb is whether the export would create a substitute for human-reading the original text. (The full Non-Consumptive Use Research Policy is also available for your reference.) If you would like someone to pre-review a sample file that would represent the kinds of data you would like to export from a Capsule before you begin your work, please contact htrc-help@hathitrust.org.
A release request must be under 67 MB, and any submitted requests over this size will fail due to technical limitations.
Release requests should include a README text file describing the files included in the request and their data structure.
If you have a directory of results files that you would like to export to be released, you can zip the directory and export the compressed file.
You will receive an email notifying you if your results export has been approved. The link for downloading results that have been approved for export will appear on the landing page for your Capsule. Each approved request will be available for 2 weeks from the approval date. All collaborators on a Capsule will get notification that approved results are ready, and will find the released results available to them on their Capsule landing page.
User Quotas
There is an overall disk quota, a memory quota, and a CPU quota for each user in the Data Capsule environment. One user can consume up to 100 GB of disk space, ~20 GB of memory, and 10 CPUs. If you attempt to create a second or third Capsule that exceeds your quota in one of the areas above, then you will encounter an error.
Capsule Recall Practices
The HTRC Data Capsule service’s maximum capacity flexes depending on the size of the Capsules it hosts. In the event that the Data Capsule service cannot satisfy all simultaneous demands for Capsules:
A Capsule may be recalled (i.e. deleted) and the work environment will no longer exist.
Capsules will be identified for recall based on criteria such as date of last use and an individual’s resource usage, with the goal being to extend the number of individuals afforded the opportunity to conduct research using a Capsule
A researcher whose Capsule is identified for recall will be notified via email regarding the pending recall, and they will have 5 days to respond to the recall notification.
Priority in satisfying a new request for a Capsule will be given to researchers whose affiliated organization is a HathiTrust member.
At times when the Data Capsule service has reached capacity, incoming requests for Capsules will be screened based on institutional affiliation.
Instructors who intend to use the HTRC Data Capsules in a course should contact htrc-help@hathitrust.org so that proper arrangements can be made.
Users who do not abide by the Terms of Use will have their Capsule recalled immediately.