Monday, November 28, 2022

Land Registry data for October 2022

The server is slowly churning through the latest house price data from the Land Registry. It looks like the number of sales are still falling but prices are starting to head up. Also interesting to note that it is flats that caused most of the downward movement in prices over the last year, houses continued to increase in value

Friday, October 28, 2022

Land Registry data for September 2022

I'm in the process of uploading the latest house price data to the website. It looks like house prices are on the way up again, although they are still negative on an annual basis. I would guess that increasing interest rates and the cost of living crisis will likely cause prices to fall in the coming months.

One thing I haven't seen mentioned about increasing mortgage rates is how the effect of them is very different depending on where you are in your mortgage life. For example, compare the increasing payments for someone with a 25 year mortgage compared to someone with 5 years remaining on their £100,000 mortgage

Number of years Mortgage rate Percentage increase in payment
2% 6%
25 £424 £644 52%
5 £1,753 £1,933 10%
The person with 5 years left on their mortgage is mostly paying down the loan whilst the person with 25 years left is mostly paying interest so their payments increase much more. Once again the younger generation are getting walloped, this time by maths rather than their government.

Sunday, October 23, 2022

GeoJSON data

I've added GeoJSON versions of some of the KML downloads on the website. If they prove popular, I'll add more as time goes on. Let me know if there is anything you'd particularly like to see.

Friday, September 30, 2022

Land Registry data August 2022

I'm uploading the latest Land Registry data to my website. Sale prices continue to fall but more slowly. And right on cue, the government have reduced Stamp Duty in a bid to get prices moving up again. Unfortunately their other budget changes managed to spook the markets meaning mortgage rates are heading up, so it's quite likely they'll be getting less revenue from Stamp Duty whilst also failing to get an election boost.

Sunday, September 25, 2022

Filter segments by Local Legend

A long time ago, one of the users of my Strava Segment Explorer asked for the ability to filter segments by whether they had a Local Legend. Well, now you can! Most segments still don't have the data required so it may not be currently that useful, but over time it should become more helpful. From my own experimentation, it seems the segments that don't have a Local Legend set are ones nobody has ridden recently or that are flagged as hazardous

Monday, September 19, 2022

Downloadable segment lists

I've just added a new feature to the site. When using the segment explorer, you can download a CSV file of the segments you're viewing. The CSV file will include all the segments I know about in the area, which could be more than what is displayed on the map. 

I've limited the maximum area for which the site will return data, mostly to protect my server from malicious or daft users.

The columns returned are currently just what's displayed in the table. If you need other data, let me know. Also let me know if you have any suggestions or find any problems


Thursday, September 01, 2022

Land Registry data July 2022

I'm in the process of uploading the latest house sales data for July 2022 to my website. According to the Land Registry, prices are falling on an annual basis but this article caught my eye which claims prices are going up by 10% per year. The Nationwide base their calculations of a different set of data and they probably calculate the numbers differently to me so it's unlikely they would agree completely, but it's still interesting that the direction of travel is completely different. Still, they think the average price of a house is £273,751, my calculations from the Land Registry put it at £266,796, which is in the same ballpark. Maybe they did some funky calculations to remove the effect of the Stamp Duty holiday from last year?

Thursday, August 25, 2022

Friday, August 05, 2022

GB station usage for 2020-2021

I've updated the GB station usage data for 2020-2021. As you may expect, the usage of stations collapsed during this period of time, something to do with a pandemic, you may remember it.

The data came out last November, but I completely forgot about it. I've now added a reminder for this year and subsequent years.

Thursday, July 28, 2022

Land Registry data for June 2022

I'm uploading the latest property data from the Land Registry to my website. Whilst the price of everything else is going through the roof, the price of houses have started going down for the first time in about ten years. The main reason for this is something I hadn't noticed before. Just before the Stamp Duty holiday ended, sales volumes and prices went ballistic. Those figures have now dropped out of the annual price calculations leading to a big drop in prices. The architect of this classic boom and bust could well be our next PM.

Sunday, July 10, 2022

Land Registry data for May 2022

I've uploaded the latest property sales data to my website. House price inflation seems to be bouncing around close to zero, which I guess is why the government is talking about 50 year mortgages... 

Sunday, June 05, 2022

Land Registry property data for April 2022

I've uploaded the latest property data for England and Wales to my website. The annual figures still show sales falling with prices flat and likely to turn negative next month.

Friday, May 27, 2022

UK postcode data update

I've uploaded the latest UK postcode data to my website. Some people have been asking about the ward boundary changes. These are included in the update but are not complete so I would approach with caution. I made some manual changes so that all postcodes have a ward associated but these will be the old wards in some cases.

From the ONSPD user guide

This release of the NHSPD includes the 2022 ward boundary changes. However, some change orders have yet to be included in OS Boundary-Line including The Cumbria (Structural Changes) Order 2022, The North Yorkshire (Structural Changes) Order 2022 and The Somerset (Structural Changes) Order 2022. Therefore, ward codes E05014171–E05014393 are not yet included. Also, Welsh wards W05001616 –W05001626 in Merthyr Tydfil are yet to be included and Sirhowy ward in Blaenau Gwent should be W05001268 rather than W05000764. In Scotland there is a duplicated ward code – S13003134. This should be S13003134 – Stepps, Chryston and Muirhead in North Lanarkshire and S13002608 – An Taobh Siar agus Nis in Na h-Eileanan Siar

