country-regions / country-region-data Goto Github PK
View Code? Open in Web Editor NEWA source list of countries, regions and shortcodes in JSON and JS format.
License: MIT License
A source list of countries, regions and shortcodes in JSON and JS format.
License: MIT License
Regions list is not valid.
ref: https://en.wikipedia.org/wiki/Provinces_of_the_Philippine
correct list: phillippinesRegions.txt
These are the six official region/counties/states for Northern Ireland (under United Kingdom):
Antrim
Armagh
Down
Derry/Londonderry
Fermanagh
Tyrone
Hi,
You may consider completing the Hungary region list with:
{
"name": "Jász-Nagykun-Szolnok",
"sc": "JN"
},
as this region exists in Hungary, as described in wikipedia page: https://en.wikipedia.org/wiki/Counties_of_Hungary
Thanks & BR
Can you change polish region: "Malopolskie" to "Małopolskie", please?
There is something wrong with the sub areas in Denmark "DK"
all subareas starting with "FO-" or "GL-" should not be part of the subareas of DK but under Faroe islands "FO" and Greenland "GL"
It would be great if there was a simple flag image for every individual country, of course including alternatives if a country has multiple for any reason.
Of course this is a pretty big request, but I'd like to know what others think? Do flags belong in a project like this? I believe it would be very relevant and useful.
Edit: I saw that other projects use emojis as flag icons, that would be perfect for this repo too! Check out react-native-country-picker-modal for instance
Hello,
I'm thinking to add admin2 level. For example, belgium section could looks like this :
{
"name":"Bruxelles-Capitale",
"iso3166-2":"BRU",
"admin2": null
},
{
"name":"Région Flamande",
"iso3166-2":"VLG",
"admin2": [
{
"name":"Antwerpen",
"iso3166-2":"BE-VAN"
},
{
"name":"Limburg",
"iso3166-2":"BE-VLI"
},
{
"name":"Oost-Vlaanderen",
"iso3166-2":"BE-VOV"
},
{
"name":"Vlaams-Brabant",
"iso3166-2":"BE-VBR"
},
{
"name":"West-Vlaanderen",
"iso3166-2":"BE-VWV"
}
]
},
{
"name":"Région Wallonië",
"iso3166-2":"WAL",
"admin2": [
{
"name":"Brabant wallon",
"iso3166-2":"BE-WBR"
},
{
"name":"Hainaut",
"iso3166-2":"BE-WHT"
},
{
"name":"Liége",
"iso3166-2":"BE-WLG"
},
{
"name":"Luxembourg",
"iso3166-2":"BE-WLX"
},
{
"name":"Namur",
"iso3166-2":"BE-WNA"
}
]
}
What is your opinion ? Are you interest to add this configuration ?
Hey,
Our UK product managers have raised that Berkshire seems to be missing from the list of UK regions, would it be possible to add it ?
Thanks!
PS: thanks a lot for this very useful library :)
Hi!
One of Romanian regions is missing - Regiunea București
Here is Wikipedia page: https://en.wikipedia.org/wiki/Regions_of_the_People%27s_Republic_of_Romania
I think it is also related to this pull request - #127
Thank you!
Can't use this package with VITE v4.2.1
. Build crashes with next message:
country-region-data doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
{
"name": "Muchinga",
"shortCode": "10"
}
All country names are in English & should be in the English form.
Tokyo~13
There seem to be missing a few regions for ISO-3166 Vietnam regions.
https://www.iso.org/obp/ui/#iso:code:3166:VN
The country MK recently changed names as well as region short codes according to https://www.iso.org/obp/ui/#iso:code:3166:MK
The Cayman Islands are showing incorrect regions. The regions should be: Bodden Town, East End, George Town, North Side and West Bay
Can this please be updated?
Its currently showing: Creek, Eastern, Midland, South Town, Spot Bay, Stake Bay, West End, Western
why package-lock.json listed as a dependency?
Currently Cayman Islands is listing Creek, Eastern, Midland, South Town, Spot Bay, Stake Bay, West End, and Western. The states of Cayman Islands should include Grand Cayman, Little Cayman and Cayman Brac (perhaps some others that I am not aware of)
Hi
This is such a great component - thank you so much for all the effort you have put into it and continue to do.
It would be great if the data included a descriptor for region each country - e.g:
US - state
UK - county
Canada - province
etc
Users being able to select regions is wonderful and if they were able to have a familiar descriptor for the region, that would be even better.
Thanks very much.
With kind regards and gratitude
Robin
It seems that, at least for Romania, a region is missing: Ilfov.
As per instructions here: https://docs.data.world/documentation/api/githubSync.html
See this ticket created by @Sseast.
L12587 - L12600
{
"name": "Iifov",
"shortCode": "B"
},
This region is called ILFOV.
Thank you 👍
https://github.com/country-regions/country-region-data/blob/master/data.json#L17901
And it is out of alpha order
From the wiki https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States, it's not.
The current version of https://github.com/country-regions/country-region-data/blob/master/data.json (and https://github.com/country-regions/country-region-data/blob/master/data.js) is huge in size. It will be great to have minified version of the files. It can be generated by a new grunt task.
Moreover, we may use another structure to store regions in the minified files: use shortCode
values as the key of the object of regions (it is an array for now), this will save much space.
Feature request: it would be very helpful to have a mapping of 'region'-> 'timezone'
A package that uses this package must include or exclude all data for all countries. For a web UI that only needs regions for some countries, this makes country-region-data
an unnecessarily very large part of its bundle.
It would be nice if data could be imported by country, so that data for unused countries is not included in the bundled app.
E.g.
import countriesOnly from 'country-region-data/countries'
import { us, ca } from 'country-region-data/regions'
or
import countriesOnly from 'country-region-data/countries'
import us from 'country-region-data/us'
import ca from 'country-region-data/ca'
Travis started dying with the new node 18 release. Disabled for now so will need to run validation manually.
Three of the Brazilian states are missing accents:
Para -> Pará
Paraiba -> Paraíba
Sao Paulo -> São Paulo
From: country-regions/country-region-selector#72
Hampshire (County of Southampton) - This was changed in 1959. The correct name is just "Hampshire" - Can "(County of Southampton)" be removed?
Not sure if this is in scope for this library, but it would be nice to have English abbreviations for certain countries listed that aren't necessarily their shortcode (e.g. USA, UAE, CAR...)
Cities under Pakistan have incorrect character. For example Islāmābād
should be Islamabad
Similarly
Āzād Kashmīr. -> Azad Kashmir
Balōchistān. ->. Balochistan
Gilgit-Baltistān ->. Gilgit-Baltistan
Khaībar Pakhtūnkhwās ->. Khaibar Pakhtunkhwa
Punjāb. -> Punjab
There are two "05" regions for CY, I believe Keryneia should be 06:
CY_04(Country.CY, "Ammochostos"),
CY_05(Country.CY, "Keryneia"),
CY_03(Country.CY, "Larnaka"),
CY_01(Country.CY, "Lefkosia"),
CY_02(Country.CY, "Lemesos"),
CY_05(Country.CY, "Pafos"),
And two "34" regions for DO, Nordeste should be 33:
DO_02(Country.DO, "Cibao Central"),
DO_37(Country.DO, "Del Valle"),
DO_01(Country.DO, "Distrito Nacional"),
DO_38(Country.DO, "Enriquillo"),
DO_04(Country.DO, "Norcentral"),
DO_34(Country.DO, "Nordeste"),
DO_34(Country.DO, "Noroeste"),
DO_35(Country.DO, "Norte"),
DO_42(Country.DO, "Valdesia"),
The EG region code for "Giza" should be GZ, not SUZ: Wikipedia EG
EG_SUZ(Country.EG, "Giza"),
Two region codes in FJ are off. Bua should be 02, Serua should be 13:
FJ_01(Country.FJ, "Ba"),
FJ_01(Country.FJ, "Bua"),
FJ_03(Country.FJ, "Cakaudrove"),
FJ_04(Country.FJ, "Kadavu"),
FJ_05(Country.FJ, "Lau"),
FJ_06(Country.FJ, "Lomaiviti"),
FJ_07(Country.FJ, "Macuata"),
FJ_08(Country.FJ, "Nadroga and Navosa"),
FJ_09(Country.FJ, "Naitasiri"),
FJ_10(Country.FJ, "Namosi"),
FJ_011(Country.FJ, "Ra"),
FJ_12(Country.FJ, "Rewa"),
FJ_R(Country.FJ, "Rotuma"),
FJ_12(Country.FJ, "Serua"),
FJ_14(Country.FJ, "Tailevu"),
Many of the GH country codes that are undefined can be filled in using:
GH_AF(Country.GH, "Ahafo"),
GH_AH(Country.GH, "Ashanti"),
GH_BO(Country.GH, "Bono"),
GH_BE(Country.GH, "Bono East"),
GH_CP(Country.GH, "Central"),
GH_EP(Country.GH, "Eastern"),
GH_AA(Country.GH, "Greater Accra"),
GH_NP(Country.GH, "Northern"),
GH_NE(Country.GH, "North East"),
GH_OT(Country.GH, "Oti"),
GH_SV(Country.GH, "Savannah"),
GH_UE(Country.GH, "Upper East"),
GH_UW(Country.GH, "Upper West"),
GH_TV(Country.GH, "Volta"),
GH_WP(Country.GH, "Western"),
GH_WN(Country.GH, "Western North"),
KR has a redundant region 28, the latter (Kwangju-Kwangyokshi) doesn't seem to be an official entry:
KR_46(Country.KR, "Chollanam-do"),
KR_28(Country.KR, "Inch'on-Kwangyokhi"),
KR_42(Country.KR, "Kang-won-do"),
KR_28(Country.KR, "Kwangju-Kwangyokshi"),
KR_41(Country.KR, "Kyonggi-do"),
KR_47(Country.KR, "Kyongsangbuk-do"),
LY has a redundant region JA, Al Jafārah should be JI: Wikipedia LY
LY_BU(Country.LY, "Al Buţnān"),
LY_JA(Country.LY, "Al Jabal al Akhḑar"),
LY_JG(Country.LY, "Al Jabal al Gharbī"),
LY_JA(Country.LY, "Al Jafārah"),
LY_JU(Country.LY, "Al Jufrah"),
MK Caska should be 80, not 02
MK Radovis should be 64 (it is empty?)
MV Kaafu should be 26 not 29
MN Dzavhan should be 057 not 065
PW Sonsoral should be 370 not 350
PR has no official regional codes - probably several others are in a similar situation - for those I'd suggest just giving them numbered region codes? even if you want to be able to tell they are undefined you could use "undefXX" where XX increments or something so the region codes can still be used as keys in arrays, etc.
SI Litija should be 060 not 068
SI Tisina should be 010 not 128
TH Phetchabun should be 67 not 76
SJ may be worth a country entry? Wikipedia SJ
US is missing region code UM "Minor Outlying Islands"
All found while trying to convert the list to a set of java enums.
Hope that helps!
@benkeen Can you add git tags for versions 1.3.5 and 1.3.6? This is helpful when referencing this project in a package manager.
I could do it and put in a PR if wanted. Only thing is Im not sure where the short codes for Morocco come from. Thank you!
There are some exta space. Is it required?
{ "name":" Mişrātah", "shortCode":"MI" }
and
{ "name":" Edineț", "shortCode":"ED" }
Source. In August 2019, the Parliament of India passed an act by which Ladakh became a union territory on 31 October 2019
Hello,
You may consider listing Spanish region names at the level of "Autonomous communities" (maybe in complement of the current list), as described in this ISO page: https://en.wikipedia.org/wiki/ISO_3166-2:ES
Here is the list of regions and their codes:
{
"countryName": "Spain",
"countryShortCode": "ES",
"regions": [
{
"name": "Andalucìa",
"sc": "AN"
},
{
"name": "Aragòn",
"sc": "AR"
},
{
"name": "Asturias",
"sc": "AS"
},
{
"name": "Canarias",
"sc": "CN"
},
{
"name": "Cantabria",
"sc": "CB"
},
{
"name": "Castilla-La Mancha",
"sc": "CM"
},
{
"name": "Castilla y León",
"sc": "CL"
},
{
"name": "Cataluña",
"sc": "CT"
},
{
"name": "Ceuta",
"sc": "CE"
},
{
"name": "Extremadura",
"sc": "EX"
},
{
"name": "Galicia",
"sc": "GA"
},
{
"name": "Islas Baleares",
"sc": "IB"
},
{
"name": "La Rioja",
"sc": "RI"
},
{
"name": "Madrid",
"sc": "MD"
},
{
"name": "Melilla",
"sc": "ML"
},
{
"name": "Murcia",
"sc": "MC"
},
{
"name": "Navarra",
"sc": "NC"
},
{
"name": "País Vasco",
"sc": "PV"
},
{
"name": "Valenciana",
"sc": "VC"
}
]
}
Thanks & BR
I find that for mapping purposes I'd like to do a drilldown from continent to country to region/state. Would you be open to incorporating continent codes? (e.g., a pull request)
Update; Actually, I'm not sure what to do with Russia, Turkey, Cyprus, Georgia, Kazakhstan, Azerbaijan, Armenia that border Europe and Asia.
Any reason for not including "Svalbard and Jan Mayen" (country code SJ)?
I understand that it is basically part of Norway, but ISO-3166 does recognize it separately. Is there any reason to not have this dataset use the ISO-3166 info as it's official basis?
Uppsala, Sweden is included in the country-region-data data.json, along with 20 other Swedish regions, but for some reason it doesn't appear in the country-regions-selector under "Sweden" (the other 20 do).
Its syntax in data.json appears to be OK (pasted below). Why might this be?
{
"name": "Uppsala",
"shortCode": "C"
},
Thanks for providing this invaluable resource and cheers,
Will
In Italy there is an official 2-letter code standard to refer to states (which are provinces).
As shown here: https://github.com/woocommerce/woocommerce/blob/10f92ca09101cb119f1fe9ed37b4967b2940e17e/i18n/states.php#L703-L810
Hi
It would be really great if this data contained descriptors for the region for each country - e.g. State for USA, County for UK, Province for Canada.
Is that viable or is there another dataset somewhere that has that info?
Thanks very much
Robin
Hi!
As per request I will attach a wikipedia link of all cities in the Philippines. Kindly update the repo. Thank you very much.
https://en.wikipedia.org/wiki/List_of_cities_in_the_Philippines
The output of commonjs is in tuples and the umd output is in objects, this causes an issue when using the typings that are provided.
Is it consistent to offer the virgin islands as a region under the united states country and keep it as a separate country with its own individual regions? This could lead to data inconsistency when it comes to reporting and segmentation.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.