CartoDB / data-services

CARTO internal geocoder PostgreSQL extension
25 stars 11 forks source link

South Korea is not georeferenced in production #41

Closed iriberri closed 9 years ago

iriberri commented 10 years ago

I just tried with KR and it works, but not the complete name.

iriberri commented 9 years ago

To do: Check if it exists with the new data.

iriberri commented 9 years ago

SELECT * FROM admin0_synonyms where adm0_a3 = 'KOR'

Leads to some results but only 'S.K.' and SK are refered to South Korea.

It appears in adm0_ne_v3 while searching for 'KOR', but the South Korea name is appearing in fields: sovereignt, admin, geounit, subunit, but not in the name ones.

Do I add it as a new synonym of it should be recognized if 'South Korea' appears in the columns I mentioned?

@andrewxhill

andrewxhill commented 9 years ago

Update the synonym SQL to include it from the right columns. On Sep 8, 2014 6:27 AM, "Carla" notifications@github.com wrote:

SELECT * FROM admin0_synonyms where adm0_a3 = 'KOR'

Leads to some results but only 'S.K.' and SK are refered to South Korea.

It appears in adm0_ne_v3 while searching for 'KOR', but the South Korea name is appearing in fields: sovereignt, admin, geounit, subunit, but not in the name ones.

Do I add it as a new synonym of it should be recognized if 'South Korea' appears in the columns I mentioned?

@andrewxhill https://github.com/andrewxhill

— Reply to this email directly or view it on GitHub https://github.com/CartoDB/data-services/issues/41#issuecomment-54800262 .

iriberri commented 9 years ago

I've checked the table with this query:

SELECT subunit, name FROM ne_admin0_v3 where subunit <> name

And I confirmed all the values for subunit are different ways to write the name, so I'm adding the subunit column to the synonyms table. I'll assign a new rank for those ones.

Examples (first row is subunit, second one is name):

The Bahamas
Bahamas
Coral Sea Islands
Coral Sea Is.
South Korea
Korea
Ashmore and Cartier Islands
Ashmore and Cartier Is.
Antigua and Barbuda
Antigua and Barb.
United States of America
United States
Laos
Lao PDR
Saint Martin
St-Martin
South Sudan
S. Sudan
Bosnia and Herzegovina
Bosnia and Herz.
French Southern and Antarctic Lands
Fr. S. Antarctic Lands
Saint Barthelemy
St-Barthélemy
Ivory Coast
Côte d'Ivoire
Republic of Congo
Congo
Clipperton Island
Clipperton I.
Democratic Republic of the Congo
Dem. Rep. Congo
Cook Islands
Cook Is.
Cyprus No Mans Area
Cyprus U.N. Buffer Zone
Central African Republic
Central African Rep.
Cayman Islands
Cayman Is.
Northern Cyprus
N. Cyprus
Czech Republic
Czech Rep.
Dominican Republic
Dominican Rep.
Dhekelia Sovereign Base Area
Dhekelia
Falkland Islands
Falkland Is.
Faroe Islands
Faeroe Is.
Federated States of Micronesia
Micronesia
Equatorial Guinea
Eq. Guinea
Guinea Bissau
Guinea-Bissau
Hong Kong S.A.R.
Hong Kong
Heard Island and McDonald Islands
Heard I. and McDonald Is.
Indian Ocean Territories
Indian Ocean Ter.
British Indian Ocean Territory
Br. Indian Ocean Ter.
Baykonur Cosmodrome
Baikonur
Saint Kitts and Nevis
St. Kitts and Nevis
Macao S.A.R
Macao
Marshall Islands
Marshall Is.
Northern Mariana Islands
N. Mariana Is.
Pitcairn Islands
Pitcairn Is.
Spratly Islands
Spratly Is.
North Korea
Dem. Rep. Korea
Akrotiri Sovereign Base Area
Akrotiri
Solomon Islands
Solomon Is.
Saint Pierre and Miquelon
St. Pierre and Miquelon
French Polynesia
Fr. Polynesia
Sao Tome and Principe
São Tomé and Principe
Republic of Serbia
Serbia
Western Sahara
W. Sahara
South Georgia and South Sandwich Islands
S. Geo. and S. Sandw. Is.
Wallis and Futuna
Wallis and Futuna Is.
Turks and Caicos Islands
Turks and Caicos Is.
East Timor
Timor-Leste
Saint Vincent and the Grenadines
St. Vin. and Gren.
United States Minor Outlying Islands
U.S. Minor Outlying Is.
US Naval Base Guantanamo Bay
USNB Guantanamo Bay
British Virgin Islands
British Virgin Is.
United States Virgin Islands
U.S. Virgin Is.
iriberri commented 9 years ago

@andrewxhill

I did this commit here (still no PR): https://github.com/CartoDB/data-services/commit/82b29c1d19783fb5dda616adfbcd6bfaf933e8c9

I noticed we should change manually the admin0_synonym_additions table (https://geocoding.cartodb.com/tables/admin0_synonym_additions) and set rank = 10 for all the rows, as I added a new rank in the table above the last one. (Now manual additions would be rank = 10).

If you confirm this, I'll modify the ranks in the manual table and create the pull request.

andrewxhill commented 9 years ago

great, i've updated to be rank=10 when you are done let me know and we can rebuild the syn table (or go ahead and do it yourself)

On Tue, Sep 9, 2014 at 2:54 AM, Carla notifications@github.com wrote:

@andrewxhill https://github.com/andrewxhill

I did this commit here (still no PR):

82b29c1 https://github.com/CartoDB/data-services/commit/82b29c1d19783fb5dda616adfbcd6bfaf933e8c9

I noticed we should change manually the admin0_synonym_additions table ( https://geocoding.cartodb.com/tables/admin0_synonym_additions) and set rank = 10 for all the rows, as I added a new rank in the table above the last one. (Now manual additions would be rank = 10).

If you confirm this, I'll modify the ranks in the manual table and create the pull request.

— Reply to this email directly or view it on GitHub https://github.com/CartoDB/data-services/issues/41#issuecomment-54947741 .

andrew@vizzuality.com http://www.vizzuality.com

iriberri commented 9 years ago

@andrewxhill merge and close if :+1: :smile: https://github.com/CartoDB/data-services/pull/70