-
Notifications
You must be signed in to change notification settings - Fork 21
/
README
92 lines (72 loc) · 3.73 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
==============
ISO 3166-2
==============
The aim of this project is to create a structured data set to be used as a
foundation for the grouping of geolocational data.
Currently the set is based on ISO 3166-2 with a few notable additions that
give us some extra structure:
1 "planet" division (Earth)
7 "continent" divisions
- plus -
4888 nodes from the ISO standard (from country down to parishes)
== FORMAT ==
The data object is indexed on the CODE value and contains
code ISO 3166-2 code (UNIQUE)
name Name of the division
division Type of division (planet, continent, country etc)
parent The code of the parent division (OPTIONAL)
lat & lng The latitude and longitude of the division (OPTIONAL)
Eventually the data set will only have a single node that is missing a
parent and lat/lng pair (the top-division, Earth), for now the data set is
incomplete but updates to this data-set should easily be integrated to any
system that uses it with trivial parsing.
== SNIPPET ==
var iso_3166_2 = {
// Planet Earth
"EARTH": {"code": "EARTH", "name": "Earth", "division": "planet"},
// The 7 continents
"ASI": {"code": "ASI", "name": "Asia", "division": "continent", "parent": "EARTH"},
"AFR": {"code": "AFR", "name": "Africa", "division": "continent", "parent": "EARTH"},
"ANT": {"code": "ANT", "name": "Antarctica", "division": "continent", "parent": "EARTH"},
"AUS": {"code": "AUS", "name": "Australia", "division": "continent", "parent": "EARTH"},
"EUR": {"code": "EUR", "name": "Europe", "division": "continent", "parent": "EARTH"},
"NAM": {"code": "NAM", "name": "North America", "division": "continent", "parent": "EARTH"},
"SAM": {"code": "SAM", "name": "South America", "division": "continent", "parent": "EARTH"},
// The Countries and Divisions
"AD": {"code": "AD", "name": "Andorra", "division": "country", "lat": 42.5075314, "lng": 1.521815599999968},
"AD-07": {"code": "AD-07", "name": "Andorra la Vella", "division": "parish", "parent": "AD", "lat": 42.5075314, "lng": 1.521815599999968},
"AD-02": {"code": "AD-02", "name": "Canillo", "division": "parish", "parent": "AD", "lat": 42.5660922, "lng": 1.5967008999999734},
"AD-03": {"code": "AD-03", "name": "Encamp", "division": "parish", "parent": "AD", "lat": 42.5363306, "lng": 1.5831104999999752},
"AD-08": {"code": "AD-08", "name": "Escaldes-Engordany", "division": "parish", "parent": "AD", "lat": 42.5088914, "lng": 1.542137499999967},
"AD-04": {"code": "AD-04", "name": "La Massana", "division": "parish", "parent": "AD", "lat": 42.5449448, "lng": 1.5153695000000198},
"AD-05": {"code": "AD-05", "name": "Ordino", "division": "parish", "parent": "AD", "lat": 42.5554593, "lng": 1.533297800000014},
"AD-06": {"code": "AD-06", "name": "Sant Julià de Lòria", "division": "parish", "parent": "AD", "lat": 42.4648686, "lng": 1.4911495999999715}
};
== KNOWN ISSUES ==
Countries are not yet linked to the continents
About 800 of the divisions are missing a lat/lng pair
In order to tackle this project I'm looking to do one of 2 things:
Start a project to crowd-source these fixes
Sit down and do it myself
== NOTES ABOUT THE EARTH AND IT'S CONTINENTS ==
The continents have been given 3-letter codes to ensure that there are no
collisions with the ISO 3166-2 standard
The earth uses a 5-letter code (EARTH) for the same reason
The continents are defined as:
ASI Asia
AFR Africa
NAM North America
SAM South America
ANT Antarctica
EUR Europe
AUS Australia
== CREDITS ==
,/ \,
((__,-"""-,__))
`--)~ ~(--`
.-'( )`-,
`~~`d\ /b`~~`
\ /
(6___6)
`YYY`