Open eeeeek-da-cat opened 7 years ago
Sorry, this is OpenSource, and if it does not fit your needs, move along or help make it better, but stop complaining about how bad this is.
@eeeeek-da-cat, I'm sorry if your experience wasn't good, yet. Well the package uses some other well known packages around, like mledoze/countries, so we may have to ask them where those data are coming from and is there anything we can do to improve their data. As Schnoop said, this is open source using open source and, the best we can do is to help those who are helping us, which should probably also help ourselves. As soon as I get to my country I'll work on improving it, thanks for your comments.
@Schnoop WTF is your problem? Stop complaining about how bad this is? All I do is make 1 frigging post highlighting the issues I experience, be glad I make the effort to notify about those at all in stead of just move along, so they are known and can be fixed, and I was very polite at that ... your rude answer is extremely unwarranted ... if this is complaining you can shove this package where the sun doesn't shine.
@antonioribeiro Good luck with your package, if you can get it to return the correct states for all countries I am sure many will have use for it, I however needed something now, so I went with another solution for my current project. Will check in again when I need another country/state in future projects.
@antonioribeiro FYI I went with https://github.com/DougSisk/laravel-country-state because that did return the correct states on my tests. That package uses rinvex/country in stead of mledoze/countries, not sure if it is better suited for your case, but I figured I mention it.
I would like to propose using another data source. There is already a greate opensource project in the PHP sphere gathering all the data we need. Have a look at this talk to see who and what I'm talking about.
The relevant package is commerceguys/intl. Another great addition the this could be commercguys/addressing.
I'd really urge you to watch the talk because it nicely handles lots of i18n pitfalls.
@eeeeek-da-cat, I'm finally taking a shot at those states again, and will mix Natural Earth Vector, Mledoze and Rinvex. What I could see, after almost two weeks working on this data, is that there is no complete resource, they all miss something. Let's take Rinvex, for example, which you were using via laravel-country-state: not only it has too few (very very few!) information about countries and states, but is also missing those ones (present in Natural Earth Vector):
ABW, AW, Aruba, postal: X01~, name: Aruba
AIA, AI, Anguilla, postal: X00, name:
AIA, AI, Anguilla, postal: X01~, name: Blowing Point
AIA, AI, Anguilla, postal: X02~, name: East End
AIA, AI, Anguilla, postal: X03~, name: George Hill
AIA, AI, Anguilla, postal: X04~, name: Island Harbour
AIA, AI, Anguilla, postal: X05~, name: North Hill
AIA, AI, Anguilla, postal: X06~, name: North Side
AIA, AI, Anguilla, postal: X07~, name: Sandy Ground
AIA, AI, Anguilla, postal: X08~, name: Sandy Hill
AIA, AI, Anguilla, postal: X09~, name: South Hill
AIA, AI, Anguilla, postal: X10~, name: Stoney Ground
AIA, AI, Anguilla, postal: X11~, name: The Farrington
AIA, AI, Anguilla, postal: X12~, name: The Quarter
AIA, AI, Anguilla, postal: X13~, name: The Valley
AIA, AI, Anguilla, postal: X14~, name: West End
ALA, AX, Åland Islands, postal: X02~, name: Jomala
ALA, AX, Åland Islands, postal: X04~, name: Eckerö
ALA, AX, Åland Islands, postal: X06~, name: Föglö
ALA, AX, Åland Islands, postal: X09~, name: Mariehamn
ALA, AX, Åland Islands, postal: X10~, name: Lemland
ALA, AX, Åland Islands, postal: X11~, name: Lumparland
ALA, AX, Åland Islands, postal: X12~, name: VÃ¥rdö
ALA, AX, Åland Islands, postal: X13~, name: Sottunga
ALA, AX, Åland Islands, postal: X14~, name: Kumlinge
ALA, AX, Åland Islands, postal: X15~, name: Brändö
ALA, AX, Åland Islands, postal: X16~, name: Kökar
ARE, AE, United Arab Emirates, postal: X01~, name: Neutral Zone
ARE, AE, United Arab Emirates, postal: X02~, name: Neutral Zone
ASM, AS, American Samoa, postal: X01~, name: Eastern
ASM, AS, American Samoa, postal: X02~, name: Manu's
ASM, AS, American Samoa, postal: X03~, name: Rose Atoll
ASM, AS, American Samoa, postal: X04~, name: Swain's Island
ASM, AS, American Samoa, postal: X05~, name: Western
ATA, AQ, Antarctica, postal: X01~, name: Antarctica
ATA, AQ, Antarctica, postal: X02~, name:
AUS, AU, Australia, postal: X04~, name: Ashmore and Cartier Islands
ATF, TF, French Southern and Antarctic Lands, postal: X01~, name: Archipel des Kerguelen
ATF, TF, French Southern and Antarctic Lands, postal: X02~, name: Archipel des Crozet
ATF, TF, French Southern and Antarctic Lands, postal: X03~, name: Iles Eparses de l'ocean Indien
AUS, AU, Australia, postal: X03~, name: Macquarie Island
AUS, AU, Australia, postal: X02~, name: Jervis Bay Territory
AZE, AZ, Azerbaijan, postal: SBN, name: DÉvÉçi
AZE, AZ, Azerbaijan, postal: SR, name: Shirvan
AZE, AZ, Azerbaijan, postal: X01~, name: ÅuÅa
AZE, AZ, Azerbaijan, postal: KAN, name: Kangarli
BDI, BI, Burundi, postal: BM, name: Bujumbura Mairie
BDI, BI, Burundi, postal: BL, name: Bujumbura Rural
BHS, BS, Bahamas, postal: WG, name: West Grand Bahama
BHS, BS, Bahamas, postal: EG, name: East Grand Bahama
BHS, BS, Bahamas, postal: NO, name: North Abaco
BHS, BS, Bahamas, postal: CO, name: Central Abaco
BHS, BS, Bahamas, postal: SO, name: South Abaco
BHS, BS, Bahamas, postal: MI, name: Moore's Island
BHS, BS, Bahamas, postal: BY, name: Berry Islands
BHS, BS, Bahamas, postal: NS, name: North Andros
BHS, BS, Bahamas, postal: CS, name: Central Andros
BHS, BS, Bahamas, postal: MC, name: Mangrove Cay
BHS, BS, Bahamas, postal: SA, name: South Andros
BHS, BS, Bahamas, postal: BP, name: Black Point
BHS, BS, Bahamas, postal: SW, name: Spanish Wells
BHS, BS, Bahamas, postal: NE, name: North Eleuthera
BHS, BS, Bahamas, postal: CE, name: Central Eleuthera
BHS, BS, Bahamas, postal: SE, name: South Eleuthera
BHS, BS, Bahamas, postal: SS, name: San Salvador
BHS, BS, Bahamas, postal: RC, name: Rum Cay
BHS, BS, Bahamas, postal: CK, name: Crooked Island and Long Cay
BHS, BS, Bahamas, postal: AK, name: Acklins
BIH, BA, Bosnia and Herzegovina, postal: X01~, name: Doboj
BIH, BA, Bosnia and Herzegovina, postal: X02~, name: Banja Luka
BIH, BA, Bosnia and Herzegovina, postal: BRC, name: BrÄko Distrikt
BIH, BA, Bosnia and Herzegovina, postal: X03~, name: Bijeljina
BIH, BA, Bosnia and Herzegovina, postal: X04~, name: Vlasenica
BIH, BA, Bosnia and Herzegovina, postal: X05~, name: Sarajevo-romanija
BIH, BA, Bosnia and Herzegovina, postal: X06~, name: FoÄa
BIH, BA, Bosnia and Herzegovina, postal: X07~, name: Trebinje
BLM, BL, Saint Barthélemy, postal: X00~, name: Saint Barthélemy
BLR, BY, Belarus, postal: HM, name: City of Minsk
BMU, BM, Bermuda, postal: HA, name: City of Hamilton
BMU, BM, Bermuda, postal: SG, name: City of Saint George
BMU, BM, Bermuda, postal: DEV, name: Devonshire
BMU, BM, Bermuda, postal: HAM, name: Hamilton
BMU, BM, Bermuda, postal: PAG, name: Paget
BMU, BM, Bermuda, postal: PEM, name: Pembroke
BMU, BM, Bermuda, postal: SGE, name: Saint George's
BMU, BM, Bermuda, postal: SAN, name: Sandys
BMU, BM, Bermuda, postal: SMI, name: Smith's
BMU, BM, Bermuda, postal: SOU, name: Southampton
BMU, BM, Bermuda, postal: WAR, name: Warwick
NOR, NO, Norway, postal: X01~, name: Bouvet Island
BWA, BW, Botswana, postal: GA, name: Gaborone
BWA, BW, Botswana, postal: FR, name: Francistown
BWA, BW, Botswana, postal: LO, name: Lobatse
BWA, BW, Botswana, postal: SP, name: Selebi-Phikwe
BWA, BW, Botswana, postal: ST, name: Sowa
BWA, BW, Botswana, postal: JW, name: Jwaneng
-99, -99, Ashmore and Cartier Is., postal: 99, name: Clipperton Island
COG, CG, Republic of the Congo, postal: 16, name: Pointe Noire
COK, CK, Cook Islands, postal: X01~, name: Atiu
COK, CK, Cook Islands, postal: X02~, name: Aitutaki
COK, CK, Cook Islands, postal: X03~, name: Mangaia
COK, CK, Cook Islands, postal: X04~, name: Rarotonga
COK, CK, Cook Islands, postal: X05~, name: Mitiaro
COK, CK, Cook Islands, postal: X06~, name: Mauke
COK, CK, Cook Islands, postal: X07~, name: Palmerston
COK, CK, Cook Islands, postal: X08~, name: Pukapuka
COK, CK, Cook Islands, postal: X09~, name: Rakahanga
COK, CK, Cook Islands, postal: X10~, name: Manihiki
COK, CK, Cook Islands, postal: X11~, name: Penrhyn
COL, CO, Colombia, postal: X01~, name:
CPV, CV, Cape Verde, postal: CF, name: Santa Catarina do Fogo
CPV, CV, Cape Verde, postal: SM, name: São Miguel
CPV, CV, Cape Verde, postal: SS, name: São Salvador do Mundo
CPV, CV, Cape Verde, postal: SO, name: São Lourenço dos Ãrgãos
CPV, CV, Cape Verde, postal: RS, name: Ribeira Grande de Santiago
CPV, CV, Cape Verde, postal: RB, name: Ribeira Brava
CPV, CV, Cape Verde, postal: TS, name: Tarrafal de São Nicolau
-99, -99, Ashmore and Cartier Is., postal: 99, name: Coral Sea Islands
CUW, CW, Curaçao, postal: X01~, name: Curaçao
CYM, KY, Cayman Islands, postal: X01~, name: Cayman Islands
-99, -99, Ashmore and Cartier Is., postal: 99, name: Northern Cyprus
DOM, DO, Dominican Republic, postal: 32, name: Santo Domingo
ECU, EC, Ecuador, postal: SD, name: Santo Domingo de los Tsáchilas
-99, -99, Ashmore and Cartier Is., postal: 99, name: Dhekelia
FIN, FI, Finland, postal: 08, name: Central Finland
FIN, FI, Finland, postal: 15, name: Northern Savonia
FIN, FI, Finland, postal: 05, name: Kainuu
FIN, FI, Finland, postal: 14, name: Northern Ostrobothnia
FIN, FI, Finland, postal: 07, name: Central Ostrobothnia
FIN, FI, Finland, postal: 12, name: Ostrobothnia
FIN, FI, Finland, postal: 03, name: Southern Ostrobothnia
FIN, FI, Finland, postal: 16, name: Päijät-Häme
FIN, FI, Finland, postal: 06, name: Tavastia Proper
FIN, FI, Finland, postal: 11, name: Pirkanmaa
FIN, FI, Finland, postal: 09, name: Kymenlaakso
FIN, FI, Finland, postal: 02, name: South Karelia
FIN, FI, Finland, postal: 04, name: Southern Savonia
FIN, FI, Finland, postal: 13, name: North Karelia
FIN, FI, Finland, postal: 19, name: Finland Proper
FIN, FI, Finland, postal: 17, name: Satakunta
FIN, FI, Finland, postal: 18, name: Uusimaa
FLK, FK, Falkland Islands, postal: X01~, name: Falkland Islands
FRA, FR, France, postal: MQ, name: Martinique
FRA, FR, France, postal: GF, name: Guyane française
FRA, FR, France, postal: RE, name: La Réunion
FRA, FR, France, postal: GP, name: Guadeloupe
FRO, FO, Faroe Islands, postal: X00~, name: Eysturoyar
PSE, PS, Palestine, postal: GZZ, name: Gaza Strip
GBR, GB, United Kingdom, postal: CBF, name: Central Bedfordshire
GBR, GB, United Kingdom, postal: CHE, name: Cheshire East
GBR, GB, United Kingdom, postal: CHW, name: Cheshire West and Chester
GGY, GG, Guernsey, postal: X01~, name: Sark
GIB, GI, Gibraltar, postal: X01~, name: Gibraltar
GRC, GR, Greece, postal: F, name: Ionioi Nisoi
GRC, GR, Greece, postal: J, name: Peloponnisos
GRC, GR, Greece, postal: G, name: Dytiki Ellada
GRC, GR, Greece, postal: C, name: Dytiki Makedonia
GRC, GR, Greece, postal: E, name: Thessalia
GRC, GR, Greece, postal: D, name: Ipeiros
GRC, GR, Greece, postal: K, name: Voreio Aigaio
GRC, GR, Greece, postal: H, name: Stereá Elláda
GRC, GR, Greece, postal: M, name: Kriti
GRC, GR, Greece, postal: B, name: Kentriki Makedonia
GRC, GR, Greece, postal: A, name: Anatoliki Makedonia kai Thraki
GRC, GR, Greece, postal: L, name: Notio Aigaio
GRL, GL, Greenland, postal: UO, name: Pituffik
GRL, GL, Greenland, postal: SM, name: Kommuneqarfik Sermersooq
GRL, GL, Greenland, postal: KU, name: Kommune Kujalleq
GRL, GL, Greenland, postal: QE, name: Qeqqata Kommunia
GRL, GL, Greenland, postal: UO, name: Nationalparken
GRL, GL, Greenland, postal: QA, name: Qaasuitsup Kommunia
GUM, GU, Guam, postal: X01~, name: Guam
HKG, HK, Hong Kong, postal: X01~, name: Central and Western
HKG, HK, Hong Kong, postal: X02~, name: Wan Chai
HKG, HK, Hong Kong, postal: X03~, name: Eastern
HKG, HK, Hong Kong, postal: X04~, name: Southern
HKG, HK, Hong Kong, postal: X05~, name: Yau Tsim Mong
HKG, HK, Hong Kong, postal: X06~, name: Kowloon City
HKG, HK, Hong Kong, postal: X07~, name: Sham Shui Po
HKG, HK, Hong Kong, postal: X08~, name: Wong Tai Sin
HKG, HK, Hong Kong, postal: X09~, name: Kwun Tong
HKG, HK, Hong Kong, postal: X10~, name: Sai Kung
HKG, HK, Hong Kong, postal: X11~, name: Sha Tin
HKG, HK, Hong Kong, postal: X12~, name: Kwai Tsing
HKG, HK, Hong Kong, postal: X13~, name: Tsuen Wan
HKG, HK, Hong Kong, postal: X14~, name: Tuen Mun
HKG, HK, Hong Kong, postal: X15~, name: Yuen Long
HKG, HK, Hong Kong, postal: X16~, name: North
HKG, HK, Hong Kong, postal: X17~, name: Tai Po
HKG, HK, Hong Kong, postal: X18~, name: Islands
HMD, HM, Heard Island and McDonald Islands, postal: X01~, name: Heard Island and McDonald Islands
HTI, HT, Haiti, postal: NI, name: Nippes
IMN, IM, Isle of Man, postal: X01~, name: Isle of Man
-99, -99, Ashmore and Cartier Is., postal: 99, name: Cocos (Keeling) Islands
-99, -99, Ashmore and Cartier Is., postal: 99, name: Christmas Island
IOT, IO, British Indian Ocean Territory, postal: X01~, name: British Indian Ocean Territory
JEY, JE, Jersey, postal: X01~, name: Jersey
-99, -99, Ashmore and Cartier Is., postal: 99, name: Baykonur lease in Qyzylorda
-99, -99, Ashmore and Cartier Is., postal: 99, name: Kashmir
KIR, KI, Kiribati, postal: X01~, name: Kiribati
KIR, KI, Kiribati, postal: X02~, name:
KOR, KR, South Korea, postal: 50, name: Sejong
UNK, XK, Kosovo, postal: X18~, name: PeÄ
UNK, XK, Kosovo, postal: X06~, name: Istok
UNK, XK, Kosovo, postal: X08~, name: Klina
UNK, XK, Kosovo, postal: X02~, name: DeÄani
UNK, XK, Kosovo, postal: X01~, name: Äakovica
UNK, XK, Kosovo, postal: X17~, name: Orahovac
UNK, XK, Kosovo, postal: X30~, name: ZveÄan
UNK, XK, Kosovo, postal: X12~, name: LeposaviÄ
UNK, XK, Kosovo, postal: X11~, name: Kosovska Mitrovica
UNK, XK, Kosovo, postal: X28~, name: VuÄitrn
UNK, XK, Kosovo, postal: X22~, name: Srbica
UNK, XK, Kosovo, postal: X29~, name: Zubin Potok
UNK, XK, Kosovo, postal: X09~, name: Kosovo Polje
UNK, XK, Kosovo, postal: X04~, name: Glogovac
UNK, XK, Kosovo, postal: X16~, name: ObiliÄ
UNK, XK, Kosovo, postal: X19~, name: Podujevo
UNK, XK, Kosovo, postal: X20~, name: Priština
UNK, XK, Kosovo, postal: X13~, name: Lipljan
UNK, XK, Kosovo, postal: X05~, name: Gnjilane
UNK, XK, Kosovo, postal: X27~, name: Vitina
UNK, XK, Kosovo, postal: X15~, name: Novo Brdo
UNK, XK, Kosovo, postal: X10~, name: Kosovska Kamenica
UNK, XK, Kosovo, postal: X21~, name: Prizren
UNK, XK, Kosovo, postal: X03~, name: Dragaš
UNK, XK, Kosovo, postal: X25~, name: Suva Reka
UNK, XK, Kosovo, postal: X14~, name: Mališevo
UNK, XK, Kosovo, postal: X23~, name: Å timlje
UNK, XK, Kosovo, postal: X26~, name: Uroševac
UNK, XK, Kosovo, postal: X24~, name: Å trpce
UNK, XK, Kosovo, postal: X07~, name: KaÄanik
LCA, LC, Saint Lucia, postal: 01, name: Anse-la-Raye
LCA, LC, Saint Lucia, postal: 02, name: Castries
LCA, LC, Saint Lucia, postal: 03, name: Choiseul
LCA, LC, Saint Lucia, postal: 04, name: Dauphin
LCA, LC, Saint Lucia, postal: 05, name: Dennery
LCA, LC, Saint Lucia, postal: 06, name: Gros Islet
LCA, LC, Saint Lucia, postal: 07, name: Laborie
LCA, LC, Saint Lucia, postal: 08, name: Micoud
LCA, LC, Saint Lucia, postal: 09, name: Praslin
LCA, LC, Saint Lucia, postal: 10, name: Soufrière
LCA, LC, Saint Lucia, postal: 11, name: Vieux Fort
LVA, LV, Latvia, postal: 015, name: Balvu
LVA, LV, Latvia, postal: 047, name: Kraslavas
LVA, LV, Latvia, postal: 058, name: Ludzas
LVA, LV, Latvia, postal: 088, name: Saldus
LVA, LV, Latvia, postal: 007, name: Aluksne
LVA, LV, Latvia, postal: 101, name: Valkas
LVA, LV, Latvia, postal: 016, name: Bauska
LVA, LV, Latvia, postal: 022, name: Cesu
LVA, LV, Latvia, postal: 026, name: Dobele
LVA, LV, Latvia, postal: 033, name: Gulbene
LVA, LV, Latvia, postal: JKB, name: Jekabpils
LVA, LV, Latvia, postal: 054, name: Limbaži
LVA, LV, Latvia, postal: 059, name: Madona
LVA, LV, Latvia, postal: 067, name: Ogre
LVA, LV, Latvia, postal: 073, name: Preilu
LVA, LV, Latvia, postal: 097, name: Talsi
LVA, LV, Latvia, postal: 099, name: Tukums
LVA, LV, Latvia, postal: VMR, name: Valmiera
LVA, LV, Latvia, postal: 050, name: Kuldigas
LVA, LV, Latvia, postal: 006, name: Alsungas
LVA, LV, Latvia, postal: 018, name: Brocenu
LVA, LV, Latvia, postal: 093, name: Skrundas
LVA, LV, Latvia, postal: 100, name: Vainodes
LVA, LV, Latvia, postal: 003, name: Aizputes
LVA, LV, Latvia, postal: 074, name: Priekules
LVA, LV, Latvia, postal: 032, name: Grobinas
LVA, LV, Latvia, postal: 066, name: Nicas
LVA, LV, Latvia, postal: 081, name: Rucavas
LVA, LV, Latvia, postal: 071, name: Pavilostas
LVA, LV, Latvia, postal: 028, name: Durbes
LVA, LV, Latvia, postal: 027, name: Dundagas
LVA, LV, Latvia, postal: 079, name: Rojas
LVA, LV, Latvia, postal: 063, name: Mersraga
LVA, LV, Latvia, postal: 065, name: Neretas
LVA, LV, Latvia, postal: JKB, name: Jekabpils
LVA, LV, Latvia, postal: 049, name: Krustpils
LVA, LV, Latvia, postal: 086, name: Salas
LVA, LV, Latvia, postal: 072, name: Plavinu
LVA, LV, Latvia, postal: 046, name: Kokneses
LVA, LV, Latvia, postal: 002, name: Aizkraukles
LVA, LV, Latvia, postal: 092, name: Skriveru
LVA, LV, Latvia, postal: 038, name: Jaunjelgavas
LVA, LV, Latvia, postal: 107, name: Viesites
LVA, LV, Latvia, postal: 004, name: Aknistes
LVA, LV, Latvia, postal: 105, name: Vecumnieku
LVA, LV, Latvia, postal: 034, name: Iecavas
LVA, LV, Latvia, postal: 069, name: Ozolnieku
LVA, LV, Latvia, postal: 083, name: Rundales
LVA, LV, Latvia, postal: 098, name: Tervetes
LVA, LV, Latvia, postal: 010, name: Auces
LVA, LV, Latvia, postal: 082, name: Rugaju
LVA, LV, Latvia, postal: 108, name: Vilakas
LVA, LV, Latvia, postal: 014, name: Baltinavas
LVA, LV, Latvia, postal: 044, name: Karsavas
LVA, LV, Latvia, postal: 023, name: Ciblas
LVA, LV, Latvia, postal: 110, name: Zilupes
LVA, LV, Latvia, postal: 024, name: Dagdas
LVA, LV, Latvia, postal: 001, name: Aglonas
LVA, LV, Latvia, postal: 036, name: Ilukstes
LVA, LV, Latvia, postal: 056, name: Livanu
LVA, LV, Latvia, postal: 103, name: Varkavas
LVA, LV, Latvia, postal: 078, name: Riebinu
LVA, LV, Latvia, postal: 109, name: Vilanu
LVA, LV, Latvia, postal: 011, name: Ädaži
LVA, LV, Latvia, postal: 005, name: Alojas
LVA, LV, Latvia, postal: 012, name: Babites
LVA, LV, Latvia, postal: 013, name: Baldones
LVA, LV, Latvia, postal: 020, name: Carnikavas
LVA, LV, Latvia, postal: 029, name: Engures
LVA, LV, Latvia, postal: 031, name: Garkalnes
LVA, LV, Latvia, postal: 035, name: Ikskiles
LVA, LV, Latvia, postal: 037, name: Incukalna
LVA, LV, Latvia, postal: 040, name: Jaunpils
LVA, LV, Latvia, postal: 043, name: Kandavas
LVA, LV, Latvia, postal: 051, name: Keguma
LVA, LV, Latvia, postal: 052, name: Kekavas
LVA, LV, Latvia, postal: 048, name: Krimuldas
LVA, LV, Latvia, postal: 053, name: Lielvardes
LVA, LV, Latvia, postal: 061, name: Malpils
LVA, LV, Latvia, postal: 062, name: Marupes
LVA, LV, Latvia, postal: 068, name: Olaines
LVA, LV, Latvia, postal: 080, name: Ropazu
LVA, LV, Latvia, postal: 085, name: Salacgrivas
LVA, LV, Latvia, postal: 087, name: Salaspils
LVA, LV, Latvia, postal: 089, name: Saulkrastu
LVA, LV, Latvia, postal: 090, name: Sejas
LVA, LV, Latvia, postal: 091, name: Siguldas
LVA, LV, Latvia, postal: 095, name: Stopinu
LVA, LV, Latvia, postal: 008, name: Amatas
LVA, LV, Latvia, postal: 009, name: Apes
LVA, LV, Latvia, postal: 017, name: Beverinas
LVA, LV, Latvia, postal: 019, name: Burtnieku
LVA, LV, Latvia, postal: 021, name: Cesvaines
LVA, LV, Latvia, postal: 030, name: Erglu
LVA, LV, Latvia, postal: 039, name: Jaunpiebalgas
LVA, LV, Latvia, postal: 045, name: Kocenu
LVA, LV, Latvia, postal: 055, name: Ligatnes
LVA, LV, Latvia, postal: 057, name: Lubanas
LVA, LV, Latvia, postal: 060, name: Mazsalacas
LVA, LV, Latvia, postal: 064, name: Nauksenu
LVA, LV, Latvia, postal: 070, name: Pargaujas
LVA, LV, Latvia, postal: 075, name: Priekulu
LVA, LV, Latvia, postal: 096, name: Strencu
LVA, LV, Latvia, postal: 084, name: Rujienas
LVA, LV, Latvia, postal: 104, name: Vecpiebalgas
LVA, LV, Latvia, postal: 094, name: Smiltenes
LVA, LV, Latvia, postal: 076, name: Raunas
LVA, LV, Latvia, postal: 102, name: Varaklanu
MAC, MO, Macau, postal: M, name: Macau
MAF, MF, Saint Martin, postal: X00~, name: St. Martin
MAR, MA, Morocco, postal: 01, name: Tanger - Tétouan
MAR, MA, Morocco, postal: 05, name: Fès - Boulemane
MAR, MA, Morocco, postal: 03, name: Taza - Al Hoceima - Taounate
MAR, MA, Morocco, postal: 02, name: Gharb - Chrarda - Béni Hssen
MAR, MA, Morocco, postal: 09, name: Chaouia - Ouardigha
MAR, MA, Morocco, postal: 08, name: Grand Casablanca
MAR, MA, Morocco, postal: 07, name: Rabat - Salé - Zemmour - Zaer
MAR, MA, Morocco, postal: 06, name: Meknès - Tafilalet
MAR, MA, Morocco, postal: 12, name: Tadla - Azilal
MAR, MA, Morocco, postal: 04, name: Oriental
MAR, MA, Morocco, postal: 13, name: Souss - Massa - Draâ
MAR, MA, Morocco, postal: 11, name: Marrakech - Tensift - Al Haouz
MAR, MA, Morocco, postal: 10, name: Doukkala - Abda
MAR, MA, Morocco, postal: 15, name: Laâyoune - Boujdour - Sakia El Hamra
MAR, MA, Morocco, postal: 14, name: Guelmim - Es-Semara
MAR, MA, Morocco, postal: 16, name: Oued el Dahab
MCO, MC, Monaco, postal: X01~, name: Monaco
MDA, MD, Moldova, postal: BR, name: Briceni
MDA, MD, Moldova, postal: DO, name: Donduseni
MDA, MD, Moldova, postal: OC, name: Ocniţa
MDA, MD, Moldova, postal: RI, name: RîÅcani
MDA, MD, Moldova, postal: DR, name: Drochia
MDA, MD, Moldova, postal: FA, name: FÄleÅti
MDA, MD, Moldova, postal: GL, name: Glodeni
MDA, MD, Moldova, postal: SI, name: Sîngerei
MDA, MD, Moldova, postal: AN, name: Anenii Noi
MDA, MD, Moldova, postal: BS, name: Basarabeasca
MDA, MD, Moldova, postal: CT, name: Cantemir
MDA, MD, Moldova, postal: CL, name: Calarasi
MDA, MD, Moldova, postal: CM, name: CimiÅlia
MDA, MD, Moldova, postal: CR, name: Criuleni
MDA, MD, Moldova, postal: FL, name: FloreÅti
MDA, MD, Moldova, postal: GRI, name: Grigoriopol
MDA, MD, Moldova, postal: HI, name: Hîncesti
MDA, MD, Moldova, postal: IA, name: Ialoveni
MDA, MD, Moldova, postal: LE, name: Leova
MDA, MD, Moldova, postal: NI, name: Nisporeni
MDA, MD, Moldova, postal: RE, name: Rezina
MDA, MD, Moldova, postal: RE, name: Rezina
MDA, MD, Moldova, postal: SD, name: ÅoldÄneÅti
MDA, MD, Moldova, postal: ST, name: StrÄÅeni
MDA, MD, Moldova, postal: TE, name: TeleneÅti
MDA, MD, Moldova, postal: CS, name: Causeni
MDA, MD, Moldova, postal: BD, name: Bender
MDA, MD, Moldova, postal: SV, name: Åtefan Voda
MDA, MD, Moldova, postal: CAM, name: Camenca
MEX, MX, Mexico, postal: X01~, name:
MHL, MH, Marshall Islands, postal: L, name: Railik Chain
MHL, MH, Marshall Islands, postal: T, name: Ratak Chain
MKD, MK, Macedonia, postal: 12, name: VevÄani
MKD, MK, Macedonia, postal: 68, name: Saraj
MKD, MK, Macedonia, postal: 71, name: Staro NagoriÄane
MKD, MK, Macedonia, postal: 79, name: Äair
MKD, MK, Macedonia, postal: 09, name: Butel
MKD, MK, Macedonia, postal: 80, name: ÄaÅ¡ka
MKD, MK, Macedonia, postal: 77, name: Centar
MKD, MK, Macedonia, postal: 81, name: ÄeÅ¡inovo-ObleÅ¡evo
MKD, MK, Macedonia, postal: 17, name: Gazi Baba
MKD, MK, Macedonia, postal: 38, name: Karpoš
MKD, MK, Macedonia, postal: 36, name: Kavadartsi
MKD, MK, Macedonia, postal: 01, name: Aerodrom
MKD, MK, Macedonia, postal: 39, name: Kisela Voda
MKD, MK, Macedonia, postal: 29, name: GjorÄe Petrov
MKD, MK, Macedonia, postal: 78, name: Centar župa
MKD, MK, Macedonia, postal: 50, name: Mavrovo and Rostusa
MKD, MK, Macedonia, postal: 73, name: Strumitsa
MKD, MK, Macedonia, postal: 60, name: PehÄevo
MKD, MK, Macedonia, postal: 84, name: Å uto Orizari
MNP, MP, Northern Mariana Islands, postal: X01~, name: Rota
MNP, MP, Northern Mariana Islands, postal: X02~, name: Tinian
MNP, MP, Northern Mariana Islands, postal: X03~, name: Saipan
MNP, MP, Northern Mariana Islands, postal: X04~, name: Northern Islands
MSR, MS, Montserrat, postal: A, name: Saint Anthony
MSR, MS, Montserrat, postal: G, name: Saint Georges
MSR, MS, Montserrat, postal: P, name: Saint Peter
MWI, MW, Malawi, postal: NE, name: Neno
NAM, NA, Namibia, postal: OK, name: Kavango
NCL, NC, New Caledonia, postal: X01~, name: Ãles Loyauté
NCL, NC, New Caledonia, postal: X02~, name: Sud
NCL, NC, New Caledonia, postal: X03~, name: Nord
NFK, NF, Norfolk Island, postal: X01~, name: Norfolk Island
NIU, NU, Niue, postal: X01~, name: Niue
NLD, NL, Netherlands, postal: BQ2, name: Saba
NLD, NL, Netherlands, postal: BQ3, name: St. Eustatius
NLD, NL, Netherlands, postal: BQ1, name: Bonaire
NOR, NO, Norway, postal: 21, name: Svalbard
NZL, NZ, New Zealand, postal: CIT, name: Chatham Islands Territory
NZL, NZ, New Zealand, postal: X01~, name: Kermadec Islands
NZL, NZ, New Zealand, postal: X01~, name: Tokelau
NZL, NZ, New Zealand, postal: X03~, name: Three Kings Islands
NZL, NZ, New Zealand, postal: X04~, name: Antipodes Islands
NZL, NZ, New Zealand, postal: X05~, name: Campbell Islands
NZL, NZ, New Zealand, postal: X06~, name: Auckland Islands
NZL, NZ, New Zealand, postal: X07~, name: The Snares
OMN, OM, Oman, postal: SS, name: Ash Sharqiyah North
OMN, OM, Oman, postal: BJ, name: Al Batnah South
PAK, PK, Pakistan, postal: KP, name: N.W.F.P.
PCN, PN, Pitcairn Islands, postal: X01~, name: Pitcairn Islands
CHN, CN, China, postal: X01~, name: Paracel Islands
-99, -99, Ashmore and Cartier Is., postal: 99, name: Spratly Islands
PHL, PH, Philippines, postal: MDE, name: Mandaue
PHL, PH, Philippines, postal: LAP, name: Lapu-Lapu
PHL, PH, Philippines, postal: BCD, name: Bacolod
PRI, PR, Puerto Rico, postal: PR, name: Puerto Rico
PRK, KP, North Korea, postal: 13, name: RasÅn
PYF, PF, French Polynesia, postal: X01~, name: Windward Islands
PYF, PF, French Polynesia, postal: X02~, name: Leeward Islands
PYF, PF, French Polynesia, postal: X03~, name: Tuamotu-Gambier
PYF, PF, French Polynesia, postal: X04~, name: Austral Islands
PYF, PF, French Polynesia, postal: X05~, name: Marquesas Islands
QAT, QA, Qatar, postal: ZA, name: Al Daayen
RUS, RU, Russia, postal: X01~, name:
RUS, RU, Russia, postal: 43, name: Crimea
RUS, RU, Russia, postal: 40, name: Sevastopol
ESH, EH, Western Sahara, postal: X01~, name: Western Sahara
SDN, SD, Sudan, postal: DS, name: Southern Darfur
SDN, SD, Sudan, postal: DS, name: Eastern Darfur
SDN, SD, Sudan, postal: DW, name: Western Darfur
SDN, SD, Sudan, postal: DE, name: Central Darfur
SDN, SD, Sudan, postal: GD, name: Gedarif
SDN, SD, Sudan, postal: KS, name: South Kordufan
SDN, SD, Sudan, postal: KN, name: North Kordufan
SSD, SS, South Sudan, postal: BN, name: Northern Bahr el Ghazal
SSD, SS, South Sudan, postal: LK, name: Lakes
SSD, SS, South Sudan, postal: EW, name: Western Equatoria
SSD, SS, South Sudan, postal: EC, name: Central Equatoria
SSD, SS, South Sudan, postal: NU, name: Upper Nile
SSD, SS, South Sudan, postal: JG, name: Jonglei
SSD, SS, South Sudan, postal: UY, name: Unity
SSD, SS, South Sudan, postal: WR, name: Warrap
SSD, SS, South Sudan, postal: BW, name: Western Bahr el Ghazal
SSD, SS, South Sudan, postal: EE, name: Eastern Equatoria
SEN, SN, Senegal, postal: SE, name: Sédhiou
SEN, SN, Senegal, postal: KE, name: Kédougou
SEN, SN, Senegal, postal: KA, name: Kaffrine
SGS, GS, South Georgia, postal: X01~, name: South Georgia and the South Sandwich Islands
-99, -99, Ashmore and Cartier Is., postal: 99, name: Somaliland
SPM, PM, Saint Pierre and Miquelon, postal: X01~, name: Saint-Pierre
SPM, PM, Saint Pierre and Miquelon, postal: X02~, name: Miquelon-Langlade
SVN, SI, Slovenia, postal: 195, name: Apace
SXM, SX, Sint Maarten, postal: SX, name: Sint Maarten
SYC, SC, Seychelles, postal: X02~, name: Outer Islands
SYC, SC, Seychelles, postal: 24, name: Les Mamelles
SYC, SC, Seychelles, postal: 25, name: Roche Caïman
SYR, SY, Syria, postal: X01~, name: UNDOF
TCA, TC, Turks and Caicos Islands, postal: X01~, name: Middle Caicos
TCA, TC, Turks and Caicos Islands, postal: X02~, name: North Caicos
TCA, TC, Turks and Caicos Islands, postal: X03~, name: Providenciales and West Caicos
TCA, TC, Turks and Caicos Islands, postal: X04~, name: South Caicos and East Caicos
TCA, TC, Turks and Caicos Islands, postal: X05~, name: Grand Turk
TCA, TC, Turks and Caicos Islands, postal: X06~, name: Salt Cay
TCD, TD, Chad, postal: BO, name: Borkou
TCD, TD, Chad, postal: TI, name: Tibesti
TCD, TD, Chad, postal: X01~, name: Ennedi
TCD, TD, Chad, postal: BG, name: Barh El Gazel
TCD, TD, Chad, postal: SI, name: Sila
THA, TH, Thailand, postal: 38, name: Bueng Kan
TJK, TJ, Tajikistan, postal: X01~, name: Tadzhikistan Territories
TJK, TJ, Tajikistan, postal: DU, name: Dushanbe
TUV, TV, Tuvalu, postal: X01~, name: Tuvalu
TWN, TW, Taiwan, postal: KIN, name: Kinmen
TZA, TZ, Tanzania, postal: 28, name: Katavi
TZA, TZ, Tanzania, postal: 30, name: Simiyu
TZA, TZ, Tanzania, postal: 27, name: Geita
TZA, TZ, Tanzania, postal: 29, name: Njombe
UGA, UG, Uganda, postal: 331, name: Zombo
UGA, UG, Uganda, postal: 231, name: Ngora
UGA, UG, Uganda, postal: 229, name: Luuka
UGA, UG, Uganda, postal: 226, name: Buyende
UGA, UG, Uganda, postal: 227, name: Kibuku
UGA, UG, Uganda, postal: 232, name: Serere
UGA, UG, Uganda, postal: 117, name: Buikwe
UGA, UG, Uganda, postal: 120, name: Buvuma
UGA, UG, Uganda, postal: 119, name: Butambala
UGA, UG, Uganda, postal: 121, name: Gomba
UGA, UG, Uganda, postal: 123, name: Kyankwanzi
UGA, UG, Uganda, postal: 327, name: Lamwo
UGA, UG, Uganda, postal: 326, name: Kole
UGA, UG, Uganda, postal: 323, name: Alebtong
UGA, UG, Uganda, postal: 330, name: Otuke
UGA, UG, Uganda, postal: 322, name: Agago
UGA, UG, Uganda, postal: 420, name: Kiryandongo
UGA, UG, Uganda, postal: 423, name: Ntoroko
UGA, UG, Uganda, postal: 421, name: Kyegegwa
UGA, UG, Uganda, postal: 228, name: Kween
UGA, UG, Uganda, postal: 225, name: Bulambuli
UGA, UG, Uganda, postal: 230, name: Namayingo
UGA, UG, Uganda, postal: 328, name: Napak
UGA, UG, Uganda, postal: 324, name: Amudat
UGA, UG, Uganda, postal: 124, name: Lwengo
UGA, UG, Uganda, postal: 118, name: Bukomansimbi
UGA, UG, Uganda, postal: 122, name: Kalungu
UGA, UG, Uganda, postal: 424, name: Rubirizi
UGA, UG, Uganda, postal: 422, name: Mitooma
UGA, UG, Uganda, postal: 425, name: Sheema
UGA, UG, Uganda, postal: 325, name: Buhweju
UGA, UG, Uganda, postal: 329, name: Nwoya
-99, -99, Ashmore and Cartier Is., postal: 99, name: Guantanamo Bay USNB
VAT, VA, Vatican City, postal: X01~, name: Vatican
VEN, VE, Venezuela, postal: X01~, name:
VGB, VG, British Virgin Islands, postal: X01~, name: British Virgin Islands
VIR, VI, United States Virgin Islands, postal: X02~, name: Saint Thomas
VIR, VI, United States Virgin Islands, postal: X03~, name: Saint John
VIR, VI, United States Virgin Islands, postal: X01~, name: Saint Croix
VNM, VN, Vietnam, postal: HP, name: Hải Phòng
VNM, VN, Vietnam, postal: HN, name: Ha Noi
VNM, VN, Vietnam, postal: DN, name: Äà Nẵng
VNM, VN, Vietnam, postal: SG, name: HỠChà Minh city
PSE, PS, Palestine, postal: WBK, name: West Bank
WLF, WF, Wallis and Futuna, postal: SG, name: Sigave
WLF, WF, Wallis and Futuna, postal: UV, name: `Uvea
WLF, WF, Wallis and Futuna, postal: AL, name: Alo
-99, -99, Ashmore and Cartier Is., postal: 99, name: Akrotiri
YEM, YE, Yemen, postal: SA, name: Amanat Al Asimah
YEM, YE, Yemen, postal: RA, name: Raymah
ZMB, ZM, Zambia, postal: 10, name: Muchinga
Is there any useful data to merge from geonames.org api ?
@isometriq They are all different in quantity and quality, we could probably fill in some blanks, but we would have to compare data coming from the ones we are already getting info from.
@antonioribeiro Maybe OpenStreetMap might have some good data to use? I know its more focused on maps but because its such a large well used open source project it also tends to have data on states, cities, counties, countries, etc.
@antonioribeiro To reiterate what I wrote in my other comment: There already is a complete dataset available. The Unicode CLDR dataset has all languages and all countries in every language. It is a standardized opensource dataset that has everything. You can just use it yourself or get the data from the intl package I linked above.
Would love to use this package to replace my current setup with Models and database tables, but a lot of calls for states based on country (for example for Belgium) return errors like 'Property [states] does not exist on this collection instance'., ... The ones who do return a result are often incomplete .. when I take for example the Netherlands not all postal fields are filled, so following your example:
returns only half of the provinces (and one with a blank postal field) because the postal field is empty for a lot of provinces.
So, no offense, the idea is really great and I would use this package for certain if the results would be correct, but that's not the case, so imho this package is not ready for real world use yet ... not for my current use case where correct data is crucial anyway.