Metadata-Version: 2.1
Name: GLAM
Version: 0.3.1
Summary: Geocoding via LINZ address matching
Home-page: https://github.com/lmor152/GLAM
Author: Liam Morris
Author-email: liam.morris04@gmail.com
License: MIT Licence
Keywords: geocode,geocoding,new zealand,nz,address,matching
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE

# Geocoding via LINZ Address Matching (GLAM) 

## Work in Progress!!!

## Overview
This package implements methods for performing entity matching on unstructured NZ addresses to the LINZ street address database. This package does not support PO boxes or international addresses. 

## Installation 

Get the latest version of glam by installing from PyPi 
```
pip install glam
``` 

## Usage
```
from glam.interface import Geocoder

data_dir = 'data' # Location of glam data dependencies. should include data/nz-street-address.csv
gc = Geocoder(data_dir)

addresses = [
  'level 10, 10 customhouse quay, wellington central',
  'third floor 18 viaduct harbour ave auckland',
]

gc.geocode_addresses(addresses)
```

Output:
```
[{'address_number': '10',
  'full_road_name_ascii': 'Customhouse Quay',
  'suburb_locality_ascii': 'Wellington Central',
  'town_city_ascii': 'Wellington',
  'postcode': '6011',
  'shape_X': '174.7784009',
  'shape_Y': '-41.28219255',
  'match_score': 100.0},
 {'address_number': '18',
  'full_road_name_ascii': 'Viaduct Harbour Avenue',
  'suburb_locality_ascii': 'Auckland Central',
  'town_city_ascii': 'Auckland',
  'postcode': '1010',
  'shape_X': '174.7577686',
  'shape_Y': '-36.8453608833',
  'match_score': 100.0}]
```

## Dependencies
- Default models are packaged with the Python wheel.
- Tensorflow is required but not automatically installed to remain OS agnostic
- Data dependencies will be built from the raw LINZ and PNF files the first time using the geocoder (may be slow).
  - Raw LINZ dataset can be downloaded from [here]([https://data.linz.govt.nz/layer/53353-nz-street-address/)
  - PNF file is available for purchase from NZ Post [here](https://www.nzpost.co.nz/business/sending-within-nz/quality-addressing/postcode-network-file) (optional, but postcodes will not be available without the PNF file. And it may also improve geocoding efficiency)


## Author
Liam Morris

liam.morris04@gmail.com

Please reach out if you have any questions :)
