<commit_before>= Pat

An extremely simple, lightweight way of requesting the Geolocation (lat, long, easting, northing) for any UK Postcode, as well as district and ward details.

= Get information on a UK postcode

Requirements

* Ruby
* Rubygems

Install the gem

  sudo gem sources -a http://gemcutter.org
  sudo gem install pat

Include the gem in your project

  require 'pat'

Request a postcode

  @postcode = Pat.get("N1 1AA")

Use the results (returned as a hash)

  puts @postcode["geo"]["lat"]
  puts @postcode["geo"]["lng"]
  puts @postcode["geo"]["easting"]
  puts @postcode["geo"]["northing"]
  puts @postcode["geo"]["geohash"]
  puts @postcode["administrative"]
  puts @postcode["administrative"]["district"]
  puts @postcode["administrative"]["district"]["title"]
  puts @postcode["administrative"]["district"]["uri"]
  puts @postcode["administrative"]["ward"]
  puts @postcode["administrative"]["ward"]["title"]
  puts @postcode["administrative"]["ward"]["uri"]
  puts @postcode["postcode"]

== Try it out

  irb -r rubygems -r pat

  p = Pat.get("<your postcode here>")

  p["geo"]

  p["administrative"]

== Thanks to

* UK-Postcodes by Pezholio http://github.com/pezholio/UK-Postcodes
* Timely Information Project by <NAME>: http://daveharte.com
* <NAME> for the idea http://twitter.com/adrianshort

* Ordance Survey for seeing the light and making UK Postcode data available
http://www.ordnancesurvey.co.uk/oswebsite/opendata/<commit_msg>update readme with a few thankyous<commit_after>= Pat

An extremely simple, lightweight way of requesting the Geolocation (lat, long, easting, northing) for any UK Postcode, as well as district and ward details.

= Get information on a UK postcode

Requirements

* Ruby
* Rubygems

Install the gem

  sudo gem sources -a http://gemcutter.org
  sudo gem install pat

Include the gem in your project

  require 'pat'

Request a postcode

  @postcode = Pat.get("N1 1AA")

Use the results (returned as a hash)

  puts @postcode["geo"]["lat"]
  puts @postcode["geo"]["lng"]
  puts @postcode["geo"]["easting"]
  puts @postcode["geo"]["northing"]
  puts @postcode["geo"]["geohash"]
  puts @postcode["administrative"]
  puts @postcode["administrative"]["district"]
  puts @postcode["administrative"]["district"]["title"]
  puts @postcode["administrative"]["district"]["uri"]
  puts @postcode["administrative"]["ward"]
  puts @postcode["administrative"]["ward"]["title"]
  puts @postcode["administrative"]["ward"]["uri"]
  puts @postcode["postcode"]

== Try it out

  irb -r rubygems -r pat

  p = Pat.get("<your postcode here>")

  p["geo"]

  p["administrative"]

== Thanks to

* UK-Postcodes by Pezholio http://github.com/pezholio/UK-Postcodes
* Timely Information Project by <NAME>: http://daveharte.com
* <NAME> for the idea http://twitter.com/adrianshort

* Ordance Survey for seeing the light and making UK Postcode data available http://www.ordnancesurvey.co.uk/oswebsite/opendata/
{'fraction_non_alphanumeric': 0.1449472609731201, 'fraction_numerical': 0.0013610071452875127, 'mean_word_length': 5.024590163934426, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2035451', 'n_tokens_mistral': 950, 'n_tokens_neox': 1001, 'n_words': 280}