News for hackers. Stuff that matters.
Re:“ISO obstructs adoption of standards by paywalling them” by arp242 on Monday March 08, 2021 @06:13PM (#26392949)
I recently wanted to get the list of countries and provinces/regions (ISO 3166); this codifies things like "US" for United States and "US-TX" for Texas.

It's ridiculously hard to find this data. Sure, there are lists floating out there on the 'net, but many of them are incomplete, outdated, or borked in various ways.

I eventually ended up writing a script to extract it from the Maxmind GeoDB files, which was the best source I could find.

I think I spent half a day on this on total: trying to find a good list, examining the lists I found and discovering they weren't good, I wrote a script to extract this from another source (some US gov't agency, I forgot which) only to discover there were problems with that data as well (it dropped diacritics IIRC), etc.

This is the simplest possible ISO standard, and a 10-minute job ballooned to this. In hindsight it almost would have been better to just pay the €200 or whatever it is, but bugger if I'm going to shell out that kind of money for a fairly small hobby project.

Re:“ISO obstructs adoption of standards by paywalling them” by scrollaway on Tuesday March 09, 2021 @02:47AM (#26396411)
Similar story as you with ISO18245: the list of merchant category codes (4 digit codes that categorize the world).

I did end up paying for the standard (which doesn't even give you the data in a programmatically accessible format! I had to write a pdf extractor). Thankfully there are public lists by visa, mastercard and stripe which also contain private ranges, so my published code shares not just the iso standard but also the matching entries in the other lists.

https://github.com/jleclanche/python-iso18245

https://github.com/jleclanche/python-iso18245/tree/master/is...

Re:“ISO obstructs adoption of standards by paywalling them” by bombcar on Monday March 08, 2021 @07:20PM (#26393562)
What’s insane is that’s literally a list of data - uncopyrightable in the US. Did you make your results available?
Re:“ISO obstructs adoption of standards by paywalling them” by arp242 on Monday March 08, 2021 @08:36PM (#26394277)
I thought about it, and even have a ~/code/iso-3166-2 directory with some stuff in it, but the problem is that I'm not entire sure how accurate/complete this data is either. It's certainly enough for my use case as it's specifically tied to GeoIP, but it's not inconceivable that there are missing entries (or outdated/wrong ones, for that matter). Perhaps there are regions which don't have an IP address in the GeoIP database (like some of the small pacific island states)? I don't know...

ISO does have a browsable website[1] and you can get the data from there, which is the best "official" source I know of, but it's not easy to extract the list from there. It's probably better to shell out the €80 (less than the €200 I remembered) to just buy the damn PDF than spend a day writing a script to extract the data from there, but I'm kinda poor at the moment, so... :-/ Also no idea if that buys me updates as well (being outdated is a big problem with many of the lists I found, turns out countries change, who knew).

Wikipedia also has pages for them[2], but again, I'm not sure how accurate/complete/updated this is.

[1]: https://www.iso.org/obp/ui/#search (click "country codes", no permalink).

[2]: e.g. https://en.wikipedia.org/wiki/ISO_3166-2:ID