Skip to content

Commit

Permalink
Merge pull request #203 from ideal-postcodes/terminated_postcode_geo_fix
Browse files Browse the repository at this point in the history
Terminated postcode geo fix
  • Loading branch information
cblanc committed Aug 30, 2018
2 parents b483989 + 5a7e1dc commit 85eb586
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/models/terminated_postcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ TerminatedPostcode.prototype.seedPostcodes = function (filepath, callback) {
{
column: "longitude",
method: row => {
const longitude = row.extract("long");
return (parseInt(longitude, 10) === 0) ? null : longitude;
const eastings = row.extract("oseast1m");
return eastings === "" ? null : row.extract("long");
},
},
{
column: "latitude",
method: row => {
const latitude = row.extract("lat");
return (parseInt(latitude, 10) > 98) ? null : latitude;
const northings = row.extract("osnrth1m");
return northings === "" ? null : row.extract("lat");
},
}
]);
Expand Down
8 changes: 5 additions & 3 deletions app/views/includes/contents/about_content.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="container">
<div class="row">
<div class="col-lg-9">
<h3>Why</h3>
<p>This is a free API. Postcodes.io is aimed at developers who want a resource to lookup and (reverse) geocode UK Postcodes.</p>
<br />
<h4>This is a free API. Postcodes.io is aimed at developers who want a resource to lookup and (reverse) geocode UK Postcodes.</h4>
<hr />
<h3>Community API Libraries</h3>
<p><strong>Java </strong></p>
Expand Down Expand Up @@ -40,6 +40,8 @@
<p>Any updates or disruptions will be listed below.</p>
<ul>
<li><strong>14-18 June</strong> Following the switch to the new ONSPD CSV schema, <code>longitude</code> and <code>latitude</code> for entities with no geolocation were returned as <code>0</code> and <code>99.9999...</code> instead of <code>null</code> and <code>null</code>. Old behaviour has been restored as at 19th June (version 9.0.1)</li>
<li><strong>29 August</strong> A data centre network failure caused 6 minutes of outage (between 17:25 UTC and 17:31 UTC). After the API was restored, there was elevated response latency for ~30 minutes as more resources were brought online to compensate for lost capacity</li>
<li><strong>30 August</strong> Between Aug 29 17:31 UTC and Aug 30 14:39 UTC, the API returned incorrect longitude values on the <code>terminated_postcodes/</code> endpoint. Longitude was incorrectly reported as <code>null</code> for a subset (321,831 of 851,354) of terminated postcodes</li>
</ul>
<hr />
<h3>Email</h3>
Expand All @@ -62,7 +64,7 @@
</div>
<hr />
<h3>Support</h3>
<p>Chat: <a href="http://chat.ideal-postcodes.co.uk" target="_blank">chat.ideal-postcodes.co.uk</a></p>
<p>Chat: <a href="https://chat.ideal-postcodes.co.uk" target="_blank">chat.ideal-postcodes.co.uk</a></p>
<p>Email: support@ideal-postcodes.co.uk</p>
<p>Twitter: <a href="https://twitter.com/idealpostcodes">@IdealPostcodes</a></p>
<hr />
Expand Down
4 changes: 2 additions & 2 deletions app/views/includes/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/ideal-postcodes/postcodes.io/" title="GitHub" target="_blank">GitHub</a></li>
<li><a href="http://status.ideal-postcodes.co.uk" title="Status Page" target="_blank">Service Status</a></li>
<li><a href="https://status.ideal-postcodes.co.uk" title="Status Page" target="_blank">Service Status</a></li>
<li> <a href="https://coveralls.io/github/ideal-postcodes/postcodes.io?branch=master" title="Build Status"><img src="https://coveralls.io/repos/github/ideal-postcodes/postcodes.io/badge.svg?branch=master" alt="build-status"/></a></li>
<li> <a href="https://circleci.com/gh/ideal-postcodes/postcodes.io/tree/master" title="Build Status"><img src="https://circleci.com/gh/ideal-postcodes/postcodes.io/tree/master.svg?style=svg" alt="build-status"/></a></li>
</ul>
</div>
</div>
</nav>
</nav>

0 comments on commit 85eb586

Please sign in to comment.