Merge pull request #113 from CartoDB/iri/updating_ranks-112

Updates docs and changes ranks
This commit is contained in:
Carla 2015-01-14 17:57:07 +02:00
commit bd21e23c97
2 changed files with 13 additions and 13 deletions

View File

@ -58,11 +58,11 @@ INSERT INTO admin0_synonym_additions (adm0_a3, name, notes, rank) VALUES ($iso3_
| 1 | natural earth 10m countries | name_alt | alternate name |
| 2 | wiki country navive names | country_endonym | local variation |
| 3 | natural earth 10m countries | adm0_a3 | 3 digit country code |
| 4 | natural earth 10m countries | abbrev | abbreviation |
| 4 | natural earth 10m countries | iso_a2 | 2 digit country code |
| 5 | natural earth 10m countries | formal_en | formal english |
| 6 | natural earth 10m countries | brk_name | ? |
| 7 | natural earth 10m countries | formal_fr | formal french |
| 8 | natural earth 10m countries | iso_a2 | 2 digit country code |
| 8 | natural earth 10m countries | abbrev | abbreviation |
| 9 | natural earth 10m countries | subunit | complete literal name |
| 10 | admin0_synonym_additions | n/a | manually curated additions |

View File

@ -46,12 +46,13 @@ SELECT
FROM
ne_admin0_v3;
-- insert abbrv as name with a rank = 4
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
SELECT
abbrev, 4, adm0_a3
-- insert iso_a2 as name with a rank = 4
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
SELECT
iso_a2, 4, adm0_a3
FROM
ne_admin0_v3;
ne_admin0_v3
WHERE iso_a2 NOT LIKE '-99';
-- insert formal_en as name with a rank = 5
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
@ -74,13 +75,12 @@ SELECT
FROM
ne_admin0_v3;
-- insert iso_a2 as name with a rank = 8
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
SELECT
iso_a2, 8, adm0_a3
-- insert abbrv as name with a rank = 8
INSERT INTO admin0_synonyms (name, rank, adm0_a3)
SELECT
abbrev, 8, adm0_a3
FROM
ne_admin0_v3
WHERE iso_a2 NOT LIKE '-99';
ne_admin0_v3;
-- insert subunit as name with a rank = 9
INSERT INTO admin0_synonyms (name, rank, adm0_a3)