Sitemap
Bao Nguyen

Bao Nguyen

I write, so I learn.

Member-only story

Vibe Coding a Python Package: Converting Old to New Vietnamese Addresses

4 min readJul 6, 2025

--

Press enter or click to view image in full size

Click here to read the full article if you don’t have a Medium membership.

Introduction

I have been using AI in my development workflow for a while, and it is super helpful. It helps me write unit tests, double-check the code I write, name variables, write comments, etc. I was always the one who wrote most of the code and asked AI to help. This time, I want to try the other way around and let AI do the main job instead — or what people call vibe coding.

The Problem

Vietnam recently merged its 63 provinces/cities down to 34, and also consolidated districts and wards. These changes went into effect July 1, 2025. There is a real need to convert the address in old format to new format. I thought this would be an interesting problem to try.

The main challenge here is just getting the data. If you have the mapping from old to new addresses, the rest is basic some look up logic.

The Result

You can find the whole repo here. I published this as a python package, so you can also install and try it out. Most of the code is written with Github Copilot and data was sourced from here. Below is an example how to use it.

--

--