Black Lives Matter. Please consider donating to Black Girls Code today.

Here is right to debug about choropleth? And I find something

Hello, My name is DOHYUN SOUNG who is living in SOUTH KOREA.
When I using pyplot expecially choropleth. on the map, South Korea and North Korea position is reversed. If you can please fix. My code is

df = pd.read_csv('2014_World_GDP')
data = dict(type = 'choropleth',
           locations = df['CODE'],
           z=df['GDP (BILLIONS)'],
           text = df['COUNTRY'],
           colorbar = {'title':'GDB in Billions USD'})
layout = dict(title='2014 Global GDP',
             geo = dict(showframe= False,
                       projection = {'type': 'mercator'}))
choromap3 = go.Figure(data=[data],layout=layout)
iplot(choromap3)

please check it

Blockquote

Hi @dosoung

The two countries are in the right position. I restricted the range for longitude and latitude and now you can
convince yourself running these lines of code:

url ="https://raw.githubusercontent.com/plotly/datasets/master/2014_world_gdp_with_codes.csv"
df = pd.read_csv(url)
data = dict(type = 'choropleth',
           locations = df['CODE'],
           z=df['GDP (BILLIONS)'],
           text = df['COUNTRY'],
            colorscale='Spectral',
           colorbar = {'title':'GDB in Billions USD'})
layout = dict(title='2014 Global GDP',
             geo = dict(showframe= False,
                       projection = {'type': 'mercator'}))
fig = go.Figure(data=[data],layout=layout)
fig.update_layout(width=800, 
                  height=600,
                  geo=dict(     
                        lataxis_range=[15, 60], 
                        lonaxis_range=[100, 135] ))
fig.show("browser")