Skip to content

Commit da96817

Browse files
committed
1.3.0
1 parent dc4ba61 commit da96817

File tree

5 files changed

+577
-551
lines changed

5 files changed

+577
-551
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea*
2+
.idea/*
3+
node_modules*

README.md

100644100755
Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
[![Build Status](https://travis-ci.org/benkeen/country-region-data.svg?branch=master)](https://travis-ci.org/benkeen/country-region-data)
44

5-
### About
5+
This repo contains a static JSON file of country names, country short codes, country regions, and country region short
6+
codes. All country names and short codes are guaranteed to be unique. Similarly, all regions and region short
7+
codes *within a single country* are guaranteed to be unique.
68

7-
This repo contain the source data for the [country-region-selector](https://github.com/benkeen/country-region-selector)
8-
script. As I plan on creating multiple versions of this script (React, Polymer, X-Tags, etc), I've moved the source
9-
data here so that each of the repos can pull from the single source.
9+
I created this repo to house the raw data used for the [country-region-selector](https://github.com/benkeen/country-region-selector),
10+
[react-country-region-selector](https://github.com/benkeen/react-country-region-selector) scripts. I didn't want to
11+
duplicate it in multiple places and hey, seems like this it could be useful to people as a standalone.
1012

11-
See the `data.json` file for the data. It's of the form:
13+
See the `data.json` file for the data. The JSON is of the form:
1214

1315
```javascript
1416
[
@@ -29,19 +31,43 @@ See the `data.json` file for the data. It's of the form:
2931

3032
### Contribute
3133

32-
The state/prov abbreviations are not yet complete, so pull requests welcome! For more information, see:
33-
https://github.com/benkeen/country-region-selector/issues/2#issuecomment-98549680
34+
The state/prov abbreviations are not yet complete, so pull requests welcome! Regions that need ISO3166-2 codes can
35+
be identified by having a missing `shortCode` property for each region. You can find them by cloning the repo, then
36+
running:
37+
38+
```
39+
npm install
40+
grunt findIncomplete
41+
```
42+
43+
That'll list all countries with regions that are missing region short codes. Wikipedia has a lot of the data listed here:
44+
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
3445

35-
Regions that need ISO3166-2 codes can be identified by having a missing `shortCode` property for each region.
3646

37-
Before contributing a PR, you might want to validate the JSON content. To do that, do the following on your command line:
47+
### Data Validation
48+
49+
Before contributing a PR, please validate the JSON content (if you don't, Travis will catch it for you!). To do that,
50+
run the following on your command line:
3851

3952
```
4053
npm install
4154
grunt validate
4255
```
4356

44-
That'll throw an error if the JSON is invalid.
57+
That'll throw an error if the JSON is invalid or if some duplicate names were accidentally introduced. The error messages
58+
are pretty clear, I think.
59+
60+
61+
### Changelog
62+
63+
- `1.3.0` - July 1, 2016. Improved validation added to ensure uniqueness of country names, short codes, region names and
64+
shortcodes. Various country region additions / updates.
65+
- `1.2.1` - Jun 7, 2016. Taiwan country name change. Travis build status added + basic JSON syntax validation.
66+
- `1.2.0` - May 14, 2015. Lots more region short codes (again, thanks Ellen!). JSON syntax fixes.
67+
- `1.1.1` - April 30, 2016. JSON syntax fixes.
68+
- `1.1.0` - April 30, 2016. Looooads of new region shortcodes added thanks to [ellenhutchings](https://github.com/ellenhutchings). Thanks, Ellen!
69+
- `1.0.0` - April 29, 2016. initial version
70+
4571

4672
### License
4773

0 commit comments

Comments
 (0)