CartoDB / data-services

CARTO internal geocoder PostgreSQL extension
25 stars 11 forks source link

South Sudan iso3 code is wrong #233

Closed ethervoid closed 6 years ago

ethervoid commented 6 years ago

We have SDS when is SSD

This comes from our table

          name           | rank |          created_at           |          updated_at           | the_geom | the_geom_webmercator | cartodb_id | adm0_a3 |        name_         
-------------------------+------+-------------------------------+-------------------------------+----------+----------------------+------------+---------+----------------------
 S. Sudan                |    0 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      41628 | SDS     | ssudan
 SSD                     |    0 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      41871 | SDS     | ssd
 SDS                     |    3 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      42074 | SDS     | sds
 SS                      |    4 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      42487 | SDS     | ss
 Republic of South Sudan |    5 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      42590 | SDS     | republicofsouthsudan
 S. Sud.                 |    8 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      43391 | SDS     | ssud
 South Sudan             |    9 | 2015-11-04 17:17:40.882056+00 | 2015-11-04 17:17:40.882056+00 |          |                      |      43658 | SDS     | southsudan
(7 rows)

And if you check in wikipedia for the iso3166-1 you can see is SSD

javitonino commented 6 years ago

Seems like a job for the superheroes at RT cc @ramiroaznar

ethervoid commented 6 years ago

I've checked a bit. South Sudan is a relative new Country and its ISO code is not the same for every country so we should take the iso one which is SSD

You can check the different names importing and looking at the natural earth dataset

Tha real problem is that in the build_synonym_table.sql we're not picking the iso codes

AleGoiko commented 6 years ago

I have commented where this stands on this pr

amartinj commented 6 years ago

We have two fixes for this issue:

  1. This PR, where the table is 'fixed', but we are not suer if it's correct since there are many differences compared to the one we are currently using
  2. This other PR where we simply fix the table and add iso codes for South Sudan

We are going to use the second one since is the less invasive one. First one will remain as documentation and as base for future fixes

ramiroaznar commented 6 years ago

Let me know if you need acceptance! :-)

amartinj commented 6 years ago

done and deployed

joehonton commented 1 year ago

Version 5.1.1 ne_10m_admin_0_countries still has many columns with the incorrect "SDS", but also has many columns with the correct value "SSD".

(All of the ADM0A3* columns are still SDS.)

It's hard for me to know if this is by design or if it's a problem, since I don't know what those others columns mean.