logoalt Hacker News

tjschtoday at 3:51 AM1 replyview on HN

I found another example: searching for "Nicaragua" takes you to the page for "Niger".


Replies

MilkMptoday at 4:00 AM

Hi there, I have located the root cause and will be fixing the issue:

Root cause: CIA uses FIPS codes (CanonicalCode), which differ from ISO Alpha-2 for many countries. Templates and SQL queries prioritized CanonicalCode over ISOAlpha2, so URL codes like /archive/2025/AU matched the wrong country.

Australia (AU) -> American Samoa (AS = CIA FIPS for Australia) Singapore (SG) -> Senegal (SG = CIA FIPS for Senegal) Germany (DE) -> Gambia (GM = CIA FIPS for Germany)