Skip to content
Historical Address Geocoder (HAG-GIS)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


Historical Address Geocoder (HAG-GIS) 1.0.0

Konstantinos Daras, July 2015

The Historical Address Geocoder (HAG-GIS) is a Python 2.7 program for automating the geocoding process for the Digitising Scotland project. The geocoding process involves fuzzy-matching historical records with contemporary addresses. This automating system takes into account spatial information deriving from historical administrative data improving the accuracy of the geocoded historical addresses and producing geography boundaries at small administrative scales where geographical boundaries are not available.

Installation instructions

The basic HAGGIS-1.0.0 installation requires Python 2.7, with additional packages and libraries needed for the spatial analysis and database management of data.

Python 2.7:

To install pip, securely download ( Then run the following (which may require administrator access):

> python

If setuptools is not already installed, will install setuptools for you. To upgrade an existing setuptools:

> pip install -U setuptools.

Additional Python packages (pip package is required)

wheel package:

> pip install wheel==0.24.0

PyYAML package:

> pip install PyYAML==3.11

python-Levenshtein package:

> pip install python-Levenshtein==0.11.2

scipy package:

> pip install scipy==0.15.1

numpy package:

> pip install numpy==1.9.2

nose package:

> pip install nose==1.3.7

tqdm package:

> pip install tqdm==1.0

External Libraries:

Follow the installation instructions as suggested at the official sites of the following libraries.

Qhull library (scipy depedency) at

SpatiaLite v4.0 library (sqlite dependency) at

Test of installed modules:

To test if the required libraries are installed in your Python distribution, start Python and try the following:

>>> from scipy.spatial import Voronoi
>>> from scipy.spatial import KDTree
>>> import Levenshtein
>>> import tqdm
>>> import PyYAML
>>> import numpy

None of these import commands should give you an error.

HAGGIS-1.0.0 installation:

Unpack the archive and a new directory named 'HAGGIS' will be created containing all the necessary HAGGIS modules and additional files such as example data sets, documentation and testing programs.

Go into the 'haggis' sub-directory within 'HAGGIS' and run all tests using the corresponding command provided:

> nosetests

or run the tests individually (within 'HAGGIS/haggis/tests' folder), for example:

> python

Starting HAGGIS-1.0.0

The HAGGIS can be started using:

> python


> python <config file>

where <config file> is a given configuration file.

Problems and errors:

Please note that this is the initial distribution of HAGGIS-1.0.0 which has only been tested to a limited extent on an Windows platform (specifically Windows 7 & 8 with Python 2.7).

Please report any problems and bugs to:

HAGGIS-1.0.0 updates:

To receive updates and news on HAGGIS please visit the following open source lists at:

Historical Address Geocoder

Future features

ToDo list

  • Documentation
  • Export Geocoded Historical addresses and RD polygon centroids [Priority]
  • Use Q-Gram algorithm
  • Use Jaro-Winkler algorithm
  • Introduce weights in each token [Priority]
  • Use Classification after address comparison [Priority]
  • Create example data sets
You can’t perform that action at this time.