Please I am having issues creating an interactive map with the dataset below

The map I created isn't interactive and its not showing color as expected.


This is the dataset.

# give state boundaries a white border
l <- list(color = toRGB("Yellow"), width = 2, set="2")
# specify some map projection/options
g <- list(
  scope = 'world',
  projection =list(type="production_countries"),
  showlakes = TRUE,
  lakecolor = toRGB('Green')
)
fig <- replacement %>% filter(!is.na(production_countries)) %>% plot_geo(locationmode = "Continent") %>% 
  add_trace(z = ~sum,
            locations = ~production_countries,
            color = ~sum,
            text = ~ label_text,
            color="Purple")
fig <- fig %>% colorbar(title="color")
figA<- fig%>% layout(
  title = "Distribution of film production by countries",
  geo = g
)
figA
type or paste code here

This is the code used

1 Like

Hi,
For interactive plots in general one can use plotly, but for interactive maps I would recommend leaflet.
Hope this helps,
Zivan

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.