everypolitician / viewer-sinatra

Sinatra app for (pre)viewing EveryPolitician website dynamically
http://everypolitician.org/
5 stars 5 forks source link

Keep world.json current with data repo #12572

Open wfdd opened 8 years ago

wfdd commented 8 years ago

world.json has 'Cape Verde' and the data repo 'Cabo Verde', meaning the former's shown in the country selection dropdown and the latter is displayed on country and legislature pages. There might be others, or maybe not.

tmtmtmtm commented 8 years ago

See also https://github.com/everypolitician/viewer-sinatra/issues/771

wfdd commented 8 years ago

For reference:

In [9]: %paste
for k, v in world.items():
    try:
      countries__country = next(i for i in countries if i['slug'].lower() == k)
    except StopIteration:
      print('No match found for ' + k)
      continue
    if countries__country['name'] != v['displayName']:
        print(k, v['displayName'], countries__country['name'])
## -- End pasted text --
cabo-verde Cape Verde Cabo Verde
congo-kinshasa Congo-Kinshasa (Democratic Republic) Congo-Kinshasa (DRC)
No match found for tokelau
ivory-coast Côte D'Ivoire Côte d'Ivoire
No match found for eritrea
No match found for sahrawi-arab-democratic-republic
No match found for palestine
timor-leste Timor-Leste Timor Leste
No match found for equatorial-guinea
No match found for qatar
No match found for guinea
pitcairn Pitcairn Islands Pitcairn
No match found for central-african-republic
No match found for sao-tome-and-principe
us-virgin-islands U.S. Virgin Islands US Virgin Islands
No match found for cuba
aland Åland Islands Åland
No match found for sudan
No match found for ethiopia
congo-brazzaville Congo-Brazzaville (Republic) Congo-Brazzaville