Skip to content

Latest commit

 

History

History
61 lines (52 loc) · 2.13 KB

README.md

File metadata and controls

61 lines (52 loc) · 2.13 KB

Build Status Dependency Status Code Climate License Badges

Jess

A Sinatra app that, when presented with an address, attempts to infer the existence of other addresses using the OpenAddresses database.

For background on our approach to inference, see this blog post

How to use

Simply POST an address in the following format to http://jess.openaddressesuk.org/infer:

{
  "saon": null,
  "paon": 1,
  "street": "High Street",
  "locality": null,
  "town": "Testtown",
  "postcode": "SW1A 1AA"
}

If the address 7 High Street, Testtown SW1A 1AA exists, then we can infer that numbers 3 and 5 exist, so the response will be:

{
  "addresses": {
    "inferred": [
      {
        "saon": null,
        "paon": 3,
        "street": "High Street",
        "locality": null,
        "town": "Testtown",
        "postcode": "SW1A 1AA"
      },
      {
        "saon": null,
        "paon": 5,
        "street": "High Street",
        "locality": null,
        "town": "Testtown",
        "postcode": "SW1A 1AA"
      }
    ],
    "existing": [
      {
        "saon": null,
        "paon": 7,
        "street": "High Street",
        "locality": null,
        "town": "Testtown",
        "postcode": "SW1A 1AA"
      }
    ]
  }
}

If an address you want to infer from already exists in the Open Addresses database, you can pass the addresses token to infer from that. For example for the address https://alpha.openaddressesuk.org/addresses/VDtibW, simply send a POST request to http://oa-jess.herokuapp.com/infer?token=VDtibW