South Sudan not appearing in choropleth map

I’m making some choropleth maps of national data, but I can’t seem to get South Sudan to show up. I’m using python on Windows with plotly 3.6.1. Here’s a minimal version of the code:

import pandas as pd
import plotly.express as px

# Create some data for Sudan, South Sudan, and the DRC
country_data = pd.DataFrame({'code':['SDN','SSD','COD'],'value':[10,20,30]})

# Make a map
fig = px.choropleth(country_data,
                    color      = "value",
                    locations  = "code")

# Save the map
fig.write_image("map_test.png")

That code should plot values for Sudan, South Sudan, and the DRC. The other two countries show up, but South Sudan is missing. I’m using the ISO-3 codes from the UN (UNSD — Methodology), and they work fine in leaflet. Any idea what the problem might be? Thanks!

Hi @Michael_Erb
I thought this issues was fixed with Plotly.js 3.1.0 when we migrated to using UN GeoJSON data.

Can you show a screenshot of what your Choropleth looks like?

I’ve pasted the plot below. South Sudan should show up between the other two nations, with a value of 20. When I use my full dataset, I believe that South Sudan is the only country missing.

1 Like

@Michael_Erb could you please confirm that you’re using plotly.py v3.6.1? Also, could you please post a list of the packages you have installed for this example with pip list?

1 Like

Well, now I’m confused about versioning. While experimenting, I ended up reinstalling Spyder. I initially installed plotly 6.4.0, which seems to be the newest version. It resulted in the same plot as the one shown above. If I downgrade to plotly 5.24.1, South Sudan appears and everything seems to work fine. I’ve copied the output from my “pip list” for the working version. To get the non-working version, replace plotly 5.24.1 with plotly 6.4.0.


