Logainm & Open Data

Logainm (Irish for "place name") is the offical placename database of Ireland. Download the database here.

They recently released data.logainm.ie and machine readable data, under a permissive Open Database License (ODbL) v1.0, which is the same licence as OpenStreetMap.

Download the nationwide dump file

You can either choose to download the original RDF file, or the processed CSVs

Both are under Open Database License (ODbL) v1.0.

CSV format

This is a zipfile of several CSV files. Each file has a header, fields are separated by , and lines are terminated by a newline \n.

Creating the CSV files from RDF

It was created with rdf2csv, and a configuration YAML file on github.

RDF Format

This is a bzip2'ed, of N-Triples RDF file.

After unzipping, it can be used easily in Python with the rdflib.

>>> import rdflib
>>> graph = rdflib.Graph()
>>> graph.parse("logainm.nt", format="nt")

rdflib allows you to easily query the rdf graph.

N-triples files are line based, so you can use standard unix tools to examine it.

For example, to examine the details for the townland Ravensdale Park, you can use grep:

$ bzcat logainm.nt.bz2 | grep "/33943>"
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/easting> "08805" .
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/northing> "16244" .
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/square> "J" .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://geovocab.org/geometry#Geometry> .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "54.0833"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/2003/01/geo/wgs84_pos#long> "-6.33729"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://data.logainm.ie/place/126017> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/126101> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/126102> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/geometry#geometry> <http://data.logainm.ie/geometry/33943> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/100021> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/165> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/1712> .
<http://data.logainm.ie/place/33943> <http://purl.org/dc/terms/isReferencedBy> <http://www.logainm.ie/Iomhanna/Ref136%20d/33943.jpg> .
<http://data.logainm.ie/place/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.logainm.ie/category/BF> .
<http://data.logainm.ie/place/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://geovocab.org/spatial#Feature> .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> <http://logainm.ie/33943.aspx> .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/name> "Gleann na bhFiach"@ga .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/name> "Ravensdale Park"@en .


This data was downloaded from data.logainm.ie in September 2014 in an automated fashion, as their documentation suggests. This resulted in 240,000 RDF files in turtle. I wrote a one off script to parse all these files using rdflib, and update one graph, and serialize it into a n-triples file.

Logainm's website claims you can download county-by-county dumps, but that link is dead, so I had to download a file per object.

This entry is tagged: