Choropleth maps (plotly) with detailed borders

Viewed 232

I am trying to plot a world map, where the colors correspond to a specific variable. However, it does not show small states like "Andorra" or "Liechtenstein", even though they are in the data frame (see df$COUNTRY). I think the problem is, that the borders are not drawn with much detail. Hence one can not see the small states. Is there a way draw the borders with more detail like with the packs, maps, and mapdata (e.g wolrd_detailed <- map_data ("worldHires")? Or any other way to make the small states visible? Here is the example from the plotly website. It does not show small states:

library(plotly)   
df <- read.csv("https://raw.githubusercontent.com/plotly/datasets/master/2014_world_gdp_with_codes.csv")
fig <- plot_ly(df, type='choropleth', locations=df$CODE, z=df$GDP..BILLIONS., text=df$COUNTRY, colorscale="Blues")
fig

Thanks for the help!

0 Answers
Related