Indonesia Postal Code
Today, I watch a video from CGP Grey on postal code patterns.
I was curious about the postal code pattern in Indonesia, so I decided to visualize it in Kodepos.
I built it with help of Cursor. Lately I found it making producing code and exploring new ideas much more fun. As I can focus on what I want to do instead of how to do it and figuring out how to use this random Python library or trying to understand how pandas dataframe works.
Some interesting observations I had while reading the data is the postal code do have pattern of hierarchy, but still have its exceptions. The Wikipedia article for Postal Code in Indonesia mentioned that the postal code is divided into 5 levels:
- First digit represents the postal office region code
- Second digit represents the regency/city code
- Third digit (also) represents the regency/city code
- Fourth digit represents the district code within the regency/city
- Fifth digit represents the village/subdistrict code
But those rule doesn’t apply for Jakarta capital region and its Bodetabek area.
Another interesting things is the granualarity and coverage of area. More populated area like Java island have more unique code count and each code cover smaller area.
In more sparse area like Sulawesi, the density is concentrated in cities and inland region is more spares.
The dataset is taken from sooluh/kodepos.
In total it has 83761 data point and 10671 unique postal code in Indonesia.
On average, an area is sharing its postal code with 7 different place.
Few more things that I want to explore:
- Learning up statistics. Can I quantify the correlation between postal code distribution and population density?
- Data visualization. Current map plotting is very basic, building a convex hull. Can I make it map directly with the city area and have more seamless blending when transitioning between different hierarchy level?