i-rocky/country-list-js

Json hasn't all states for countries

matosovaolga opened this issue · 15 comments

Json hasn't all states for countries

What exactly are you looking for?

screenshot_2

ekkis commented

it would be useful also to have a Region... e.g. Sweden = Scandinavia, France = Continental Europe, Poland = Eastern Europe

ekkis commented

I'd be happy to code it up if you'll accept it

ekkis commented

I know what Olga is asking for here: a list of the 50 states in the US... this is an interesting endeavour and of largish scope because it means listing prefectures in Japan, Oblasts in Russia, Territories in Austrialia... which also begs the question of how far down to go. there are provinces within regions, states within territories etc

would you be interested in collaborating on this? I've wanted to implement a solution for this for rather a while. it also comes with a nomenclatures issue, what you call these political subdivisions

ekkis commented

I've posted a pull request for a first-pass implementation at regions. states are more difficult. I will attempt at some later point

ekkis commented

I should also mention that the CIA also has its own classification of world regions but that would be additional work

ekkis commented

I've made the enhancement (added provinces) but I've also broken the API. if you care to merge, have a look at what I've done (currently published on NPM as ekkis-country-list-js):

https://github.com/ekkis/country-list-js

Sorry I haven't been able to reply. I'm catching up a deadline, and the deadline is today.
I'll try merging tomorrow.

I wish I could clean my codes like you did.

ekkis commented

oh. that's music to my ears. I will generate a pull request. this change does represent an IBC. do you think it's worth the effort to provide backward compatibility?

Well, if we bump up a major version, we may not need back-compatibility. What do you say?

ekkis commented

that's true. the PR is ready. it needs to be merged

ekkis commented

any thought as to when you might accept the pull request? I want to pull my temporary package out of NPM

Sorry about the delay. I hurt my leg real bad, haven't been sitting on desktop unless it's urgent.
Pull request merged.

ekkis commented

sorry to hear mate. take good care of it and thanks for the merge