Git Product home page Git Product logo

countries-and-provinces-states-regions's Introduction

Countries and Provinces / States / Regions

Data files listing Countries and their related Provinces/States/Regions.

Not all countries have a province file yet, those that do have a filename attribute in countries.json.

I created this project to help with populating HTML form fields, but it had a wide range of possible uses. Pull requests are welcome!

Sources

Credits

Thanks to Keeguon, easydigitaldownloads and the internets!

countries-and-provinces-states-regions's People

Contributors

astockwell avatar astockwell-ps avatar sijojlouis avatar spaceribs avatar three-fourteen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

countries-and-provinces-states-regions's Issues

Missing continents

Hi, I've cloned your repository and added these continents to my version of the countries.json file. Just sharing in case it's of use to you:

@@ -7,6 +7,7 @@
},
{
"name": "Åland Islands",
"continent": "Europe",
"code": "AX"
},
{
@@ -45,6 +46,7 @@
},
{
"name": "Antarctica",
"continent": "Antarctica",
"code": "AQ"
},
{
@@ -167,6 +169,7 @@
},
{
"name": "Bouvet Island",
"continent": "Antarctica",
"code": "BV"
},
{
@@ -177,6 +180,7 @@
},
{
"name": "British Indian Ocean Territory",
"continent": "Africa",
"code": "IO"
},
{
@@ -292,6 +296,7 @@
},
{
"name": "Cook Islands",
"continent": "Oceania",
"code": "CK"
},
{
@@ -408,6 +413,7 @@
},
{
"name": "Faroe Islands",
"continent": "Europe",
"code": "FO"
},
{
@@ -440,6 +446,7 @@
},
{
"name": "French Southern Territories",
"continent": "Antarctica",
"code": "TF"
},
{
@@ -474,6 +481,7 @@
},
{
"name": "Gibraltar",
"continent": "Europe",
"code": "GI"
},
{
@@ -512,6 +520,7 @@
},
{
"name": "Guernsey",
"continent": "Europe",
"code": "GG"
},
{
@@ -540,6 +549,7 @@
},
{
"name": "Heard Island and Mcdonald Islands",
"continent": "Oceania",
"code": "HM"
},
{
@@ -603,6 +613,7 @@
},
{
"name": "Isle of Man",
"continent": "Europe",
"code": "IM"
},
{
@@ -631,6 +642,7 @@
},
{
"name": "Jersey",
"continent": "Europe",
"code": "JE"
},
{
@@ -929,6 +941,7 @@
},
{
"name": "Niue",
"continent": "Oceania",
"code": "NU"
},
{
@@ -938,6 +951,7 @@
},
{
"name": "Northern Mariana Islands",
"continent": "Oceania",
"code": "MP"
},
{
@@ -1002,6 +1016,7 @@
},
{
"name": "Pitcairn",
"continent": "Oceania",
"code": "PN"
},
{
@@ -1205,6 +1220,7 @@
},
{
"name": "Svalbard and Jan Mayen",
"continent": "Europe",
"code": "SJ"
},
{
@@ -1269,6 +1285,7 @@
},
{
"name": "Tokelau",
"continent": "Oceania",
"code": "TK"
},
{
@@ -1390,10 +1407,12 @@
},
{
"name": "Wallis and Futuna",
"continent": "Oceania",
"code": "WF"
},
{
"name": "Western Sahara",
"continent": "Africa",
"code": "EH"
},
{

lisence issue

Did you think about releasing it in LGPL or Apache license ?

Unable to parse in swift 2

I tried to parse this JSON using the following swift code but failed:

let jsonData = NSData(contentsOfFile: NSBundle.mainBundle().pathForResource("provinces", ofType: "json")!)
        if jsonData != nil {
            let json = try? NSJSONSerialization.JSONObjectWithData(jsonData!, options:NSJSONReadingOptions.AllowFragments)
            let array: Array<Dictionary<String, String>>? = json as? Array<Dictionary<String, String>>
            if array != nil {
                for dic in array! {
                     //never reaches here
                }
            } else {
                //always reaches here
                print("found nil array for province json")
            }

Since the same code is working for other JSON files, I assume there is some syntax error with respect to Swift.

project maintained?

Was wondering if this project is being maintained as I see three pull requests that appear to be outstanding.

~C

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.