Tuesday, May 03, 2022

House price for England and Wales March 2022

I'm currently uploading the latest house price data to my website. I really need to improve the performance of the import, it now takes days to complete, but it should be complete some time soon. 

There's a definite trend appearing in the data since last summer, sales are falling and prices have peaked. Annual house price inflation is still positive but it looks like it will go negative very shortly, unless the government intervene again. It's also noticeable that the price drops are mostly being driven by the price of flats, although I have no insight into why that would be the case.

Wednesday, April 13, 2022

Converting .ashx handlers to .NET 5/6

I've been trying to figure out how to convert my site to .NET 5 or 6 for a long while. The pages are written in PHP (because that was the only thing available to me on my web host at the time) but there are many .ashx handlers that were added when I originally decided to move to ASP.NET but never got round to completing the job. But the .NET Framework isn't going to be improved or added to in the future so moving to .NET 5/6 needs to happen at some point. It's not a simple process, the differences are fairly major, but I think I've finally figured out a path to making the move.

My main concern was that I wanted to have a common code base so I can reuse code and continue to work on my current site whilst I set up the updated one, rather than rewriting the whole thing from scratch. A rewrite would certainly be simpler but the switch over would almost certainly be a disaster.

The first step was to work on assemblies used by the site. The Portability Analyzer helped here in figuring out how portable my code was (although it's not generally too helpful in explaining what to do with APIs that are not available in .NET 5). Fortunately it wasn't too difficult to move .NET Coords to .NET Standard 2, meaning it could be used from old and new .NET. I used the .NET Upgrade Assistant to convert to the latest SDK project format. Luckily there were cross platform versions of the third party assemblies I use.

One other thing I did was rip out Entity Framework, which I've never been able to get along with and move from the Oracle MySql ADO.NET connector to MySqlConnector. Like everything from Oracle on Windows, their MySql connector is a complete dumpster fire.

Once that was done, I decided the next step was to move all my .ashx handler code into a new assembly. So every .ashx file now looks something like

<%@ WebHandler Language="C#" Class="DoogalCode.AdministrativeAreasCSV" %>

I configured that assembly to target .NET 4.8 and .NET 5, since there would have to be differences between them. At this point, the .NET 4.8 assembly compiled fine (although with many warnings about using things from System.Web even though that's perfectly fine in .NET 4.8!) and the .NET 5 assembly failed with a gazillion errors. 

The next step was to build the .NET 5 assembly without errors. I decided the simplest way to do that was to build .NET 5 only versions of all the things the compiler was complaining about. This meant things like HttpContext, HttpRequest, HttpResponse and IHttpHandler. The properties and methods didn't do anything except throw an exception, I didn't want the code to run, just compile. I'd figure out the details of  how to implement those methods as I went through each handler and got them working in .NET 5.

Once I'd done that, I needed a .NET web site. Since my front end is written in PHP, I decided to take a look at PeachPie, which claims to be a PHP compiler for .NET. And I am mightily impressed. I created a new PeachPie project, copied my PHP files across and it just worked. I had my website running in .NET 5 in a few minutes. Admittedly I don't do anything very complicated in my PHP, so I can't be sure it's perfect but it's certainly perfect for my needs.

But I still had a bunch of .ashx handlers to get working in .NET 5. I added a method to my website startup class that let me use my dummy IHttpHandler and HttpContext classes to call into my handlers

private static void MapHandler<THandler>(IApplicationBuilder app, string path) where THandler : IHttpHandler, new()

{

  app.Map(path, (app2) =>

  {

    app2.Run(async context =>

    {

      var handler = new THandler();

      await Task.Run(() =>

      {

        handler.ProcessRequest(new DoogalCode.HttpContext(context));

      });

    });

  });

}

Then for each handler I mapped URL paths to the handler via this method, like so

MapHandler<CountiesCSV>(app, "/CountiesCSV");

Now I could call my handlers and start to fix up the methods in my dummy classes. Which is where I am currently, going through each handler fixing issues as I find them, whilst still being able to work on my live website. Once that is done and has gone live, I may try to figure out how to finally move my PHP code to proper .NET

Addendum - This all worked out really well. I was able to retarget all my classic .NET code to .NET 5, whilst continuing to keep the site running. Switching over to the new website was relatively painless, with little downtime. Moving to .NET 6 was straightforward. I was then able to finally start replacing PHP pages with .NET Razor pages, which I'm currently working through. I've also recently learned that Microsoft are developing their own adapters for System.Web.HttpContext etc to make the transition easier, which I wish I'd known sooner!

Monday, March 28, 2022

House price data for England and Wales February 2022

I've uploaded the latest Land Registry data to my website. I've also added a "Sale Type" column to the data which shows if the sale is a non-standard sale. These include transfers under a power of sale/repossessions, buy-to-lets, transfers to non-private individuals and sales where the property type is classed as ‘Other’. The aggregated data now ignores non-standard sales, although it has not had a major effect.

Monday, February 28, 2022

Distance to the sea for all postcodes

I've added the approximate distance to the sea for every postcode. This is available on the individual postcode pages and as part of the CSV downloads

Sunday, February 20, 2022

Distance to a line

Probably only of use to me, but I've added a page that lets you find the shortest distance between a postcode and a straight line

Distance to a line (doogal.co.uk)