Package                       Version
----------------------------- --------------
aiohappyeyeballs              2.6.1
aiohttp                       3.12.15
aiosignal                     1.4.0
alabaster                     1.0.0
arrow                         1.3.0
astroid                       3.3.11
asttokens                     3.0.0
asyncssh                      2.21.1
atomicwrites                  1.4.1
attrs                         25.3.0
autopep8                      2.0.4
babel                         2.17.0
backports.tarfile             1.2.0
bcrypt                        5.0.0
beautifulsoup4                4.14.2
binaryornot                   0.4.4
black                         25.1.0
bleach                        6.2.0
Brotli                        1.1.0
cattrs                        25.2.0
certifi                       2025.10.5
cffi                          2.0.0
chardet                       5.2.0
charset-normalizer            3.4.3
click                         8.3.0
cloudpickle                   3.1.1
colorama                      0.4.6
comm                          0.2.3
contourpy                     1.3.3
cookiecutter                  2.6.0
cryptography                  45.0.7
cycler                        0.12.1
Cython                        3.1.4
debugpy                       1.8.17
decorator                     5.2.1
defusedxml                    0.7.1
Deprecated                    1.2.18
diff-match-patch              20241021
dill                          0.4.0
docstring-to-markdown         0.17
docutils                      0.21.2
et_xmlfile                    2.0.0
exceptiongroup                1.3.0
executing                     2.2.1
fastjsonschema                2.21.2
flake8                        7.1.2
fonttools                     4.60.1
frozenlist                    1.7.0
gssapi                        1.10.0
h2                            4.3.0
hpack                         4.1.0
hyperframe                    6.1.0
idna                          3.10
imagesize                     1.4.1
importlib_metadata            8.7.0
importlib_resources           6.5.2
inflection                    0.5.1
intervaltree                  3.1.0
ipykernel                     6.30.1
ipython                       9.6.0
ipython_pygments_lexers       1.1.1
isort                         6.1.0
jaraco.classes                3.4.0
jaraco.context                6.0.1
jaraco.functools              4.3.0
jedi                          0.19.2
jellyfish                     1.1.3
Jinja2                        3.1.6
jsonschema                    4.25.1
jsonschema-specifications     2025.9.1
jupyter_client                8.6.3
jupyter_core                  5.8.1
jupyterlab_pygments           0.3.0
keyring                       25.6.0
kiwisolver                    1.4.9
lsprotocol                    2025.0.0
markdown-it-py                4.0.0
MarkupSafe                    3.0.3
matplotlib                    3.10.6
matplotlib-inline             0.1.7
mccabe                        0.7.0
mdurl                         0.1.2
mistune                       3.1.4
more-itertools                10.8.0
mpmath                        1.3.0
multidict                     6.6.3
munkres                       1.1.4
mypy_extensions               1.1.0
narwhals                      2.10.2
nbclient                      0.10.2
nbconvert                     7.16.6
nbformat                      5.10.4
nest_asyncio                  1.6.0
numpy                         2.3.3
numpydoc                      1.9.0
openpyxl                      3.1.5
packaging                     25.0
pandas                        2.3.3
pandocfilters                 1.5.0
parso                         0.8.5
pathspec                      0.12.1
pexpect                       4.9.0
pickleshare                   0.7.5
pillow                        11.3.0
pip                           25.2
platformdirs                  4.4.0
plotly                        5.24.1
pluggy                        1.6.0
ply                           3.11
prompt_toolkit                3.0.52
propcache                     0.3.1
psutil                        7.1.0
ptyprocess                    0.7.0
pure_eval                     0.2.3
pycodestyle                   2.12.1
pyconify                      0.2.1
pycparser                     2.22
pydocstyle                    6.3.0
pyflakes                      3.2.0
PyGithub                      2.8.1
Pygments                      2.19.2
PyJWT                         2.10.1
pylint                        3.3.8
pylint-venv                   3.0.4
pyls-spyder                   0.4.0
PyNaCl                        1.6.0
pyOpenSSL                     25.1.0
pyparsing                     3.2.5
PyQt5                         5.15.11
PyQt5_sip                     12.17.0
PyQtWebEngine                 5.15.7
PySocks                       1.7.1
python-dateutil               2.9.0.post0
python-lsp-black              2.0.0
python-lsp-jsonrpc            1.1.2
python-lsp-ruff               2.3.0
python-lsp-server             1.13.1
python-slugify                8.0.4
pytoolconfig                  1.2.5
pytz                          2025.2
pyuca                         1.2
pywin32                       311
pywin32-ctypes                0.2.3
PyYAML                        6.0.3
pyzmq                         27.1.0
QDarkStyle                    3.2.3
qstylizer                     0.2.4
QtAwesome                     1.4.0
qtconsole                     5.7.0
QtPy                          2.4.3
referencing                   0.36.2
requests                      2.32.5
rich                          14.1.0
roman-numerals-py             3.1.0
rope                          1.14.0
rpds-py                       0.27.1
rtree                         1.4.1
ruff                          0.13.2
scipy                         1.16.2
setuptools                    80.9.0
sip                           6.10.0
six                           1.17.0
snowballstemmer               3.0.1
sortedcontainers              2.4.0
soupsieve                     2.8
Sphinx                        8.2.3
sphinxcontrib-applehelp       2.0.0
sphinxcontrib-devhelp         2.0.0
sphinxcontrib-htmlhelp        2.1.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          2.0.0
sphinxcontrib-serializinghtml 1.1.10
spyder                        6.1.0
spyder-kernels                3.1.0
stack_data                    0.6.3
superqt                       0.7.6
sympy                         1.14.0
tenacity                      9.1.2
text-unidecode                1.3
textdistance                  4.6.3
three-merge                   0.1.1
tinycss2                      1.4.0
toml                          0.10.2
tomli                         2.2.1
tomlkit                       0.13.3
tornado                       6.5.2
traitlets                     5.14.3
types-python-dateutil         2.9.0.20250822
typing_extensions             4.15.0
tzdata                        2025.2
ujson                         5.11.0
unicodedata2                  16.0.0
urllib3                       2.5.0
watchdog                      6.0.0
wcwidth                       0.2.14
webencodings                  0.5.1
whatthepatch                  1.0.7
wheel                         0.45.1
win_inet_pton                 1.1.0
wrapt                         1.17.3
yapf                          0.43.0
yarl                          1.20.1
zipp                          3.23.0
zstandard                     0.25.0

Note: This older version of plotly had an issue with the “write_image” command, so I used to the command below instead:

fig.write_html("map_test.html",include_plotlyjs='cdn')

I just installed everything from your list (minus the Windows specific ones) and ran the example in the OP and this was the result. What version of Python are you using? I’m using 3.12.11. Also, when you open the resulting html file, what calls do you see in the Network tab in DevTools?