Scatter_geo missing countries

I am plotting a map using px.scatter_geo and a column with ISO-3 codes is selected for the ‘locations’ argument. The resulting map, however, does not show bubble for Singapore whose ISO-3 code is ‘SGP’ as correctly filled in the data file. What have I missed? Thanks.

Hi @sparkling,

You need to update the “resolution” of your figure in order to include smaller regions like Singapore. A resolution of 50 will be enough to include that region. With px.scatter_geo, you can do this using the update layout method.

For example:

worldfig = px.scatter_geo(
    gapminder,
    locations="iso_alpha",
    size="pop", # size of markers, "pop" is one of the columns of gapminder
)

worldfig.update_layout({
    'geo': {
        'resolution': 50
    }
})

(from this answer on the community forum)

Super! It works now.