LoC's Chronicling America / GeoNames RDF Map Mashup

Because I can't think of a title that would be snappy.


This is an RDF mashup taking data from and and generates a KML file for exploring some of the newspapers' locations in Google Earth.

This is more or less a one-off project and still pretty rough around the edges.


You'll need to have Python installed and RDFlib:

$ easy_install -U "rdflib>=3.0.0"

To Use

Just run the script:

$ ./bin/

What This Does

When you run it, the script pulls data from the Library of Congress' Chronicling America project. This includes links from each newspaper's data to the GeoNames data for that newspaper's place. The script pulls the latitude and longitude from GeoNames. It then wraps it into a KML file for viewing in Google Earth, Google Maps, or another GIS system.

How It Does It

This script relies completely on Linked Open Data.

  1. It reads the RDF records from the LoC to get the list of newspapers archived.
  2. It reads the RDF record for each newspaper it randomly samples.
  3. It queries that to get the links from the Dublin Core coverage field. There should be one pointing to the location's entry on GeoNames and one point to its entry on DBpedia (which doesn't get used here).
  4. It merges the data from those into the graph.
  5. Next, it queries the coverage and generates a KML file containing the positions of each newspaper and a short description of it.

The Map

Because it randomly samples the newspapers it processes, each run will be different. You can view the map from one run here.