Top of page

LC Maps for Robots

Share this post:

The following is a repost from the blog Worlds Revealed: Geography & Maps at the Library of Congress. The author is Rachel Trent, Digital Collections and Automation Coordinator in the Geography and Maps Division.

Interested in bulk downloading maps from the Library of Congress’s online collections?

Need a corpus of historical map images to build a training dataset for your machine learning model?

Looking to learn more about Python or APIs?

Curious about how to query maps on

Yes? Great! We have tutorials for you.

The Geography and Map Division is beginning a series of Jupyter Notebooks exploring how to computationally access, retrieve, and analyze cartographic materials in the Library of Congress’s online collections. These notebooks include instructions and demonstration Python code that lead you through the process of downloading and analyzing images and metadata in bulk from the Library’s website, specifically geared towards maps. These notebooks are designed to be downloaded to your computer and opened with Jupyter Notebook.

The first two of the notebooks are now available on the Library’s GitHub page:

  1. Querying and downloading cartographic material from
  2. Analyzing and visualizing cartographic metadata from

These notebooks use the Sanborn Fire Insurance Map collection to show you how to do things like download map image files in bulk . . .

. . . or visualize data about the collection.

If this is your first time using Jupyter Notebooks, there are many online tutorials to help you install the software and get started, including instructions for installing Jupyter via Anaconda. To download the two Jupyter notebooks, head to the Library’s GitHub page and download the entire repository of files as a ZIP file. Or, if you’re comfortable with git, you can clone the repository.

Inside that repository and at LC for Robots, you’ll find other notebook tutorials and example code. In particular, be sure to check out accessing images for image analysis (which the maps notebooks build on) and extracting location data from the API for geovisualization!


  1. Great job with the notebooks!

    I really enjoyed the Wikidata part. You could enrich your metadata with Wikidata, for instance, adding the link of the location to each item.

    Thanks for sharing.

Add a Comment

This blog is governed by the general rules of respectful civil discourse. You are fully responsible for everything that you post. The content of all comments is released into the public domain unless clearly stated otherwise. The Library of Congress does not control the content posted. Nevertheless, the Library of Congress may monitor any user-generated content as it chooses and reserves the right to remove content for any reason whatever, without consent. Gratuitous links to sites are viewed as spam and may result in removed comments. We further reserve the right, in our sole discretion, to remove a user's privilege to post content on the Library site. Read our Comment and Posting Policy.

Required fields are indicated with an * asterisk.