Comments (120)
GeoJSON outlines of the countries: https://github.com/datasets/geo-boundaries-world-110m
from countries.
Not exactly contributing to this issue, the feature list or the roadmap, but I simply wanted to express my deepest thanks for putting this awesome list up on the web. I've been searching for it for over 2 years, and a simple though epicly effective Google search turned this page up.
Thank you for your amazing for and this amazing list of countries!
from countries.
Hello,
About adding the cities, you can maybe see what the Eurostat is doing : http://ec.europa.eu/eurostat/web/nuts/overview
from countries.
Add a format: SQL (for main AND data)
I have done it for the main (1st draft of the data attached to this comment)
I will work on the by country files to turn them into SQL too.
from countries.
Hello! I think adding emoji for country flag will be nice. You can find emoji of flags here: http://emojiflags.com/
from countries.
It might be useful to provide the country name in the native language of the country itself (e.g. {"name": "Germany", "name_native": "Deutschland"}
...
from countries.
The CLDR database of the unicode project contains Country-To-Language data, including the percent of speakers: http://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
from countries.
It might be useful to provide the country name in the native language of the country itself
The native name of Germany is already in 'alt-spellings'. I recognize that the name 'alt-spellings' isn't good since it contains alternative spellings and the native name of the country. So there are two solutions here:
- either we change 'alt-spellings' to 'alt-names' and keep the native name here
- or we keep 'alt-spellings' just for alternative spellings and create 'name-native' as you suggested.
Initially, I created this dataset with a country selector in mind [1] but it would make more sense to be able to get the native names separately. So I would choose the second option.
But the second option raises the question of how to write the native name of the country. German uses latin characters so it's easy to know that it's Germany, but what about Armenia for example which is written Հայաստան in armenian [2]? For some people it might be difficult to know that it's Armenia.
What do you think?
I know that alternative spellings and native names are missing for many countries, I'm currently working on adding them. Also, I'll add the native/official language(s) of each country.
[1] https://github.com/JamieAppleseed/selectToAutocomplete
[2] http://en.wikipedia.org/wiki/Armenia
from countries.
Not all people speak English, so they might be confused while selecting their locale. It might be useful if it is possible to see the English and native version of the country name parallel in the selector.
I would recommend to provide both versions for different individual usecases.
from countries.
Right, it's valid for non english speakers.
If you want, feel free to start working on adding the native names as I'll be off for a few days.
from countries.
I think it would be great to have a way to make Countries Hierarchical and have meta data describing whether they are countries or sovereign states.
For the UK currently it says "alt-spellings":"GB,Great Britain,England,UK,Wales,Scotland,Northern Ireland".
The full name of the UK is "The United Kingdom of Great Britain and Northern Ireland". It is not a country, it is a sovereign state.
Great Britain also isn't a country, it's an island.
There are three countries in Great Britain: England, Scotland and Wales.
So the types I think needed are: Country, State, Sovereign State and potentially Nation and Union as well.
Then it would be good to have a way to specify that England is within the UK and if you also have unions that it is within the EU.
Another nice feature would be to list what land borders a country has. So you could specify that England borders Scotland and Wales for example.
from countries.
From https://github.com/ProGNOMmers
It would be wonderful if it would be possible to retrieve regions, provinces and cities.
Something like:
// Regions of country
// /rest/alpha2/it/regions ->
{ regions: [ "Abruzzi e Molise",
"Basilicata",
"Calabria",
"Campania",
"Emilia-Romagna",
"Friuli-Venezia Giulia",
"Lazio",
"Liguria",
"Lombardia",
"Marche",
"Piemonte",
"Puglia",
"Sardegna",
"Sicilia",
"Toscana",
"Trentino-Alto Adige",
"Umbria",
"Valle d'Aosta",
"Veneto" ] }
// Provinces of region
// /rest/alpha2/it/regions/Veneto/provinces ->
{ provinces: [ "Verona", "Venezia", ... ] }
// Cities of province
// /rest/alpha2/it/regions/Veneto/provinces/Venezia/cities ->
{ cities: [ { name: "Venezia", zip_codes: [ "30121", ... , "30176" ] },
{ name: "Chioggia", zip_codes: [ "30015" ] },
{ name: "San Donà di Piave", zip_codes: [ "30027" ] },
... ] }
// Cities of country by name
// /rest/alpha2/it/regions/Veneto/provinces/Venezia/cities ->
{ cities: [ { name: "Venezia", zip_codes: [ "30121", ... , "30176" ] },
{ name: "Chioggia", zip_codes: [ "30015" ] },
{ name: "San Donà di Piave", zip_codes: [ "30027" ] },
... ] }
Cities could have metadata like f.i. zip codes, which are very useful.
It is a huge work because recording and maintaining the whole list of regions, provinces and cities for every world country is hard, but it is a good target to be accomplished by an open source project.
from countries.
I think it would be great to have a way to make Countries Hierarchical and have meta data describing whether they are countries or sovereign states.
I agree, I'll add this to the todo. I know that many entries in the dataset are not actual contries. I wanted to provide simple and factual data about world countries but I understand that more accuracy is needed.
from countries.
It would be wonderful if it would be possible to retrieve regions, provinces and cities.
Yes it is a huge work. First I want to continue to add more data at the country level (native and official names, official language, etc.) and add the master file as soon as possible (#12) to ease the contributions.
Thank you for your help/feedback, I appreciate it!
from countries.
For the UK currently it says "alt-spellings":"GB,Great Britain,England,UK,Wales,Scotland,Northern Ireland".
@stephenpaulger in bd22b4a I have removed most of the names in altSpellings
, now it's just GB,UK,Great Britain
.
from countries.
We can also add time zone data from http://timezonedb.com/download.
from countries.
It would be really nice if there would be also a list of states per country such as the United States states. http://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States
from countries.
@shanti2530 yes, this has been suggested #6 (comment) but it has not been done yet because the work is pretty huge.
Do you know a source where we can find the states for every country?
from countries.
@mledoze don't know if this is what you were looking for http://vikku.info/programming/geodata/geonames-get-country-state-city-hierarchy.htm
from countries.
@shanti2530 this seems very good, thank you. I'll create an issue for this. Would you like to work on this?
from countries.
@gerbenjacobs yes good idea, I'll add this to the to-do
from countries.
I agree for the gerbenjacobs idea of GeoJSON outlines of the countries
from countries.
@mledoze don't know if it's in the scope of this project, but I would love to see financial information like GDP, GDP per capita, GNI etc. - problem with this is of course that these numbers would change every year.
from countries.
@matiassingers no it's not really in the scope of this project. I prefer to stick with static data that do not change. The dataset currently contains population data which are not in the scope and I would like to remove it in the near future.
Although it does not currently contains GDP data, you should check this project https://github.com/tinata/tinatapi which contains other financial data.
from countries.
@dalu the postal prefixes is a good idea!
from countries.
@dalu you are saying that postal services want the native country name instead of the country postal prefix?
from countries.
I would like to inform you that I am about to remove population data because they require frequent updates to stay relevant.
I recently added CONTRIBUTING explaining the contributions rules of this project. Population data do not follow these instructions.
from countries.
acknowledged
from countries.
How about the address format, from the page mentioned above: http://en.wikipedia.org/wiki/Address_(geography)
This may be fairly difficult to do as it requires some pseudo templating language, so say for US:
"addressFormat": "{{name}}\n{{houseNumber}} {{street}}\n{{locality}}\n{{city}}\n{{postalCode}}"
And would need agreement on the labels used...
from countries.
Hi, nice project! Thanks.
Something that would be useful to me is to know if a country is in the European Union.
(https://en.wikipedia.org/wiki/Member_state_of_the_European_Union)
This information is needed when you are a company in the EU dealing with international customers. If you charge VAT or not depends on whether your customer is in the EU or not.
If you are interested in including this information I could setup a pull-request
from countries.
@tdegrunt yes it is indeed a difficult task to do, but @hexorx managed to do it in his countries
repository: https://github.com/hexorx/countries/blob/master/lib/data/countries.yaml
from countries.
@0x01 yes I'm interested in including this information. Could you please add it as extra data in the data
folder using [cca3].json
file names?
Thank you!
from countries.
@mledoze: I can do that (in data
folder), but I think it makes more sense to put it into the main file. There is very little data added, basically a boolean whether or not it's an EU member state (and I'll leave out the field if it's false)
from countries.
@0x01 you are right that this represent little data but it would be useful for only 10% of the countries (26 member state of the EU out of 251 "countries" in the dataset).
Moreover, the EU is categorized as a supranational union and it exists many other unions in the world (see [1]), so as not to add many booleans in the main file, I prefer to add this data in separate files.
[1] http://en.wikipedia.org/wiki/Political_union#Supranational_and_continental_unions
from countries.
Hm, true. I redraw my offer for a pull request, as this EU membership is much more subtle indeed. Should I ever need to sort this out properly I'll come back with a pull request, but for now a simple list of country names is enough to get some rough indication. Which is good enough for my purposes. For example, this code in node does the trick
var rawCountries = require('countries.json');
var EU = [
"Austria", "Belgium", "Bulgaria", "Croatia", "Cyprus",
"Czech Republic", "Denmark", "Estonia", "Finland", "France", "Germany",
"Greece", "Hungary", "Ireland", "Italy", "Latvia", "Lithuania",
"Luxembourg", "Malta", "Netherlands", "Poland", "Portugal",
"Romania", "Slovakia", "Slovenia", "Spain", "Sweden", "United Kingdom"
];
var countries = rawCountries.map(function(country){
return { // for example
code: country.cca3,
name: country.name
eu_member: _(EU).contains(country.name)
}
});
from countries.
I'd add coastline length (CIA factbook field 2060).
from countries.
How about population??
from countries.
@herrniemand population data was already added to this dataset (81fa9f6) but later removed (see #6 (comment)).
from countries.
I've seen you were discussing official names, and I got an idea:
{
"name": {
"common": "Afghanistan",
"native": "\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",
"official": "Islamic Republic of Afghanistan"
}
}
otherwise there to many "name%insert type here%"
from countries.
@herrniemand this is a very good idea. I also want to add the official name in its native language, so we could have something like this:
{
"name": {
"common": "Afghanistan",
"official": "Islamic Republic of Afghanistan",
"native": {
"common" : "\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",
"official": "\u062f \u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u064a \u062c\u0645\u0647\u0648\u0631\u06cc\u062a"
}
}
}
What do you think?
from countries.
@mledoze Yea. Awesome.
from countries.
@mledoze how about translations? I was thinking something like:
{
"name": {
"common": "Afghanistan",
"official": "Islamic Republic of Afghanistan",
"native": {
"common" : "\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",
"official": "\u062f \u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u064a \u062c\u0645\u0647\u0648\u0631\u06cc\u062a"
},
"translations":{
"ru":...,
"de":...
}
}
}
or should we keep as it is?
from countries.
@herrniemand I prefer to keep the translations as it is for now.
from countries.
@mledoze ok.
from countries.
@mledoze. I've just stuck on a problem with native names. Some countries like Afghanistan and Åland Islands have more then one official language, so what do we define as native
?
from countries.
@herrniemand for countries with more than one official language, you should use the language that is listed first in the language
property. So for Afghanistan and Åland Islands, it is Pashto and Swedish respectively.
from countries.
@mledoze ok. Thanks.
from countries.
@mledoze Question about translations. What is the list of the languages we want country names would be translated? I suggest UN(7) official + first 15 from most speaking: https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers
from countries.
@mledoze Another thing. Since we are changed structure of the language block, wouldn't it be correct to change translations to the same style:
"translations":{
"de": {
"common":"Russland",
"official":"Russische Föderation"
}...
}
?
from countries.
@ReSpawN you're very welcome, thank you for your comment, I really appreciate it! This work would not be as it is now without the help of all the contributors.
If you do something with this dataset, don't hesitate to add it the the showcase list in the readme.
from countries.
A variable saying if the country is a landlocked country or not
http://en.wikipedia.org/wiki/Landlocked_country
from countries.
+1 for @romsson's idea.
from countries.
+1 @romsson's idea *)
from countries.
@romsson that's ok for me! Would you like to do this?
from countries.
I'll do it! Happy to contribute this this super useful project @mledoze
from countries.
For future contributions regarding country name translations, I found this CSV [1] which might help.
[1] http://jonahellison.com/21640-translated-country-names-unicode-csv
from countries.
@mledoze I think we need to update translations objects according to the "name" object.
"translations":{
"de": {
"common":"Russland",
"official":"Russische Föderation"
}...
}
from countries.
@herrniemand I'm ok with this change, although I'm reserved about the increased size of countries.json
.
from countries.
I would like to know whether a country is in the European Union. Is that something suitable for this project to include for every country?
from countries.
I would like to know whether a country is in the European Union. Is that something suitable for this project to include for every country?
This has been asked here before (#6 (comment)) and answered (#6 (comment)). Unfortunately, this is not suitable to include in this project.
Though, thank you for asking!
from countries.
@mledoze I kept translation in one line to keep it smaller.
from countries.
I kept translation in one line to keep it smaller.
@herrniemand I saw it, very good.
from countries.
Yay 😄 I just got this short URL http://git.io/countries for this project!
from countries.
Sweet! 👯
from countries.
@mledoze YAY!!!!!!!!!XD
from countries.
I strongly would advise the addition of provinces and major cities. There already exist few packages in Github, with limited range of countries of course, such as:
https://github.com/astockwell/countries-and-provinces-states-regions
https://github.com/substack/provinces
If licenses are compatible, they could be included within this package with due credits wherever applicable.
from countries.
@shehi #40 is the discussion about that. And @fayder proposed here(comment) the structure.
from countries.
@mledoze I just posted it on echojs... and it gone... XD
from countries.
@herrniemand yay thank you:) http://www.echojs.com/news/13325
from countries.
@mledoze XD Thank you dude! Bloody brilliant project! XD
from countries.
Yesterday was a good day, look at the stats:
from countries.
@mledoze its maintainers only view *( Send screenshot.
from countries.
@mledoze Nice! *)
from countries.
Add sea borders
from countries.
Hi, super useful project!
Thanks for maintaining it.
I'm aware that population data were added it, then, were removed on:
@herrniemand population data was already added to this dataset (81fa9f6) but later removed (see #6 (comment)).
But, What about include population historical data only?
Like this:
"name": {
"common": "Costa Rica",
"official": "Republic of Costa Rica",
"native": {
"spa": {
"official": "Rep\u00fablica de Costa Rica",
"common": "Costa Rica"
}
}
},
.
.
.
"population": {
"2013": { "unit": "million", "amount":"4.872" },
"2012": { "unit": "million", "amount":"4.805" },
"2011": { "unit": "million", "amount":"4.738" },
"2010": { "unit": "million", "amount":"4.67" },
}
}
And we can get another interesting historical info for each country from google like:
- Life expectancy
- GDP per capita
- Fertility rate
Same pattern
"lifeExpectancy": {
"2012": { "unit": "year", "amount":"79.7" },
"2011": { "unit": "year", "amount":"79.49" },
"2010": { "unit": "year", "amount":"79.28" },
}
What do you think?
I would be glad to help with this
Regards
from countries.
Hello @cumanacr, thank you for your comment but unfortunately this project does not contains historical data. One good candidate for this kind of data would be the tinata project, you could ask there.
from countries.
@mledoze thanks, but no thanks, I like this project 😃
Maybe a separate file like #40 proposes for the country regions but on historical data, eg:
- cri.historicaldata.json
- cri.hdata.json
- cri.hd.json
This way, countries.json keeps small.
maybe something like that, is better?
Regards
from countries.
Multiple Capitals.
from countries.
We have just the list of languages. How about adding official languages? For example, India has too many languages and there are around 15+ official languges out of all.
from countries.
@Purus the languages
property already contains the list of official languages for each country (see README). I know that there are some countries with many recognised regional languages, I would prefer no to take them into account as it would make the dataset too big.
from countries.
How about adding the currencies names?
e.g.
"currencies" : {
"eur" : "Euro",
"mxn" : "Peso"
}
from countries.
@thefabulousdev For me, that's something that's better solved by cross-reference to a dedicated data-set. Something like this for example.
from countries.
@petert82 agree
from countries.
can you add language direction? ltr and rtl ?
from countries.
can you add language direction? ltr and rtl ?
from countries.
Hey,
would you be interested to add Polish translation?
I could prepare commit with data from this list.
from countries.
We can. But not using that list. It is mixed up. There no distinction
between official name and common name, such as
- Rosya(Russia) - common
- Republika Południowej Afryki(Republic of South Africa) - official
2015-08-21 12:26 GMT+12:00 Marek Skiba [email protected]:
Hey,
would you be interested to add Polish translation?
I could prepare commit with data from this list
https://gist.github.com/lukaszfiszer/7185871.—
Reply to this email directly or view it on GitHub
#6 (comment).
from countries.
would you be interested to add Polish translation?
That could be a good addition, but @herrniemand is right we will need both common and official names.
from countries.
I would like to have the ISO639-1 code (de for Austria) in the list.
from countries.
Lovely. I would have used it if it has timezone in it.
from countries.
@jhourlad please read this thread #106 to see why timezones were not added in this project.
from countries.
Looking https://en.wikipedia.org/wiki/Continent there is no "Oceania" continent. The JSON label says region which makes sense to call the proximate islands of Australia Oceania though its not really a continent (depending who you ask).
Would it make sense to add a continent field according to one or more of the existing continent models?
cheers
from countries.
As mentioned by others, it would be useful to be able to know if a country is within the EU.
https://en.wikipedia.org/wiki/Member_state_of_the_European_Union
from countries.
Hello @olimortimer, yes this has been asked before by others, but unfortunately, this kind of data does not suit this project.
Please see this comment #6 (comment).
from countries.
@maquejp Countries project ideology is KISS. Adding cities would majorly increase the size of the project, and would not serve according value. So I personally vote not on that idea.
About SQL DUMP: I don't see much of an issue to write a script that loads json into DB. There are far more then enough solutions online/stackoverflow. As addition it is a major security risk, to just load random sql dumps into databases. So I vote no on that one as well.
from countries.
What about the past? In using countries.json to analyse past pieces of text, I found "soviet" was not identified. Would adding a historical extension of the data with applicable dates be achievable in the long term?
from countries.
@cmacdonald Countries project goal is to provide basic information about current de-jure political state of the world. We provide basic, static information.
History will never be part of this project as it is contradicts the goal of this project to provide basic and static information, and due to single case use limitation.
from countries.
Hello @cmacdonald, I'm sorry but historical data are out of scope for this project.
from countries.
If someone is searching for a country list with info if the country is in the EU: Here's a short script to append the info to the country list.
https://gist.github.com/Bartinger/f0507c786bad45cc942de471b1427e48
from countries.
@Bartinger thank you for that! :)
from countries.
Related Issues (20)
- When customising the output the field "callingCodes" is excluded HOT 4
- Barbedos missing HOT 1
- 4.1.0 on npm HOT 4
- New release HOT 6
- ERROR: Package path ./data is not exported from package HOT 3
- Warning when using npm package HOT 9
- Error when yarn build HOT 4
- Fix the number of columns in CSV export
- a TypeScript syntax issue in the world-countries package HOT 2
- export { default } from './countries.json' assert { type: 'json' }; HOT 4
- 'convert -i name' instead of '-i=name' in README.md HOT 1
- Some nationality/demonym spellings do not match with UK government's ones
- Important Improvements HOT 2
- Add EEA (European Economic Area) countries
- Add Chinese Taipei flag
- Add cities
- Turkey country name changed to Türkiye HOT 1
- How to access state of certain country?
- Kazakhstan Capital renamed back to Astana as of September 2022 HOT 1
- Kosovo is missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from countries.