Singapore Postcode Geocoder

Singapore Postcode Geocoder

A simple app, using kedro and streamlit, that adds lat-long coordinates to a data file which has Singapore postcodes in it. Any column can contain postcode info, and it can be part of a longer string. The app finds the best column to use, automatically extracts the postcodes, and then adds the lat-long coordinates.

Singapore postcode geocoder screenshot
Singapore postcode geocoder

It’s an exercise that I’ve had to repeat very often when assisting clients with logistics-based planning and analysis. For logistics, you need to know where stuff is located. Often, this data, specifically the geographical coordinates, is not captured, but there are some address info. There are various ways and services to go from address info to coordinates, but they tend to be quite slow, some are expensive, and they usually work one address or location at a time (not fun if you are dealing with thousands). Given that Singapore is really-really-really good at making their data available (check out data.gov.sg), it’s possible to custom-build something that does this. And after getting the lon-lat coordinates, you can apply some pretty cool models, and you can create some pretty maps.

The app is available at https://sg-postcode-geocoding.streamlit.app/ and the source code at https://github.com/second-order-ai/singapore-postcode-geocoding. The app code is here in the repo.