Black Lives Matter. Please consider donating to Black Girls Code today.

Show and Tell - UK House prices and sales volume visualization

Hi,

I would like to share with you my app to visualize UK house prices and sales volume from 1995 to now.

https://ukhouseprice.project-ds.net/

The rendering of the choropleth is quite slow, sometimes reaching over 10 seconds (the actual calculation time in producing a figure object is around 2 sec). If you have any ideas how to speed this up (without switching to say scatter_mapbox for approximation) I’d love to hear from you.

Hope you find this useful.

Github: https://github.com/ivanlai/Plotly-App-UK-houseprices

2 Likes

Beautiful app! Love seeing these highly detailed choropleths, even if passing that much data over the wire is a little slow

I looks really cool! And i agree with @chriddyp, the choropleth visualization looks great. I can come think of a few options that might speed up the drawing. The first the is data reduction,

  • Simplify the polygons (using e.g. Shapely)
  • Remove properties that are not used form the GeoJSON

The second would be to use data compression such a geobuf. I am not sure if the Plotly component supports it, but dash-leaflet does. The size reduction depends a lot on the data, so as an initial test you could try simply to compress your GeoJSON to see how your data is affected.

3 Likes

Thanks Emil, I’ll have a go with your suggestions.

Simplifying the polygons really helped with loading speed. The polygons don’t fit so well in the dense area when zoomed in, but its a good trade off. Thanks for the advice.

One way to speed things up for the choropleth would be to drop your GeoJSON file into /assets and then in the geojson attribute of your trace just put the URL to that file like "/assets/polygons.geojson". This would let the browser reuse the same object over and over again and make subsequent updates faster as only the new data goes over the wire and not the (unchanged, I assume) polygons.

2 Likes

It works great!! Now it’s quite responsive thanks to your excellent advice Nicolas.

Many thanks!!

2 Likes