I have two sets of data, one is the CodePoint Open with the location of all of the uk postcodes, the second is from online form data from which I've extracted the postcode and telephone area code, and counted the number of records per postcode.

Ultimately I am trying to create a model of the likelihood that an Area Code from a Telephone Number correctly matches the address (there is no available source for this validation, there are over 700 area codes in the UK).

Here's an example for area code 01392 (shown in blue) which is centered around Exeter, with postcodes also mapped.

close-up of 01392 area code

For each postcode which has had a record with 01392 I have a count field, which ranges from 1 to 81, and also have the percent of the records field, which ranges from 0.02% to 1.49%.

There is quite a spread of the data across the UK, as shown here

national view of 01392

What I'd like to do (I think) is to be able to mathematically create a polygon around the points which encompass (say) 90% of the records, calculate the centroid of the polygon, and then use that polygon and centroid to be able to do two things

  • select the postcodes from the CodePoint Open data as a "valid postcode for that area code" to be used for flagging new records as they are processed, and flagging those that don't match for further investigation
  • looking at the distance from the centroid of the polygon for the records that fall outside the 10% to try and understand why they do (data capture/process issues/fraud? etc).

I'm completely open to techniques/tools, including R for example, if I need to.

Also, if possible I'd like to be able to batch the process as mentioned earlier there are over 700 Area Codes in the UK.

closed as too broad by PolyGeo Jan 2 '16 at 21:58

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    As it stands, I think your well written "question" is too broad because it does not distill down to something that you have tried and where you are stuck i.e. focussed Q&A. As a result it seems to be asking for someone to review your work plan and offer suggestions. That is something more suitable for the GIS Chat Room rather than here on the Main GIS SE site. – PolyGeo Jan 2 '16 at 22:03