question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wrong country code ISO_3 for France in naturalearth_lowres dataset

See original GitHub issue

Not sure this is the right place to mention it, but code iso_3 for France should be ‘FRA’ not -99.

    import geopandas
    path = geopandas.datasets.get_path('naturalearth_lowres')
    world = geopandas.read_file(path)
    world[world['name']=='France'].iso_a3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:19 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
tommycarstensencommented, Mar 24, 2020

I have the same issue:

The following iso_a3 codes are incorrect.

import geopandas as gpd
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world = world[(world.pop_est>0) & (world.name!="Antarctica")]
print(world[world['iso_a3'] == '-99']['name'])

21 Norway 43 France 160 N. Cyprus 167 Somaliland 174 Kosovo Name: name, dtype: object

1reaction
rraymondghcommented, Apr 21, 2022

That does not have these issues? I wouldn’t include both.

It’s all in data definition… but to your point simplest is to override for general simple use in way I have indicated.

I’d be personally fine with manual renaming to resolve the issues pointed out in this issue and document that there is this small deviation from the original data.

I’ll go ahead with this and generate a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

Country Codes - Based on ISO 3166 - GS1 US
Country Name (English) Two‑Digit Code Three‑Digit Code Numeric Code AFGHANISTAN AF AFG 004 ÅLAND ISLANDS AX ALA 248 ALBANIA AL ALB 008
Read more >
ISO 3166 — Country Codes
The International Standard for country codes and codes for their subdivisions. The purpose of ISO 3166 is to define internationally recognized codes of ......
Read more >
Country Codes - World Integrated Trade Solution (WITS)
Country Name ISO3 Code Afghanistan AFG 004 Albania ALB 008 Algeria DZA 012
Read more >
List of all countries with their 2 digit codes (ISO 3166-1) - Dataset
Country list: ISO 3166-1-alpha-2 English country names and code elements as two letter country codes. Also known as +2 country code and iso...
Read more >
countrycode: Convert Country Names and Country Codes
countrycode includes a reconciled dataset in panel format, codelist_panel. Instead of converting code, we recommend that users dealing with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found